Undetectable Humanizer: Lifetime Subscription
Transform AI-Generated Text into Human-Like, High-Ranking Content & Bypass Even the Most Sophisticated AI Detectors
Get 95% Deal

Fix for no sound issue on Linux when using headphones

Mike Turcotte-McCusker
Aug 13, 2019
Updated • Aug 13, 2019
Linux
|
15

So, I recently did a bunch of distro-hopping to test out some systems I am unfamiliar with, and I found an issue that persisted regardless of what I was running; if I kept my speakers plugged-in to the front audio-jack and kept my headphones plugged-in to the rear audio-jack, my headphones would produce no audio.

The tools I used to troubleshoot the issues were PulseAudio and ALSA. If you are new to Linux, check out or getting started with audio on Linux guide.

First, I checked to see if pulseaudio recognized the sound devices as being plugged-in by opening the PulseAudio Volume Control application via terminal using the pavucontrol command.

I found that PulseAudio was only recognizing my front audio-jack as plugged in, though it did tell me that my Line-Out was unplugged, so it at least recognized Line-Out but unfortunately not the plugged-in headphones.

Next, I tried going through the Configuration tab and Output Devices tabs changing various options around, applying the changes, and restarting Clementine to see if anything worked...Nope.

Then, I decided it was time to get a little more serious, and poked into the ALSA (Advanced Linux Sound Architecture) mixer application:

alsamixer

When first opening alsamixer you may or may not automatically be presented with the sound device / sound card you are looking to modify (I was presented with my HDMI as default, for example).

To change the device you are editing, hit the F6 key and select the device to edit; mine was called HD-Audio Generic. You may need to select different devices one after the other to find the right device if you don't know its exact name.

Once your device is selected, using your keyboard arrow-keys, scroll to the right until you find a setting called Auto-Mute – If this is defaulted to enabled then it must be changed by using your up/down arrow keys to disabled, and then you can hit the escape key to exit.

Doing so enabled me to have audio route to my headphones. However, I could hear audio through both speakers and headphones at the same time now.

To fix this I returned to pavucontrol inside the Output Devices tab and inspected what devices were listed. My speakers were listed as Headphones (Plugged in) but my headphones plugged into the rear audio-jack still were listed as Line-out (unplugged). However, for fun, I selected the Line-out device and was surprised to hear that my speakers went silent and my headphones remained active, solving the issue.

Tip: check out how to enhance sound in Linux with PulseEffects.

Parting thoughts

It’s a slight annoyance that this happened, and that my device is listed as unplugged despite that I am listening to music while I write this through that very set of headphones...But it works.

This fix should be applicable on pretty (almost) well any system encountering this issue, providing it uses ALSA and PulseAudio. Hope it helps!

Now You: Did you run into sound issues on your Linux systems in the past?

