Since I installed PulseAudio on my Gentoo system I've been having no audio output from my laptop's speakers when un-plugging the headphones jack.
I suppose the problem lies in how ALSA and PulseAudio manage the audio controls.
When headphones are plugged everything is perfectly ok, alsa controls for the Intel HDA PCH are configured correctly so that 'Master' and 'Headphones' volume bars are correctly configured (I can tell this by looking at alsamixer with root privileges).
When I un-plug the headphone jack, volume settings automatically change in a apparently correct way. That is, the 'Headphone' bar is muted and set to 0, while the 'Speaker' bar is un-muted and maxed out (while it gets muted when plugging the headphone jack). The 'Master' is always left un-muted and with the desired volume level.
I can actually make the speakers output work by manually un-mute and pump-up the headphones output with alsamixer. But I would have to do this operation every time a plug/un-plug headphones.
So is there some way to fix this? Maybe somehow decouple headphones output from speaker output in the ALSA system?
My laptop is an HP Pavilion G6 from 2011.