I have a problem with the audio in Ubuntu 17.10. No sound from speakers unless auto-mute from alsamixer is disabled. In that case sound goes to both speakers and headphones.
All sound cards are installed, however, even when headphones are not connected the only available output remains headphones-internal audio.
So far I did a fresh install of Ubuntu 17.10, run a live version of Ubuntu 16.04, 17.10, and Fedora, but no luck.
All this makes me think of a harware failure, in particular that the switch of headphones output jack socket is not working as it should. I tried to gently clean it, but nothing. However, audio hardware failure is quite unlikely to happen (I hope at least).
After each boot speakers are muted in alsamixer, unmuting them and increasing the volume produce sound from speakers, but of course the speakers are not automatically disabled when headphones are connected.
Note that the audio worked properly with Ubuntu 17.04, and also with 17.10 (at least for a week), then suddenly stopped without updating anything.
Machine: Lenovo Yoga 2 Pro.
arecord -l **** Lista di CAPTURE dispositivi hardware **** scheda 1: PCH [HDA Intel PCH], dispositivo 0: ALC3239 Analog [ALC3239 Analog] Sottoperiferiche: 1/1 Sottoperiferica #0: subdevice #0
EDIT: Here the output for cat /proc/asound/card*/codec#*
I just tried to run a live usb with Windows and the problem is still there;
evtestfor mic and heaphones reports them always connected (even if not).
I conclude that actually this is a hardware problem. I am going to replace the entire sound card, and I will update this post as soon as I have a final response.
SOLUTION (hardware problem): Replacing the sound board fixed the problem (40 Euros for a new one from eBay).