LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Internal Speakers Don't shut off When Connecting Headphones (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/internal-speakers-dont-shut-off-when-connecting-headphones-748712/)

skipjackrc4 08-19-2009 08:00 AM

Internal Speakers Don't shut off When Connecting Headphones
 
I recently bought a Lenovo u350. I'm running Ubuntu 9.10 alpha 3 (it's the only distro that would install on this new model). Mostly, everything works, but when I plug in headphones, the internal speakers keep playing. This is pretty bad when trying to watch hulu or a movie at night or listening to music in the library. Anybody have a solution?

Thanks,
Ben

GrapefruiTgirl 08-19-2009 09:22 AM

This is a known issue with **some** motherboards and/or **some** audio devices. However, in order for someone to help diagnose your exact situation, we need to know what audio device you are using. Also, I'm going to assume you're using ALSA, but if this is not correct, please advise.

So, to know your audio device, please provide the output of lspci -vvx and copy/paste the "Audio Device" section here for us.

Also, check in /proc/asound/ for a file called codec#0 and if that file exists, use the `cat` command to dump it to a text file, and paste that file's contents in here (the first dozen or so lines should have the necessary information I'm looking for, but it won't hurt to paste the whole thing).

Thanks.
Sasha

skipjackrc4 08-19-2009 04:58 PM

Here is what lspci has to say.
============================================================

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
Subsystem: Lenovo Device 3a0d
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 22
Region 0: Memory at f4600000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
00: 86 80 3e 29 06 01 10 00 03 00 03 04 10 00 00 00
10: 04 00 60 f4 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 0d 3a
30: 00 00 00 00 50 00 00 00 00 00 00 00 0a 01 00 00


================================================================

/proc/asound does not have the file you mentioned.

Thanks for the help. I'm using ALSA, as you guessed. 32 bit Ubuntu, if it matters.

Thanks,
Ben

GrapefruiTgirl 08-19-2009 05:27 PM

Oops, my mistake! The codec#0 file should be in /proc/asound/card0/codec#0 -- sorry about that. If you could post the first paragraph of that file using the method I gave earlier, I'll have a look into this a bit later this evening.

PS - how new is the laptop? Like, is it a brand-new model, or a few months+ old?

Cheers,
Sasha

skipjackrc4 08-19-2009 07:26 PM

I'm not sure if this is what you want or not.

Codec: Conexant ID 5066
Address: 0
Function Id: 0x1
Vendor Id: 0x14f15066
Subsystem Id: 0x17aa4001
Revision Id: 0x100300
No Modem Function Group found
Default PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0

skipjackrc4 08-19-2009 07:29 PM

I uploaded the entire file at www.conleymusic.net/audiofile.txt

GrapefruiTgirl 08-19-2009 08:42 PM

lenovo ALSA options
 
Ok, from what I can tell, there is no exact provision for the audio device in that laptop in the latest stable kernel ALSA driver, likely because the thing is very new. However, there are lots of other lenovo products that ARE supported, so I'm going to give you something(s) here to try. This comes with no guarantee that any of them will work, or if one of them DOES work, that it won't make some other aspect of the audio get weird.

There's no risk of damaging anything; if something doesn't work, just undo it or remove it.

FIRST: If you haven't yet tried running `alsaconf` as root, do try that first, following any instructions it gives you (mostly it's clicking yes or no) and when that's done, test your headphone jack. Chances are that it still will be the same, but we like to try the easiest things first ;)

Didn't help? Read on..

I don't use SuSE and am totally unfamiliar with it's ways of configuring things, so these instructions are *general* and apply to many Linuxes but not *every* Linux. If the SuSE way is a different location for the file I'm showing you here, then you or another SuSE user will have to straighten that part out and find the right location (the modprobe.conf file might be another place where this can be done).

Hopefully on your SuSE system, you have a folder called /etc/modprobe.d or a comparable location where you put options which get passed to kernel modules, like the sound modules, when they are loaded into the kernel. On my system, it uses /etc/modprobe.d so these instructions assume that location exists on yours too.

In that folder, see if you have a file called 'sound.conf' or something like this name, something that obviously looks like it's for the sound system. If you DO, rename it to something else temporarily (and while you're at it, paste its contents here for us).
Create a new file in there, called 'sound.conf' or some name like this that you like.
Inside the file, put the following lines:

