[SOLVED] ALSA has lost its ability to unmute the sound
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After a recent upgrade, I find that the sound comes up muted on two of my three machines. I have to run
Code:
pactl set-sink-mute 0 0
to unmute the sound.
My setup is: my programs call ALSA. asound.conf does not route the sound through PulseAudio. The sound state is restored from /etc/asound.state on boot. PulseAudio is never invoked. This worked fine for years.
Now, it seems that there is some sound state that only PulseAudio can control. However, once unmuted via pactl, the sound works with just ALSA.
This is a minor inconvenience. I am not sure if there is a way to get the old behavior back.
ETA: I see that the additional state is saved to /etc/asound.state by "alsactl store". Only alsamixer is missing the settings. This reduces the problem to once-per-install.
Ed
The problem occurs on the Slackware64-current base system (A, AP, D, L, N, T, TCL, X, and XAP). Standalone ALSA used to work, but the recent ALSA mixer does not have all the settings needed to unmute the sound. This configuration can also use PulseAudio if a program like Firefox calls it.
I suspect that very few users run ALSA without routing the sound through PulseAudio. I am marking the thread as solved since a workaround exists (run pactl before "alsactl store").
Ed
If you don't like pulse, check out pipewire. I switched over to it a week ago, and I'm liking it. I haven't noticed any problems, that is. (I do need to rebuild it for jack, but I'm a bit lazy in that regard.)
recent ALSA mixer does not have all the settings needed to unmute the sound.
That is interesting. I don't use current, but I think amixer set Master unmute should be able to unmute.
If it's not able to do that without pactl, then it's a bug/regression in alsa lib which breaks amixer.
That is interesting. I don't use current, but I think amixer set Master unmute should be able to unmute.
If it's not able to do that without pactl, then it's a bug/regression in alsa lib which breaks amixer.
I agree, but I think this is due to the behaviour of pulseaudio, and not alsa itself. If PA is muting all channels, then the 'amixer set Master unmute' won't be sufficient. Easy enough to check though.
Following current is too much work for me, may be easy enough but not enough time.
FWIW, alsa-lib compiled with no libpulse works fine on 15.0 here, mutes/unmutes fine via amixer and saves/restores fine via alsactl.
So the OP problem looks like regression to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.