Ubuntu 11.10 Headphone-To-Speaker Switching for Intel HDA

Bug #874880 reported by John M.K.
84
This bug affects 17 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After upgrading to ubuntu 11.10 from 11.04, when headphones are disconnected the sound returns back to speakers. But if you try to reconnect the headphones, they no longer work (or sometimes they work for a couple of seconds and then nothing...).

This is a regression, in as much as it used to work perfectly fine in 11.04. Now I can see bug 870360 and bug 871633 pretty much stipulate the same problem, but I couldn't really relate exactly, based on the comments therein.

Temporary Fix

Under Sound Preferences -> Output -> Connector, when you plug your headphones, switch the connector to "Analog Speaker" instead of the current selection ("Analog Headphone").

So for some reason the alsa driver mixes up the Speaker and Headphone output state, and when Headphone is selected the speakers are functioning, while when Speaker is selected, the headset is functioning. This didn't happen in Natty 11.04.

Another thing to note is that my audio card has 2 outputs, one for Headphones and one S/P DIF for connecting external devices. S/P DIF works fine in all cases, no problems there.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: alsa-base 1.0.24+dfsg-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC665 Analog [ALC665 Analog]
   Subdevices: 0/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sinjoune 1493 F.... pulseaudio
 /dev/snd/pcmC0D0c: sinjoune 1493 F...m pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf1c00000 irq 53'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0665,102804b6,00100003 HDA:80862805,80860101,00100000'
   Controls : 27
   Simple ctrls : 13
CurrentDmesg:
 [ 16.891337] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 [ 21.871386] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=0
 [ 22.210322] init: plymouth-stop pre-start process (1376) terminated with status 1
 [ 27.075414] eth0: no IPv6 routers present
Date: Sat Oct 15 11:50:35 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
PackageArchitecture: all
PulseSinks:
 Error: command ['pacmd', 'list-sinks'] failed with exit code 1: Home directory /home/sinjoune not ours.
 No PulseAudio daemon running, or not running as session daemon.
PulseSources:
 Error: command ['pacmd', 'list-sources'] failed with exit code 1: Home directory /home/sinjoune not ours.
 No PulseAudio daemon running, or not running as session daemon.
SourcePackage: alsa-driver
UpgradeStatus: Upgraded to oneiric on 2011-10-13 (1 days ago)
dmi.bios.date: 07/20/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A06
dmi.board.name: 0YR8NN
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA06:bd07/20/2011:svnDellInc.:pnDellSystemXPSL502X:pvr:rvnDellInc.:rn0YR8NN:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System XPS L502X
dmi.sys.vendor: Dell Inc.

Revision history for this message
John M.K. (jconni) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 874880] Re: Ubuntu 11.10 Headphone-To-Speaker Switching for Intel HDA

Please get a log from Pulseaudio, as outlined here: https://wiki.ubuntu.com/PulseAudio/Log.

 affects ubuntu/alsa-driver
 status incomplete

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
John M.K. (jconni) wrote :

I now attach the log file, as requested.

The log corresponds to the following sequence of events

1) Play sound (no headphones plugged)

2) Plug headphones (not working)

3) Go to Soundpreferences->Output->Analog Speakers (now headphones working)

4) Unplug Headphones (speakers now normally working)

5) Plug Headphones again (nothing changed in sound preferences, so not working)

6) Unplug Headphones (again speakers working fine)

7) Stop logging.

