Federico Fuga

Engineering, Tech, Informatics & science

Is your audio continuously switching from Headphone to speakers?

30 Oct 2023 11:55 CET

If your audio card is continuously switching the output from headphones to speakers, making it impossible to use the sound, well, you are stumpled in a 9 years old bug that’s still unfixed despite the solution is as simple as editing two lines of a text file.

This happens at least on my mint desktop, that is a 12 years old Intel i7 3rd generation, with linux mint 21.1 cinnamon.

The simptoms are the sound level bar that keeps going up and down without any control, and if you open the sound widget, you’ll see the headphones output appearing and disappearing very fast.

In the past the only workaround that I found was to kill pulse audio. It seems it is a bug in the Intel/NVidia driver.

Anyway, today I stumbled on a bug report dated back to 2011 or so, and 2 years later a working solution is posted.

That is: simply edit the /usr/share/pulseuadio/alsa-mixer/paths/analog-output-headphones.conf file, and comment the following lines:

[Jack Front Headphone]
required-any = any

...
[Jack Headphone]
required-any = any

Restart pulseaudio or, better, reboot, and it will be fixed.

It takes 1 minute or less. But 9 years on the linux community was not enough to find a solution.