Ubuntu – Headphones not detected when plugged before boot

16.04alsadellheadphonespulseaudio

I have Ubuntu 16.04 installed on a Dell XPS 15 9550.
When I power on the laptop with headphones plugged in, they are not detected by the system and they are not even visible in the audio settings.

In order to make them work properly, I have to unplug the jack and reboot the machine. Even though it's not a big issue, it can be very annoying if I don't remember to unplug headphones before startup.

How can this be fixed?

Thanks in advance for the help!

Best Answer

this works for me on 18.04, I had several problems and now all solved, try these steps I hope it help.

Step One (headset instead of headphone)

if you have a headset with one jack for both Mic and headphone and it's not working you need to do these :

check if your last three lines in /etc/modprobe.d/alsa-base.conf are similar to:

options snd-usb-audio index=-2
options snd-hda-intel position_fix=1
options snd-hda-intel model=,dell-headset-multi

You probably don't have the last two lines. Add them at the end of the file and save it. with these settings whenever you plugged your headphone into your PC/laptop ubuntu asks you if it's a headset a Mic or a headphone.

Step Two (echo cancellation)

for disabling echo cancellation and some noise open this file :

/etc/pulse/default.pa

and add

load-module module-echo-cancel

some where into it.

and finally Step Three (your answer)

With this method you can restart your audio card module so your headphone can work again without restarting your PC/Laptop :

sudo modprobe snd-hda-intel

it should work :) for doing this at startup do this :

sudo sh -c 'echo "snd-hda-intel" >> /etc/modules'

and even if this method didn't work too :/ you need to disable the secure boot as mentioned here.

Related Question