Okay, I have an HP 15-F039WM Laptop running Ubuntu 14.04. The problem is, whenever I plug in my headphones, sound still comes out of the speakers. I've tried everything. Alsamixer, gnome-alsamixer and the auto mute won't stay checked for some reason. Really hope someone can help me fix this. Thanks.
I have a HP Envy, with touch screen, Nvidia discret card and beats audio system. I have had this common issue of the sound comming out from both the speakers and headphones. I've tryed every attempt of solution I've found in any forum but nothing worked for me. But my situation is this one:
I'm using the 16.04 LTS version which doesn't provide the latest stable kernel. As beats audio doesn't provide specific drivers for linux, there is a solution to make all the speakers (the 4 on the front and the subwofer) working with a graphical tool called HDAJackRetask. It is something you have to do (if you want to make the most of your hardware), as with the dedicated graphic card, for which you can install the proprietary drives after a fresh installation. Done so, everything works as it should. But...
I also installed a tool called ukuu which installs the latest stable kernel directly from the github respository (I think). It's like going to the web yourself and download the three packages and installing yourself through gdebi or dpkg. After that, you discover than the current Nvidia drive doesn't work anymore. And the only solution is to uninstall everything related to Nvidia and start the ubuntu tool does searches for proprietary drives again. As if it was an fresh installation once again. And I think the same issue was happening with the sound system. So I run HDAJackRetask and dissabled the retask changes to the original. Rebooted and restarted and I could see the sound was able to be taken out from only one source: speakers or headphones when plugging them.
And then I run HDAJackRetask again.
So, once more, after installing a new kernel manually (with the ukuu tool in this case), everything related to the graphic and the sound cards should be reconfigured or reinstalled again.
Everything works fine again.
Just in case this could be your problem ;)