On my desktop running Ubuntu 16.04 I can have audio on the speakers connected n the read but I do not have audio on my headphones.
Further investigation has shown that somehow the front panel audio is muted by default whilst the speakers are not.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
alsamixer to the terminal and using left and right arrow keys in to the
Headphones selection if is muted (shows MM on above) press
M to unmute and press the up arrow to volume up
Afterwards insert the following command to the terminal:
alsactl --file ~/.config/asound.state store
To store the settings into a file to your home folder. Then in order to restore it every time you login (is the best option I've tried) use this command:
echo "alsactl --file ~/.config/asound.state restore" >> ~/.bashrc
Also the source of the problem, in my case is that the Front Panel uses AC'97 instead of IntelHD one, so setting the appropriate setting into BIOS settings also fixed the problem whithout the need to do the following fix above.