Fixing headphone jack in Ubuntu 20.04

Posted on 10 Comments

As weird and funny as it may sound, Ubuntu isn’t able to play sounds on my laptop‘s 3.5mm headphone jack. Yes, the gentle, innocuous, innocent headphone jack that we all love and use. And mine’s not even a super-fancy laptop with uncommon hardware. It’s a Dell Inspiron 7000 series laptop with an Intel chipset. How more commonplace can things get than this?

After fiddling around for quite a bit, I was finally able to get it to work. I guess the issue has something to do with (the notorious?) PulseAudio.

Anyway, the trick for me was to use a little utility called hdajackretask. It’s part of the alsa-tools-gui package and helps you retask (remap or whatever) your PC’s audio ports (including internal speakers and HDMI). Read the documentation here (simple and fun):

Install it using this command:

sudo apt install alsa-tools-gui

Next, open the app from either command line (hdajackretask) or menu. Here’s my overriden configuration for reference (headphone, right side):

Hit Apply Now, and boom! Headphones are finally working. It’s important to note that this is not a silver bullet that will fix all jack-related sound issues. It just so happened in my case that retasking was necessary. I have to do it every time I plug in my headphones (even with the boot override installed). Weirdo, I know, but at least it works.

You may receive this error when you apply the overrides. I guess it’s totally fine to ignore it. It’s probably because of a restart of pulseaudio system. Things work despite the error.

Feels to weird that it’s 2020 and such retasking has to be done manually!

Note that getting my Bluetooth audio devices to work – especially my AirPods – remains a pain in the you-know-what.

10 thoughts on “Fixing headphone jack in Ubuntu 20.04

  1. Hello, when I plug my headphones into my laptop running Ubuntu 20.04, sound still comes through the internal speakers and nothing comes up in hdajackretask. How can I fix this?

  2. Works like a charm. (Realtek ALC1220).

    In my case reboot was needed after applying override for Blue jack to be headphones and Install boot override.

  3. Thanks, it really worked for me. It was not necessary to re-start the PC. In addition, I just did it once. Thanks for sharing.

  4. I have to start hdajackretask app every time to activate the earphones.
    I wish there was a permanent fix.

  5. @Nikhil — In more recent versions of Ubuntu, this issue doesn’t exist.

  6. @Anurag recent LTS has Pulse audio issues, I need to retask to stop it from auto muting every 5 seconds when using headphones.

  7. @Crypto Czar — Sounds like a shitty thing in 2021! I’ve personally not faced many issues since upgrading to 21.04 earlier this year.

  8. Worked fine, but some programs had to be closed and opened again

  9. thanks for your beautiful blog.

  10. There are many issues with my headphone jack. It used to work well earlier. How much will it cost to repair it? thank you so much “one plus service center in Nagpur”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.