17 votes

Auto-mute mode in ALSA might be the reason you can't use your speakers with headphones plugged in

Problem:

I recently switched back to a desktop as my main computer, and was surprised to learn I couldn't use my speakers if my headphones were plugged in.

I don't use a desktop environment (just Sway), so I rely on pavucontrol as a GUI to control my audio.

I could use my headphones just fine while my speakers were plugged in, but when I switched to my speakers in pavucontrol's interface, they would not output audio. My headphones would stop playing (as expected), and pavucontrol's little "dancing bar" would indicate that the speaker's port was processing an audio signal (as expected), but no sound was actually being produced.


Solution:

The culprit ended up being something called "Auto-Mute" in ALSA. To disable auto-mute mode, you can either:

  1. Run the command amixer sset "Auto-Mute" unmute in a terminal
  2. Run the command alsamixer in a terminal
    2.1 Press F6 and select your sound card
    2.2 Ensure you're viewing playback settings by pressing F3
    2.3 Move the item selection over until you've selected auto-mute mode
    2.4 Press the down arrow key to switch it to "Disabled"

That fixed my issue.

For me, auto-mute mode stayed disabled after a reboot. You might need to run the command alsactl store to make the configuration persistent though. The Arch Linux Wiki article on ALSA has a "tips and tricks" section that goes into more detail:

https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Tips_and_tricks

8 comments

  1. ahatlikethat
    Link
    Thanks for this! I find linux sound controls really fiddly.

    Thanks for this! I find linux sound controls really fiddly.

    6 votes
  2. [7]
    fxgn
    Link
    The real issue is using PulseAudio instead of PipeWire. PipeWire is far better than it was a few years ago, and it generally just works.

    The real issue is using PulseAudio instead of PipeWire. PipeWire is far better than it was a few years ago, and it generally just works.

    3 votes
    1. [5]
      hungariantoast
      Link Parent
      I do use PipeWire. PipeWire supports transparent passthrough of PulseAudio, ALSA, and JACK applications. See the Arch Wiki article for examples:...

      I do use PipeWire.

      PipeWire supports transparent passthrough of PulseAudio, ALSA, and JACK applications.

      See the Arch Wiki article for examples: https://wiki.archlinux.org/title/PipeWire#PulseAudio_clients

      2 votes
      1. [4]
        ahatlikethat
        Link Parent
        Interesting, what was your reason to run pulseaudio through pipewire? (Wondering if this might be a good solution for me.)

        Interesting, what was your reason to run pulseaudio through pipewire? (Wondering if this might be a good solution for me.)

        1 vote
        1. pseudolobster
          Link Parent
          Not who you were asking but I recently ran into dependency hell where I was trying to install xfce on top of Pop!_OS's gnome. The details are fuzzy but as I recall gnome-desktop requires pipewire,...

          Not who you were asking but I recently ran into dependency hell where I was trying to install xfce on top of Pop!_OS's gnome. The details are fuzzy but as I recall gnome-desktop requires pipewire, xfce-desktop requires pulseaudio. There are lots of shims and wrappers involved. It's all supposed to work seamlessly but in the end I spent several days trying everything before saying screw it and installed debian with xfce from scratch. It was weird stuff like firefox and vlc wouldn't play audio but mpv would. pavuctrl would say no pulseaudio devices found but alsamixer would say it found a pulseaudio device.

          In any case, it's normal, there's no benefit to adding extra layers, but yes, pipewire is the future, pulseaudio is deprecated. In an ideal world applications that expect pulseaudio will happily work through the shim, like programs that expect ALSA currently work seamlessly through pulseaudio.

          1 vote
        2. [2]
          hungariantoast
          (edited )
          Link Parent
          Mostly so I could keep using pavucontrol as a graphical audio control interface. (Which is the recommended interface for PipeWire.) But also, when I first installed PipeWire years ago, some...

          Mostly so I could keep using pavucontrol as a graphical audio control interface. (Which is the recommended interface for PipeWire.)

          But also, when I first installed PipeWire years ago, some programs (like mpv) didn't support PipeWire natively. You had to also install one of the compatibility packages for them to work, because they only supported the ALSA or PulseAudio API.

          I've never uninstalled those compatibility packages to see if they're still necessary, because I've never had any overt issues with them.

          For all the problems with Linux audio that people post online about, and as complex and hard to understand as the stack is (it is), I personally, haven't had many issues with it (even for bluetooth audio).


          Also, while writing this comment, I was curious if there were any PipeWire-native alternatives to pavucontrol yet, and it turns out there is:

          https://github.com/saivert/pwvucontrol

          It's pretty neat. It's probably going to replace pavucontrol for me.

          1. ahatlikethat
            Link Parent
            I do like pavucontrol-- but if you do install pwvucontrol I would love to hear how you like it.

            I do like pavucontrol-- but if you do install pwvucontrol I would love to hear how you like it.

    2. ahatlikethat
      Link Parent
      I tried switching to pipewire about 6 months ago but I had a weird problem on Firefox with it where any video started at 100% and then would revert to 100% any time I touched any of the controls....

      I tried switching to pipewire about 6 months ago but I had a weird problem on Firefox with it where any video started at 100% and then would revert to 100% any time I touched any of the controls. Also it didn't work any better with my bluetooth, maybe worse. But now I'm thinking my computer's bluetooth just sucks (Its on the AMD motherboard) and if I get a different bluetooth receiver I might try going back.

      1 vote