Eugene San (eugenesan)
Changed in alsa-driver (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Raymond Chandler III (raymondchandleriii) wrote :

I don't even have the option under connector to switch to "Analog Speakers" instead of "Analog Headphones". Only "Analog Headphones" show regardless of if they are plugged in or not.

Revision history for this message
Rybec Thalin Arethdar (rybecdragonrod) wrote :

I, on the other hand, only have "Analog Speakers" show up, but not "Analog Headphones."

Revision history for this message
Gerwin (gerwin-kramer) wrote :

I'm having the exact same bug on asus n53s-sz404v. The workaround also works for me (switching to Analog Speakers when a headphone is plugged in), but it is a bit annoying.

Codec: Realtek ALC269VB
Codec: Intel CougarPoint HDMI

Revision history for this message
Sooraj (kasaragodsooraj) wrote :

Same issue and Same Fix on Lenovo Ideapad Y510.

Card: HDA Intel
Chip: Realtek ALC888

Revision history for this message
Vaughn Dewar (vaughn-dewar) wrote :

Switching to Analog speakers work for me too, but it's not the best solutions.

Revision history for this message
Alexey Brodkin (alexey-brodkin) wrote :

The same issue here with MSI Wind 90.
Workaround works, but I'm talking about netbook which is quite frequently being moved around the house and so each time I plug in external jack I have to switch output to "Analogue speakers" in "Sound settings".
At the same time on Acer Aspire 7720z I cannot reproduce this issue which is quite strange.

Revision history for this message
Alexey Brodkin (alexey-brodkin) wrote :

So after reading a bunch of different alsa-related solutions I tried to set my audio codec explicitly.
For this I followed this manual: https://help.ubuntu.com/community/HdaIntelSoundHowto

Basically I added to the end of /etc/modprobe.d/alsa-base.conf this line:
#========
options snd-hda-intel model=targa-2ch-dig
#========

At the moment it seems like my problem was solved. Without plugged-in jack sound comes from built-in speakers, while with plugged jack sound comes to external amplifier.

Here's a list with most of available model names:
=======
http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt
=======

I picked mine for "Targa/MSI with 2-channel" based on my netbook name.

So please try to find a proper model for your audio codec and hopefully your problem will be solved.

But anyway I'm still disappointed why I didn't have this issue before 11.10 (10.04 - 11.04 worked perfectly regarding audio things).

Revision history for this message
Rybec Thalin Arethdar (rybecdragonrod) wrote :

I went through that fix again (https://help.ubuntu.com/community/HdaIntelSoundHowto). I failed the first time, but my second try worked. I am working on a R61e Lenovo Thinkpad. The result of "cat /proc/asound/card0/codec* | grep Codec" was "Codec: Conexant CX20549 (Venice)" on my machine. The chipset is a Conexant 5045 (verified with a Google search of the Codec response above). The model that worked for me was "laptop-micsense". It is possible that "laptop-hpmicsense" would have been a better fit, but the first one worked for fixing the headphone issue and I have not discovered any other problems. (I just guessed, as none of the models listed under that chipset really looked like a good fit.)

I hope that someone will use this information to fix the root of this problem. I ended up spending several hours of research and testing to fix this on my computer, and I suspect that most people would just give up and leave with a bad feeling about Ubuntu.

Revision history for this message
Lele Long (schemacs) wrote :

Thanks to #12, you save me a lot of time. I use laptop-micsense as the model argument.

Revision history for this message
Gerwin (gerwin-kramer) wrote :

It seems to be fixed now on my laptop! It was probably an update (i updated my kernel to 3.1 and use proposed updates and some ppa's).

Revision history for this message
Wign (franciscowiegand) wrote :

Update to kernel 3.1 solve the problem in asus n53 (sv).

Revision history for this message
David Henningsson (diwic) wrote :

Hi everybody.

I recognize the driver problem the original reporter has, and I know it has been fixed upstream (and in the next version of ubuntu, 12.04). Therefore I'm marking this bug "Fix released".

The easiest way to test the new upstream drivers is to follow the instructions here: https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS

For the rest of you: if you have applied all updates to Oneiric, and tried the instructions at the link above, and still have a problem, please file a new bug as you're not having the same bug/root cause as the original reporter. Thank you!

Changed in alsa-driver (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jeffrey Luneau (jeffrey-luneau) wrote :

Hi,

You must open alsamixer in terminal and disabled Auto-Mute Mode.

Now when you plugged your headphones it doesn't switch to Analog Headphones in the sound settings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.