A Weird Imagination

PulseAudio headphone jack troubles

Posted in

The problem#

Since I got a new motherboard (and therefore new audio hardware as I'm using the basic one built into the motherboard) sometimes after I unplugged my headphones, my speakers would not output any sound.

pavucontrol showed the only available output as "Built-in Audio Digital Stereo" with a port of "S/PDIF", which does not describe any audio device I had ever used. If I plugged my headphones back in, they would work fine, and usually after unplugging and plugging back in my headphones enough times, my computer would eventually acknowledge that my speakers were connected by showing the expected "Built-in Audio Analog Stereo" with a port of "Line Out".

The solution#

In /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf change

[Jack Front Headphone]
state.plugged = no
state.unplugged = unknown

to

[Jack Front Headphone]
state.plugged = no
state.unplugged = yes       # changed from unknown

This forces PulseAudio to consider there to be speakers plugged into the "Line Out" port, so it may cause strange behavior if that is not the case.

To apply the change, run

pulseaudio --kill
pulseaudio --start

to restart PulseAudio.

Read more…