"lsmod |grep audio" doesn't return anything?

9,178

Maybe you removed alsa related packages or you messed up their installation. Since there are no snd_* modules loaded, it's probable that /etc/modprobe.d/alsa-base.conf is wrong or missing. Try reinstalling alsa and reboot:

apt-get --reinstall install alsa-base alsa-oss alsa-utils gstreamer0.10-alsa

Sometimes, upgrading a package, with many dependencies, to a major release version, a lot of those dependencies might be removed and replaced with alternative packages. When downgrading to the previous release, it is not certain that the dependency chain will return to it's original state. Especially the upgraded configuration files.

EDIT

So, if you have upgraded from another repository than stable, like the experimental one, there is a way to downgrade all your packages to the stable release and hopefully fix all dependencies.

Create a file /etc/apt/preferences and add the following contents:

Package: *
Pin: release a=squeeze
Pin-Priority: 1001

This is called pinning and it will give maximum priority to squeeze packages. Ensure you have squeeze repositories in /etc/apt/sources.list and run

apt-get update
apt-get -d dist-upgrade
apt-get dist-upgrade

This will downgrade every package to stable release. You have to be careful and watch the whole process, as all installation scripts are optimized for upgrading and not downgrading, this means that some packages may try to install in the wrong order. If that cause the downgrade to break, use dpkg --force-all -i /var/cache/apt/archives/<pkgname>.deb to force the installation of any required package, or apt-get -f install when needed and restart the dist-upgrade process.

Remove /etc/apt/preferences at the end.

Share:
9,178

Related videos on Youtube

Kumar
Author by

Kumar

I am a run of the mill LAMP guy who is a self proclaimed guru of everything LAMP. I blog at http://www.kumarchetan.com/blog/ as a super duper numero uno techie.

Updated on September 18, 2022

Comments

  • Kumar
    Kumar over 1 year

    I am running Debian Squeeze. I installed and removed Gnome3 and reinstalled Gnome2.x (epic fail and stupidity) and in the process I have lost audio, lspci returns following

    # lspci | grep Audio
    00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)   
    

    But lsmod doesn't return any thing.

    $ lsmod |grep audio
    

    Any idea what could be wrong?

    Here is an update, I tried to install whatever possible package was removed by studying /var/log/dpkg.log. This fixed my other issues like no right click on desktop and blunt looking buttons etc. Now I have everything in order but sound is missing. I don't see sound section in gnome-control-center. Here are some findings:

    kumar@debian-box:/$ lspci | grep Audio
    00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
    kumar@debian-box:/$ lsmod |grep audio
    kumar@debian-box:/$ lsmod |grep snd  
    kumar@debian-box:/$ lsmod |grep sound
    kumar@debian-box:/$ cat alsa-base.conf
    # autoloader aliases
    install sound-slot-0 /sbin/modprobe snd-card-0
    install sound-slot-1 /sbin/modprobe snd-card-1
    install sound-slot-2 /sbin/modprobe snd-card-2
    install sound-slot-3 /sbin/modprobe snd-card-3
    install sound-slot-4 /sbin/modprobe snd-card-4
    install sound-slot-5 /sbin/modprobe snd-card-5
    install sound-slot-6 /sbin/modprobe snd-card-6
    install sound-slot-7 /sbin/modprobe snd-card-7
    # Cause optional modules to be loaded above generic modules
    install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
    install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
    install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
    
    # Prevent abnormal drivers from grabbing index 0
    options bt87x index=-2
    options cx88_alsa index=-2
    options snd-atiixp-modem index=-2
    options snd-intel8x0m index=-2
    options snd-via82xx-modem index=-2
    # Keep snd-pcsp from beeing loaded as first soundcard
    options snd-pcsp index=-2
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=-2
    

    Last update, I fixed it using sudo modprobe snd-hda-intel, it seems I messed up kernel headers.

    • Mikel
      Mikel about 13 years
      Please format your code and output properly by indenting it with 4 spaces.
    • Mikel
      Mikel about 13 years
      Does /var/log/dpkg.log say that any audio-related packages were removed?
    • Kumar
      Kumar about 13 years
      @Mikel: +1, your comment helped me in fixing another issue with UI, I will continue with my fix, thaks :)
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' about 13 years
      There's no reason lsmod | grep audio should return anything (most sound-related drivers have snd or just a technology or chip designation in their name). If you try to play a sound, do you get any error message (try from the command line to be sure to see any message) or just no sound? If there's no error message, start a mixer and make sure all relevant volume controls are not muted.
    • Kumar
      Kumar about 13 years
      @Gilles, thanks for pointing, I knew it but just to eliminate any possibility of a string with audio I did grep audio, you can notice the second one is snd and third one is sound, I am frustrated :-(
  • Kumar
    Kumar about 13 years
    I have /etc/modprobe.d/alsa-base.conf and Reinstallation of gstreamer0.10-alsa is not possible, it cannot be downloaded., other 3 packages are also installed but in any case I will go with your tip and try it, no harm in trying
  • Kumar
    Kumar about 13 years
    It didn't help :(
  • Kumar
    Kumar about 13 years
    check my update
  • bb2
    bb2 about 13 years
    Ok you should have snd_hda* modules loaded. There are my list [t0@larch ~]$ lsmod | grep snd | awk -F' ' '{print $1}' snd_usb_audio snd_usbmidi_lib snd_rawmidi snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_hda_codec_hdmi snd_hda_codec_via snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc usbcore try to load that modules by modprobe
  • forcefsck
    forcefsck about 13 years
    @Kumar, added a small guide for downgrading debian releases.
  • Kumar
    Kumar about 13 years
    +1 for the guide, thanks a ton. But it didn't fix anything for me, 0 upgraded, 0 newly installed, 0 to remove :(