Code:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=laptop

The bold word above can be one of: laptop, lenovo-sky, lenovo, lenovo-x200, lenovo-101e, lenovo-nb0763, lenovo-3000, or quanta

These are all the known lenovo (laptop) configurations I could find in the driver. They are in no particular order here.

So make and save this file, and delete any automatic backup file that's created by saving it.

Now, reboot and test the sound system and headphone operation and speaker operation. If it is fixed, hooray. If not, try the next of the bold options, save the file, delete any auto-backup, and reboot & try again. Repeat...

There's no guarantee here, but I hope that your machine is similar enough to one of the supported machines, that one of the existing options will work for it.

Good luck!
Sasha

business_kid 08-20-2009 03:16 AM

As an electronics hardware guy, I can tell you the problem. There is usually a mechanical switch in those sockets to do that. It's probably misbehaving.

GrapefruiTgirl 08-20-2009 08:53 AM

Quote:

Originally Posted by business_kid (Post 3650523)
As an electronics hardware guy, I can tell you the problem. There is usually a mechanical switch in those sockets to do that. It's probably misbehaving.

While the above is certainly possible, a brand new computer should not have 'misbehaving' hardware; that said though, please define 'misbehaving' in this context?

That computer has automatic jack-sensing, and using Linux/ALSA, particularly with very new machines, it doesn't always work as expected, and/or needs to be enabled (i.e. the ALSA driver needs to know that functionality exists for it to work right). Worst case, the OP will need to manually mute the speakers using Kmix or whatever mixer he/she has available, again subject to the mixer having the proper controls for the sound chip..

Here's a few more related links on the subject:

http://www.linuxquestions.org/questi...kers+headphone
http://www.linuxquestions.org/questi...kers+headphone

And this [solved] thread, which is particularly relevant to the current question:
http://www.linuxquestions.org/questi....-asus-734116/

Best of luck,
Sasha

skipjackrc4 08-20-2009 03:01 PM

I've been in class all day and haven't gotten a chance to try the ideas Sasha gave me. I've tried muting the internal speakers, but alsamixer only has a PCM control that affects headphones and speakers simultaneously. The computer is about a month old, so it probably isn't the jack. I don't know if Vista (what it came with) worked with the headphones or not, because the first thing I did was format the entire drive. I should have a chance to play around with it soon.

Thanks for posts and suggestions everyone.

Ben

repo 08-20-2009 03:08 PM

It is a linux problem.
I had the same problem on my debian install.
Searched for weeks for a solution,no go
Then I had a crash of the HD, and installed debian testing.
Problem solved, don't know what caused it though.
My guess would be alsa

GrapefruiTgirl 08-20-2009 03:09 PM

If the controls are lacking in your mixer, it's a decent sign that the device/driver is not configged right. I was missing buttons and controls too (on my desktop machine) until I passed the right option to my audio driver. Then suddenly I had a LOAD of new buttons & sliders :)

Best of luck,
Sasha

PS - remember to try 'alsaconf' as root first, provided SuSE has the tool. That may be enough to do it, if you haven't done it yet.

skipjackrc4 08-20-2009 03:14 PM

I'm adding those option lines to my /etc/modprobe.d/alsa-base.conf file. Is this the correct location?

GrapefruiTgirl 08-20-2009 03:16 PM

Yep, that's the one! Especially if it's the ONLY sound-ralated file in there.
If the file already contains stuff, please post it here, and back it up so you know how it WAS first..

And remember you need to reboot -- the sound module doesn't seem to like being removed while running, so the changes will take effect upon reboot.

Sasha

skipjackrc4 08-20-2009 08:35 PM

OK. I tried all the settings you listed, and none of them worked. The file did have some stuff in it--this is what it was originally (I appended the option lines on the end).

Code:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
options snd-usb-caiaq index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Power down HDA controllers after 10 idle seconds
options snd-hda-intel power_save=10

Oh, and by the way, I'm using Ubuntu, not Suse. I've tried to whole Suse thing and just can't quite seem to like it.

Thanks everyone for your help and responses. I just don't know enough about Linux to take care of this myself.


All times are GMT -5. The time now is 05:40 AM.