Stop sound from speakers when connecting headphones
Solution 1:
Follow these steps to automatically mute your speakers when plugging in headphones:
- Open Terminal (Ctrl+Alt+T)
- Type:
alsamixer
and press Enter/Return - Select the correct sound device by pressing F6
- Navigate to the right with → (Right Arrow key) until you highlight Auto-Mute
- Press ↑ (Up Arrow key) and select Enabled (or Line Out)
- Press Esc to exit
Solution 2:
Original Solution
-
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.
-
Setup necessary tools to compile this driver.
sudo apt-get install build-essential gcc make
-
Extract the downloaded file, run
sudo ./install
file from a terminal after going to the extracted folder to compile the driver. -
Read the
Readme.txt
file for more information. -
Install gnome-alsamixer by this command.
sudo apt-get install gnome-alsamixer
-
Open the gnome-alsamixer by typing alsamixer in the dash.
-
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)
-
Add this ppa by the command
sudo apt-add-repository ppa:ubuntu-audio-dev/alsa-daily
-
Update packages list. by
sudo apt-get update
-
Then install "alsa-hda-dkms" package:
sudo apt-get install alsa-hda-dkms
Reboot, And See the result!