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
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
sudo vi ~/.asoundrc
Edit
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.
pcm.!default { type hw card 1 } ctl.!default { type hw card 1 }
Edit /etc/modprobe.d/alsa-base.conf.
At the very end of the file change or insert:
... # 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
sudo alsa force-reload