Ubuntu – How to switch between headphones and speakers without unplugging headphones

alsaheadphonessound

When I plug in my headphones the audio output device switches to the headphones from my speakers.

Rather than plugging/unplugging the headphones all the time, which will eventually wear out my cord/jack I would like to just use a software switch.

When I open Sound Settings and switch from "Headphones -> Built-in Audio" to "Line Out -> Built-in Audio" no sound comes out of my speaker or headphones.

I opened alsamixer to see what happens when I plug/unplug the headphones.

Headphones in:
Headphones in

Headphones out:
Headphones out

With the headphones plugged in I manually changed all the settings to match the settings when the headphones are out and still didn't get any sound through the speaker.

As a side note, changing the audio output device through the "Sound Settings" causes the same changes to alsamixer.

Best Answer

To make it possible to switch between speakers and headphones, follow these steps:

  1. Run alsamixer.
  2. If necessary, select your sound card with F6.
  3. Navigate to “Auto-Mute” with the right arrow .
  4. Disable it with the down arrow .
  5. Press Esc to exit.

Or you can do all these steps with one command:

  1. Open terminal
  2. run amixer -c 1 set 'Auto-Mute Mode' Disabled

Now you can change between speakers and headphones in the PulseAudio Volume Control.

After applying these instructions you can make your life easier by using Sound Switcher Indicator to quickly switch between headphones and speakers.

Related Question