Firstly, keep options snd-hda-intel model=asus-mode5
added to /etc/modprobe.d/alsa-base.conf
Disable pulseaudio's auto spawning capabilities and kill all instances
$ echo autospawn = no >> /etc/pulse/client.conf
$ killall pulseaudio
check if there is anything else using the sound card
$ sudo fuser -v /dev/snd/*
make sure you kill anything that comes up and stop it from respawning too, how to do this will depend on what the program is.
Install alsa-tools-gui
$ sudo apt-get install alsa-tools-gui
$ sudo hdajackretask
When the GUI loads, click "Show unconnected pins" and override the first unconnected pin to be a headphone jack and apply the settings. Daemonise pulseaudio puslseaudio -D
and test the sound, repeat this for all unconnected ports until you find the right one.
Once you have found the one the correct jack, click "Install boot override" and restart to make sure everything works. Now edit the pulseaudio
config file and remove the line added earlier to allow respawning again.
Until you reboot, volume can only modified using alsamixer
rather than the usual GUI component. After rebooting, everything goes back to normal.
Best Answer
When pluging in your headphone check the system volume, it may drop itself to zero. If it is not at 0 then open the sound menu from settings, or just click sound on the the dash and change the output to your headphones. I have the same problem. It may also work in reverse headphones out and no speaker.