Plugging wired 3.5mm headphones into an Ubuntu laptop only to hear music or a video call keep playing loudly out of your built-in laptop speakers – or play simultaneously through both headphones and speakers – usually means Ubuntu failed to flip the audio jack port automatically or ALSA’s hardware Auto-Mute Mode got disabled in the sound mixer.
Fix 1: Manually Select the Headphones Output Port in Sound Settings (Or pavucontrol)
Sometimes Ubuntu sees your audio chip as one combined device and simply leaves its active output port set to Speakers instead of switching to Headphones.
- Plug your headphones firmly all the way into the laptop’s 3.5mm combo jack.
- Open Ubuntu Settings > Sound.
- Under Output, check the Output Device dropdown (look specifically for Headphones – Built-in Audio vs Speakers – Built-in Audio).
- If Ubuntu Settings only lists one generic Built-in Audio device, install the PulseAudio Volume Control panel (which still works cleanly with modern PipeWire audio on Ubuntu 22.04 and 24.04):
sudo apt update && sudo apt install -y pavucontrol - Run
pavucontrolfrom Terminal or App Grid, switch to the Output Devices tab, and change the Port dropdown from Speakers to Headphones (plugged in).
Fix 2: Enable “Auto-Mute Mode” Inside ALSA Mixer (Stops Speakers Playing Alongside Headphones)
If sound plays through your headphones and your laptop speakers at the same time, Linux’s low-level ALSA sound driver has Auto-Mute turned off.
- Open Terminal (Ctrl + Alt + T) and launch the terminal mixer:
alsamixer - If the top-left shows PipeWire or PulseAudio with only one slider, press F6 and choose your real sound hardware card (such as HDA Intel PCH or HD-Audio Generic).
- Use the Right Arrow key to scroll across the sliders until you highlight <Auto-Mute Mode> (or simply Auto-Mute).
- Press the Up Arrow key to switch it from Disabled to Enabled.
- Also verify that the Headphone slider right beside Speaker is unmuted (press M if it shows
MMat the bottom instead of00) and raise its level with Up Arrow. - Press Esc to exit, then save your mixer levels permanently across reboots:
sudo alsactl store
Fix 3: Restart PipeWire / PulseAudio When Jack Detection Freezes After Sleep
Waking an Ubuntu laptop from sleep often leaves audio jack sensing unresponsive until the user sound daemon reloads:
- On Ubuntu 22.10, 24.04 LTS, and newer (PipeWire):
systemctl --user restart pipewire pipewire-pulse wireplumber - On older Ubuntu 20.04 / 22.04 LTS releases (PulseAudio):
pulseaudio -k && pulseaudio --start
If switching between HDMI monitors, USB headsets, and laptop speakers keeps flipping your defaults around, also check our guide on setting a default audio output device in Ubuntu.