Summary
Fix for no sound issue on Linux when using headphones
Article Name
Fix for no sound issue on Linux when using headphones
Description
Find out how to fix a no sound issue on Linux when headphones don't play any sound on Linux devices while connected to the system.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Andy Prough said on February 25, 2022 at 7:21 pm
    Reply

    This post was just what I needed this morning, thank you very much. Now I have sound again through the headphone jack on this old HP Split laptop. I’m glad DuckDuckGo can find these older posts.

  2. Jason said on August 20, 2021 at 2:29 pm
    Reply

    Switching from Windows with an Sound BlasterX AE5, I love creative cards, I use these cards because they are about 10 times louder than onboard sound.
    In windows this card has a program that you run to switch the headphone amp on otherwise the headphones wont work, I can’t even get the correct driver installed under Linux let alone trying to get the headphones to work.
    Currently using Pop OS.
    Back to windows I suppose

  3. César said on March 7, 2021 at 9:43 pm
    Reply

    Thank you it works :)

  4. BlueHeadLizard said on May 15, 2020 at 6:10 pm
    Reply

    Thank you Mike. The alsamixer fixed my front panel jack not working on a
    Like you said;
    1) Terminal + alsamixer.
    2) F6 to change to generic device,
    3) MM to OO to unmute. Also turn up volume if on 0. Fiddle around with the arrow keys to do it.
    4) right arrow key to go to automute ‘off screen’ to the right and disable that.

    Starting PC again my Front jack is silent again. But easy to open alsamixer and do above again, so I’ not fussed. Eventually I’ll get a more permanent audio solution from the back of the PC/Motherboard audio which always works. And now I know where to look for a permanent solution. I’m a Linux noob so the autostart post above is something for me to study, but to be careful about trying, as so far all working for 2 days.

    Thank you.

    For Reference Only: New PC build LinuxMinit (only) on:
    – MSI B450 Tomahawk(new returned item)
    – AMD R5 2600 CPU (new)
    – Patriot Viper Steel series 16 Gb (overkill, was a sale too tempting)
    – MSI AMD RX 280 GPU (secondhand)
    – M2 SSD Adata 128Gb for booting up.
    – (later HDD Toshiba 1Tb still to mount. For data storage.)
    MSI bios boot then LinuxMint 19.3 Tricia install from ISO image USB stick* worked first time. So I can recommend the above ‘mix’ of AMD components, or similar, to other linux users.
    *ok i went through the ‘pain’ of setting up a good ISO image Linux OS USB stick using Rufus on another dual boot windows Asus laptop. Fiddling around with the file systems; UEFI, etc.

    1. BlueHeadLizard said on May 17, 2020 at 6:35 pm
      Reply

      Adding to comment above sound now coming out of front panel even after switching PC off and back on, so Mikes guidance on alsamixer fixed it. Thank you.

  5. Leo said on May 9, 2020 at 1:44 am
    Reply

    Yes, indeed.. after mucking around for almost half a day trying to get my SR950 grooving, re-doing configs, horsing around with pulseaudio, alsa… and all that jazz!
    this was the solution… for me.

    $ alsactl restore (no need for root)
    followed by a restart.

    no more issues…

    screw you ALSA!!! arghhh…

    running on:
    Dell Latitude 7290, uBudgie 20.04

  6. No said on March 29, 2020 at 4:27 pm
    Reply

    I had a similar issue and wrote this script. It is added to the autostart and thus runs as soon as a user logs in. Beforehand it is not needed as there is no one using sound.

    #!/bin/bash

    function MySubscription() {
    if [ “$1” != “Event change on card #0” ]; then
    return 0
    fi

    #detect plug state
    pactl list | grep “analog-output-headphones” | grep “not available” > /dev/null
    STATE=$?

    if [ $STATE -eq 0 ]; then
    echo “headphones unplugged, setting volume back to loud”
    amixer set ‘Headphone’ 100% on > /dev/null
    else
    echo “headphones plugged, doing nothing”
    fi

    return 0
    }

    export -f MySubscription
    pactl subscribe | xargs -I {} bash -c ‘MySubscription “$@”‘ _ {}

  7. ant said on August 18, 2019 at 2:34 am
    Reply

    Same shite here too on a Ubuntu flavor, unplugged the earphones from the rear, when plugging back in there’s no sound (go to Volume Control (same as the one seen in 1st picture in this article) > Playback tab) or it’s too low (go to Volume Control > Output Devices tab) because the sound system (ALSA?) has decided I have plugged in Line Out instead of Headphones so I select the Headphone but it says in parenthesis (Unplugged), Headphones comes in wider variety of impedances and I guess Linux is missing some kind of impedance sensing feature able to discern between headphones other equipment which such as amplifier input which has much higher impedance than even high impedance headphones.

  8. Barry said on August 18, 2019 at 1:29 am
    Reply

    Linux Mint almost bricked my Toshiba laptop. It could be something that I did tinkering on the terminal. So far so good, my Linux Lite is all right, though there’s no bluetooth on my revived laptop. The USB bluetooth dongle is somewhat incompatible on my computer.

    I figured that the machine would make a multimedia player and word processor.

  9. Sunny said on August 13, 2019 at 9:41 pm
    Reply

    For the past months, almost evrey time Manjaro got updates, the Bang & Olufsen speakers on my HP laptop would stop working. The headphone would still work.
    When I boot into other Linux distros the speakers would still not work. So some change in the firmware of the audio system is the cause. But the speakers would work when I booted to Windows 10.
    Only after rebooting a few times would the speakers finally work again.
    However with the last 2 Manjaro updates, the problem did not occur. So it may be fixed now.

  10. Peterc said on August 13, 2019 at 8:35 pm
    Reply

    This general type of problem is not necessarily exclusive to Linux. My dad has a Windows 10 laptop. When he’s at home, he hooks up to a dock that’s connected to a giant monitor, a full-size keyboard, a wired gigabit LAN, etc. He also has a pretty decent speaker system, but unfortunately, we can’t get that to work through the dock — and we spent some time *trying*. He has to plug it into the computer. With the dock connector, that’s *double* the amount of plugging and unplugging work! It’s an outrage! ;-)

    I’ve never had any problems with audio in Linux Mint, but I run it on a laptop that has only one audio jack, so that may be the reason why! If I ever get a another computer with multiple audio jacks, I’ll try to remember this post, so thanks in advance, Mike!

  11. basicuser said on August 13, 2019 at 5:57 pm
    Reply

    “if I kept my speakers plugged-in to the front audio-jack and kept my headphones plugged-in to the rear audio-jack, my headphones would produce no audio.”

    Just curious, have you tried speakers in the rear jack and headphones in the front jack?

    I’m trying out Mint 19.2 Cinnamon on a thumb drive on a W7 box. My speakers run from rear jack. When plugging headphones in the front jack, the speakers cut off and the headphones come on. Don’t remember any sound issues with other distros.

  12. VioletMoon said on August 13, 2019 at 4:56 pm
    Reply

    “It’s a slight annoyance that this happened, and that my device is listed as unplugged despite that I am listening to music while I write this through that very set of headphones…But it works.”

    It’s these types of “annoyances” that make many dislike Linux enough to give up on the OS. I find sound issues, printer issues, and wireless issues to be a constant across the entire gamut of the Linux distro universe. I like to keep a persistent distro on a USB for various options, but I would never move to Linux as my primary, sole OS.

    I can’t really agree when someone says, “But it works,” when, in reality, the device is listed as “unplugged.” Yes, I can usually figure out a way to work around an issue in Linux or some other person has figured it out, but, really, should it be all that difficult and did that really “fix” the issue?

    Knowing Linux and its “annoyances,” one could move to a different machine and have no sound issues whatsoever.

    Granted, Windows has it’s fair share of “annoyances.”

  13. Mark Hazard said on August 13, 2019 at 3:05 pm
    Reply

    “Did you run into sound issues on your Linux systems in the past?”

    Yes, I lost sound from the built-in speakers on Ubuntu 16.04.
    I think that it could have resulted from a bad kernel update, but I am not sure.
    I was very new to Linux at the time, but I researched the web and tried everything that was offered, but nothing worked. I tried a BIOS update, which worked for a time, but stopped eventually.
    I tried Pulse Audio but that did not work, and other solutions which sometimes worked, but I ended up with no sound on the next reboot.
    The final solution was to upgrade to Ubuntu 18.04, which I did from a ISO image.
    I tried to upgrade in the normal way, but either I didn’t use the proper command, or my system was messed up, and I ended up not being able to boot because of upgrade errors.
    Did I mention that I had other problems, including Nautilus going missing? I eventually got it back.
    Perhaps if I read your article then I could have restored the sound. I don’t think I tried Pulse Effects. The sound has continued on Ubuntu 18.04 with no problems.

  14. Marc C. said on August 13, 2019 at 2:24 pm
    Reply

    “Did you run into sound issues on your Linux systems in the past?”

    Yes, my headphone jacks had no sound. I found the best info to solve my sound issue at the Ubuntu web site under an old page regarding “HDA Intel Sound How to”.

    Using the method described there, I first determined my sound card type:

    cat /proc/asound/card0/codec* | grep Codec

    Next, I located and found a local file “HD-Audio-Models.txt.gz” and found the correct model and type.

    Finally, I edited a .conf file adding a few lines to the bottom of the file:

    sudo nano /etc/modprobe.d/alsa-base.conf

    Adding these lines to the end of that file:

    alias snd-card-0 snd-hda-intel
    alias sound-slot-0 snd-hda-intel
    options snd-hda-intel model=MODEL

    … where MODEL was my specific model that I found in that file.

    Note that the two “alias” lines I added as a result of reading some other recommendations on the web. But, I’m not really sure if they’re needed. These changes did solve my headphone jack sound problem.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.