Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

12 Answers 12

up vote 13 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

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

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

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

  1. Open Terminal
  2. Type: alsamixer
  3. Navigate to the right with right arrow key untill you get to "Auto-Mut"
  4. Press the up arrow key and select the "Line Out" option
  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

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

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

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

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

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.