5

I am on a HP Pavilion DV6-2170US, running 32-bit Ubuntu 12.10. When I plug in my headphones the speakers AND the headphones play sound at the same time. The speakers should stop playing and send all sound to the headphones. How can I configure the sound that when I connect my headphones the speakers in the laptop are muted and the sound only comes out to the headphones.

I should mention that this model provides 2 audio output connections in the front (Not just one like most laptops).

Here is an image of how the Sound Settings looks:

enter image description here

Thanks!

3 Answers 3

2

I would first check to see if Ubuntu is detecting both (Headphones and Speakers) in the system settings:

enter image description here

If you see something like one the following images, then you know both were detected:

enter image description here

enter image description here

In my case I have support for my headphones and my stereo output. If in one case I would like to disable sound for the speaker, I would first select the output I want to disable and then disable the option (Marked by the green circle). This way sound will not come out of that output connection. The same goes for input devices. Here is another image of how 12.10 looks. Notice that I have both, the Speakers connection (Analog Output) and the Headphones:

enter image description here

The same case applies here. You select the device you want to mute and click on the mute button.

For cases where this options do not show or sound is still coming from the speakers when you have your headphones connected then follow this steps:

  1. Type in dash terminal or ter for short and press Enter

    enter image description here

  2. In the terminal type alsamixer and press Enter

    enter image description here

    enter image description here

  3. Inside the alsa mixer app, using your arrow keys, move left or right to any of the options that will show in your mixer window. Pressing up or down you can adjust the volume for that specific connection or pressing M you can mute the connection. What you will be doing here is looking for the one that mutes your speakers but leaves your headphones still with sound.

Now for your case, it seems your headphones are not getting detected correctly. The only option your computer shows is "Speakers" which are the internal ones. When you connect the headphones, the sound comes out of both (Speakers and Headphones) because it thinks they are the same. If you have already upgraded Ubuntu I would suggest to see what the command dmesg outputs. Type dmesg on a terminal and see if there is anything related to sound.

UPDATE: After looking at your dmesg and other information (Provided by Mr Jeeblez himself) and seeing that you have the Intel 5 Series/3400 Series Chipset High Definition Audio, searching I found a bug report that was made for said motherboard. You can find the bug report in https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/580233

The solution was to do the following:

  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.

3
1

I had the same problem on a System 76. It worked properly in 12.04, not in 12.10. I tried all these settings, but it never worked properly.

It works in Ubuntu 13.04 without me having to do anything.

1

The question is pretty old, but I've run into the same problem on Acer Swift 3 SF314-56 with newly installed Ubuntu 20.04. It turns out, that for some reason, the Auto-Mute Mode property was disabled by default in the alsamixer.

I've fixed it in the following way:

  1. Type alsamixer and press Enter in the terminal to open the mixer
  2. Change the "Auto-Mute Mode" from Disabled to Enabled

    enter image description here

Now you have to save this config, otherwise it will be lost after reboot. There is already an answered question (Howto save AlsaMixer settings?) on how to do that, so you might want to check it out first, as those answers seem more correct, but they didn't work for me, so I've done the following:

  1. Make sure that you set the auto-mute value to enabled in the previous steps
  2. Save current config by typing alsactl --file ~/.config/asound.state store in the terminal
  3. Now we have to find a way to load a config by calling a alsactl --file /home/<your_user_name>/.config/asound.state restore command at each startup. Seems like it should be possible by placing this command into the /etc/rc.local, but it haven't worked for me. So what I've done is found the Startup Applications Preferences in the Ubuntu preferences, and added this line as a new startup command.

P.S. My default alsa config file (/var/lib/alsa/asound.state in my case, you can check the location on your system with man alsactl) already had the "Enabled" value of the Auto-Mute Mode property. So maybe alsa didn't read this config for some reason, and more proper way to fix this problem would be to find the reason why this default config is not invoked.

1
  • This saved my bacon after upgrading PopOS to 21.10.
    – eil
    Jan 31, 2022 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .