Disabling built-in speaker in Linux

4

My workstation has a built-in speaker that, surprisingly, plays audio very well. I also have external speakers hooked up to the audio out jack which are easier to hear. Unfortunately, when I try to play some audio material, sound comes out of both the external speakers and the built-in speaker on the workstation.

I'd like to disable the speaker inside the machine, and just plug in head-phones to the external speaker so I can listen to training material at work without bothering my office mate. I'm not sure how to do this in Linux (Suse Enterprise Desktop 11). Fiddling around with the Gnome audio tools doesn't list two different audio devices on the machine.

From what I can tell, sound is played through the ALSA system. I looked in my home directory and there is no .asoundrc controlling configuration.

I should also add that I check in the BIOS for a way to disable the built-in speaker, but I could not find such a setting.

Dr. Watson

Posted 2010-01-28T16:59:32.593

Reputation: 371

if there's no .asoundrc you're probably getting system defaults. you can create your own .asoundrc to override the defaults, it doesn't need to already exist. – quack quixote – 2010-01-28T18:25:30.180

Answers

2

You could open up the case and pull the plug connecting the internal speaker to the motherboard.

Sven

Posted 2010-01-28T16:59:32.593

Reputation:

3Possibly, but maybe not in a work environment (locked machines) – Rob – 2011-12-14T15:40:09.273

It is what I ended up doing. My SysAdmin told me to do it too! :) I think he just didn't want to deal with me. – Dr. Watson – 2013-07-28T21:41:00.560

2

I would modprobe -r pcspkr; then sudo nano /etc/modprobe.d/blacklist.conf, where I would add blacklist pcspkr.

Chances are you haven't the pcspkr but the snd_pcsp module instead: in that case you have just to put snd_pcsp instead of pcspkr in the commands above.

Hope that helps,

Regards

dag729

Posted 2010-01-28T16:59:32.593

Reputation: 1 894

I was able to run 'modprobe -r pcspkr', but when I played the test sound in Gnome's "Sound Preferences", I could still hear the sound. When I tried 'modprobe -r snd_pcsp', I got a "FATA: Module snd_pcsp not found" message. – Dr. Watson – 2010-01-28T17:19:10.193

1pcspkr is only used for beeps and blips, it's not used when you play actual audio files/recordings/music/etc. So this is not the correct answer. – davr – 2010-01-28T17:46:51.970

Upvoted because a google search for disabling terminal beep brought me to this question, and this answer was the one I wanted. I remembered pcspkr, but I always forget about snd_pcsp... – Parthian Shot – 2015-07-06T23:14:57.620

1

alsamixer is the alsa provided ncurses GUI for accessing hardware mixer elements, and if any application at all is capable of seperately turning off the internal speaker, it will likely be possible in alsamixer. Many mixer applications are fairly generic, and do not customize for the specific capabilities of the hardware the way alsamixer does. Look for a control labeled "internal speaker" or something similar. m will mute / unmute any muteable channel in the alsamixer interface. h will open the help window, and Escape will exit.

Also, if you want raw access to sound card parameters, amixer -c<n> should provide that list, and amixer -c<num> set <SCONTROL> mute will mute a mutable control by name. Be sure to check out various values of <n> with amixer, because for example pulseaudio often creates an extra virtual device. The -c argument for selecting a sound card also works with alsamixer or alsamixergui (the X11 version of alsamixer).

Justin Smith

Posted 2010-01-28T16:59:32.593

Reputation: 3 746

1

I know this is old, but I have a solution to share for anyone who may stumble upon this post in search for a solution later on. You will need to install alsamixer if you don't have it already installed. In terminal, run the command "alsamixer". Then arrow key over to "Mono". With Mono selected, you then press "M" on your keyboard to mute it and then press "Esc". That's it! :-)

Joshua

Posted 2010-01-28T16:59:32.593

Reputation: 11