Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I guess this question already had the answer here but I can't find it. I'm using 12.04.


The problem is that I can hear the sound from my laptop's speakers even I plugged in my headphones. Headphones is just standard stereo headphones. And the most interesting thing is that all was working just a week ago.

I tried to play with pulseaudio and alsamixer settings - no results.

share|improve this question
What machine do you use? Netbook? Laptop? Desktop? Tell us the model and specification too, please. – Drie Jun 14 '12 at 16:52
Also, if what you mean is that you get sound from both headphones and speakers at once when headphones are plugged in, I recommend editing your post to clarify that this is what you are saying. Also please let us know about whatever you've tried so far (if anything) to fix this problem. Also, is this the question you were thinking of? – Eliah Kagan Jun 14 '12 at 16:53
Look to the 'Related' questions, located to the right on this page. Some of the answers may help. – loklaan Jun 14 '12 at 16:55
Did you install any sound or video editing tools? Similar problem happened to me. I think it was Audacity (it changed some sound port settings by default). Solution was to run that program and change some settings. – Ljiljan Veselinovic Jun 1 '15 at 5:55

13 Answers 13

up vote 18 down vote accepted

Original Solution

  1. Go to Realtek official site, accept the disclaimer, then download the audio driver for linux/unix. You need to select version 3 for Kernel 3 or later.

  2. Setup necessary tools to compile this driver.

    sudo apt-get install build-essential gcc make

  3. Extract the downloaded file, run sudo ./install file from a terminal after going to the extracted folder to compile the driver.

  4. Read the Readme.txt file for more information.

  5. Install gnome-alsamixer by this command.

    sudo apt-get install gnome-alsamixer
  6. Open the gnome-alsamixer by typing alsamixer in the dash.

  7. Select the "Auto mute mode" in the new window.

Reboot and see whether it fixed now. (Step 6 and 7 might not necessary). Automute will automatically enabled upon restart

Solution 2:

I have just found another solution:

(It worked for me with Only S/PDIF profile, Sound from both headphone and speaker and not being able to switch profile)

  1. Add this ppa by the command

     sudo apt-add-repository ppa:ubuntu-audio-dev/alsa-daily
  2. Update packages list. by

    sudo apt-get update
  3. Then install "alsa-hda-dkms" package:

     sudo apt-get install alsa-hda-dkms

Reboot, And See the result!

share|improve this answer
I had exactly this problem. but it now fixed. you can install gnome-alsa-mixer to gain more control over your sound. Note that after compilation the sound will be muted. – Anwar Shah Jun 14 '12 at 20:09
apt-get install alsa-hda-dkms has worked for me, thank you very much. – EarlGray Oct 13 '12 at 22:09
Hey! I tried to install alsa-hda-dkms. First two steps worked but when ever I execute third step sudo apt-get install alsa-hda-dkms it gives this error: E: Unable to locate package alsa-hda-dkms. Is this package removed from the repository? Reply!! – Saurav Kumar Sep 3 '13 at 19:48
@SauravKumar Are you using 12.04? It seems the package has now been removed, Anyway, the problem also got solved in the later updates of 12.04, So, you may want to update your Ubuntu – Anwar Shah Sep 4 '13 at 13:21
Just enabling auto mute in alsamixer worked for me. Thanks. (Ubuntu 14.04) – rodrigo-silveira Aug 17 '15 at 13:17

Hey guys if anyone still has this issue try the following:

  1. Open Terminal (Ctrl+Alt+T)
  2. Type: alsamixer and press Enter/Return
  3. Navigate to the right with the right arrow key until you get to "Auto-Mute"
  4. Press and select the "Line Out" option (or just "Enabled")
  5. Press Esc to exit.

Hope this helped it solved out my problem now when I play audio through my speakers and plug in my headphones it mutes the speakers and plays it through the headphones.

share|improve this answer
Great, this worked perfectly without the need to add repos and/or packages, or edit a config file! – stragu Jun 1 '15 at 5:30
For those that were lost like me, there's a step missing. After #2, press F6 to select your audio device. Then you'll see the option mentioned in #3. – Nick Zinger Oct 6 '15 at 13:20

I also had this problem on my hp laptop. I found a post and take one of the advice, which suggests adding two lines to the bottom of the file /etc/modprobe.d/alsa-base.conf :

options snd-hda-intel model=laptop

options snd-hda-intel position_fix=1 enable=yes

save it and reboot. It works for me!

share|improve this answer

Had this issue on XUbuntu 12.04, reviewed this page, installed the gnome-alsamixer package, ran gnome-alsamixer, checked the "Headphone Jack Sense" option in the gnome-alsamixer GUI screen that came up, verified the problem is resolved. Thanks!

share|improve this answer

The command sudo apt-get install gnome-alsa-mixer did the trick for me on my Compaq nw8000.

I could enable the Headphone Jack Sense option and now it switches the audio to the headphone when I plug-in my head phones.

share|improve this answer
The package is gnome-alsamixer as of 14.04 – Attila Fulop Oct 27 '15 at 6:44

I had the same problem on 13.04 with an Asus X201E, and tried the gnome-alsamixer solution but it failed as the gnome-alsamixer crashed with "No idea what to do for mixer element "Auto-Mute Mode"!". So I opened the command line alsamixer and navigated to the Auto-Mute Mode using the arrows (only Auto-Mut is visible in the terminal window) and set it from Disabled to Enabled. Now connecting the headphones mutes the internal speakers.

share|improve this answer

What worked for me was to run alsamixer and enable the auto-mute option. I did this while the headphones were connected and everything started working perfectly.

share|improve this answer

This one worked for me perfectly.

1-In the terminal type: sudo gedit /etc/modprobe.d/alsa-base.conf

2-At the end of the file paste the following:

alias snd-card-0 snd-hda-intel
options snd-hda-intel model=dell-m4-1 enable_msi=1

3-Save and Reboot.

NOTE: If this does not work, change in the second line the part about:

model=dell-m4-1 --> model=hp-m4

share|improve this answer

Try plugging in your headphones properly. This happened to me once and then after fixing that pin of the headphones correctly it worked properly.

share|improve this answer
thanks for answer, but this is not the same problem. – Ilay Jun 14 '12 at 16:46

I had the same exact problem with a fresh install of Xubuntu. I tried a buch of things including typing alsamixer in terminal. The option was not there for me to turn on the Headphone Jack Sense. I installed gnome-alsamixer and found the Headphone Jack Sense option, checked it and alas no audio from the pc speakers while headphones are plugged in. This worked for me.

share|improve this answer

Running alsamixer in terminal worked for me, set it to Auto Mute and you should find your machine will play sound through one or the other rather than both

share|improve this answer

in alsamixer, try using arrow key Up, then turn everything up to 100% and you will see the right bar turns up. After that turn down arrow key to % you like. Now it should be down together and your right speaker will work on both sides.

share|improve this answer

On an Asus X551MA I was having this problem as soon as I replaced Windows with Ubuntu 14.04. Even if I muted the speakers in aslamixer, they would come back on unexpectedly.

When I got to step three in this troubleshooting procedure, that seems to have fixed everything. It's a long complicated command which installed various packages, so I'm not sure which part(s) were really necessary:

sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop linux-image-`uname -r` libasound2; sudo apt-get -y --reinstall install linux- sound-base alsa-base alsa-utils lightdm ubuntu-desktop linux-image-`uname -r` libasound2; killall pulseaudio; rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse- access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.