So if you see the following symptoms, I think I got a fix for you.
- Speakers work and headphones don't (I experienced it the other way around already last year)
- When the headphones are plugged in, you hear sound from the speaker
After going through numerous threads and multiple config hacks and reinstalls of ALSA, I came to the surprisingly simply fix of changing some things on the alsamixer.
So go to a bash (CTRL+ALT+T) and type "alsamixer":
Make it fullscreen, so you can see every input / output codec:
The culprit really was that both HP/Speaker were set to "MM" while they should be enabled to "00":
So navigate with your arrow-keys to these and press "m" until it shows up as "00".
Surprisingly, enabling only one will only enable the speakers, the others only the headphones. Switching both to "00" will make them work like you're expecting.
Thanks for reading and I hope it helped,