I am using a 6th gen Thinkpad X1 Carbon with Ubuntu 20.04. No matter which headphones I plug in, the sound is not working for all of them. They are recognized correctly in the audio settings menu als headphones, but they don't play any sound.
The laptop speakers work without any problems.
Try this command in a terminal:
sudo alsactl restore
If problem persists, try to manually change audio parameters in 2 ways:
sudo apt install pavucontrol
Run pavucontrol (via command or menu) :
in output device tab, test manual change port to "headphone" or "speaker" (also in configuration tab, check "profile" is set analog)
alsamixer
(oralsamixer -c1
if hdmi audio is first) in a terminal (maximize window)cat /proc/asound/card0/codec#* |grep Cod