alsamixer cannot open mixer: Invalid argument
I had exactly the same problem. Sound worked perfect in Windows 7 but not in Kubuntu 14.04. After many days of searching the Internet and trying all possible advices I have come up with a solution that finally helped me. No need to reinstall Ubuntu.
First I tried to uninstall all ALSA packages and stuff using
sudo apt-get remove --purge alsa-base pulseaudio
and install them again using
sudo apt-get install alsa-base pulseaudio
Still didn't work even after numerous attempts of
sudo alsa force-reload
I read that ALSA has master audio channel muted by defaut after install. So I tried to unmute it using alsamixer
command. Unfortunately it didn't work due to Invalid argument
error.
The search continued and I stumbled upon a website that has always been in search results but I paid no attention to it. It mentioned some file called .asoundrc
. I looked for it and didn't find it on my system. Another website said that you should manually create it (/home/username/.asoundrc
for current user only, or /etc/asound.conf
if you want to keep these settings for all users) and paste the following content in there:
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
After that I was able to open alsamixer
. However, the screen was empty and didn't show any volume settings as expected.
Then I opened list of my sound cards with
cat /proc/asound/cards
It turned out that my laptop has two sound cards:
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0344000 irq 28
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0340000 irq 16
Card 0 was set by default in the beforementioned .asoundrc
file. I experimented and changed 0
to 1
. Afterwards alsamixer
showed the volume settings I needed.
Master channel was muted by default, as ALSA documentation warned. It was indicated by the letters MM
above the Master
label. I used the ↑ arrow key to increase the volume to 100%. But this wasn't enough. I also had to press the M key to unmute Master channel since increasing the volume does not unmute it automatically (taken from here). After pressing M the MM
letters became OO
which meant the channel was unmuted.
And the sound has FINALLY appeared! Press Esc to exit alsamixer
and enjoy the variety of sounds and music on your Ubuntu, Kubuntu or whatever distro it is that you are using.
Important note: do NOT use sudo alsa force-reload
command at all (as some websites suggest) because it mutes the Master channel again and you will have to repeat the unmuting procedure!
P.S.: These were a hard couple of days trying all possible things to be able to hear again. Of course I could give up and switch back to Windows 7 but my advice to you is do not look for easy ways. The Linux way is not for everyone but after completing that challenge it really feels like a hero.
Related videos on Youtube
Daniel
Updated on September 18, 2022Comments
-
Daniel over 1 year
No sound in Ubuntu 14.04 seems after upgrading kernel... I googled solutions, but cannot solve my problem. And I enter the command
alsamixer
in terminal. The output is this:cannot open mixer: Invalid argument
. Cannot fix it either.The weird thing is that after I use
sudo apt-get install pavucontrol
and start it by usingpavucontrol
. And when I play audio, the control panel has recognized it.Screenshot in below: