Table of Contents

Ubuntu - Sound - alsamixer - alsamixer not working

Error seen when trying to run alsamixer.

alsamixer

returns:

cannot open mixer: No such file or directory

NOTE: This error is usually because alsa is trying to open up settings against a sound card which does not exist in the system.

Try to run this, and if it fails change the number to 2 and retry. This should most likely work.

alsamixer -c 1

Fix

Determine Sound Cards

cat /proc/asound/modules

returns:

 0 snd_hda_intel
 2 snd_hda_intel

cat /proc/asound/cards

returns:

 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfb080000 irq 124
 2 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc200000 irq 126

Set Card To Use

sudo vi ~/.asoundrc

Edit

~/.asoundrc
pcm.!default {
    type hw
    card 2
}
 
ctl.!default {
    type hw
    card 2
}

NOTE: The reason alsamixer was not working in the first place is that the card in this file was wrong.

In this case, there is no card 1. Changing it to 0 or 2 which the above commands returned as the card numbers will make alsamixer work.

~/.asoundrc
pcm.!default {
    type hw
    card 1
}
 
ctl.!default {
    type hw
    card 1
}

Check that Alsamixer works

alsamixer


Alternative Fix

Edit /etc/modprobe.d/alsa-base.conf.

At the very end of the file change or insert:

/etc/modprobe.d/alsa-base.conf
...
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=0
options snd-hda-intel index=-2

NOTE: This modifies the index value for the snd-usb-audio module to zero and adds a line for the snd-hda-intel module.

Adjust these depending on the output returned by:

cat /proc/asound/modules

Reload alsa

sudo alsa force-reload

References

https://help.ubuntu.com/community/SoundTroubleshootingProcedure