Possible Duplicate:
Sound comes out of my speakers even when headphones are plugged in
How can I mute the speakers when the headphones are plugged in?
I have searched all over the internet and although there are many threads that discuss this, none has worked for me.
I have tried alsamixer and installing linux-backports-modules-alsa-lucid-generic, but neither worked. The Speakers just wont mute when I plug in the headphones. I had this problem in 11.04 and hoped it would be one of the headaches to go away when I downgraded to Lucid Lynx.
cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC665
Codec: Intel CougarPoint HDMI
Model Name: Alienware M14xR1 (PS: I am not a gamer so I have no attachment to Windows :) )
$ lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 05)
$ sudo lshw -c sound
*-multimedia
description: Audio device
product: Cougar Point High Definition Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 05
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=HDA Intel latency=0
resources: irq:50 memory:da800000-da803fff
Did you see the answers to this question? There are a million ways of wiring these audio chips, so can you please add the model name of your laptop? Also have a look at this bug. You need to find the right model, maybe this list helps.
Lucid is a year older than your Sandy Bridge laptop, so I guess it would be better if you install 11.04 or wait two months and install 11.10.
I don't know how you could automatically do this but while you are waiting for a permanent solution assigning
amixer sset Speaker toggle
to a keyboard shortcut should help you.You could also turn your speakers off from the sound menu