Fix for no sound issue on Linux when using headphones - gHacks Tech News

ADVERTISEMENT

Fix for no sound issue on Linux when using headphones

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.

pavucontrol

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. 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.

  2. 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.

  3. 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.”

  4. 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.

  5. 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!

  6. 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.

  7. 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.

  8. 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.

Leave a Reply

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

Please note that your comment may not appear immediately after you post it.