Blacklist your PC speaker

I hate the internal beep speaker. I hate it, I hate it, I hate it. :evil: Okay, maybe not that much hate, but I really don’t like having it enabled. It beeps anytime the terminal cursor goes in the wrong direction. Or if the sound isn’t working quite right when I’m setting things up. Or if it’s time to put another quarter in the dryer. It’s just a nuisance.

On some machines I’m fine — Dell’s BIOS, for example, sometimes includes the option to mute the darn thing. But on others I’m not so lucky.

The easiest way I know of — short of popping the case and yanking the cord to the case speaker — is to blacklist the pcspkr module. In Ubuntu, you can do that like this.

sudo nano -w /etc/modprobe.d/blacklist

At the end of the file, add this line.

blacklist pcspkr

Hopefully, that should keep it from ever mouthing off again.

In Arch, the same idea is handled in that lovely rc.conf file, where all the good stuff happens. Open your rc.conf. …

sudo nano -w /etc/rc.conf

(Yes, I use sudo in Arch. I’m a wimp.) Now find this line.

MOD_BLACKLIST=()

And change it to this.

MOD_BLACKLIST=(pcspkr)

Bingo. Silence. Now maybe I can get some work done. :twisted:

About these ads

10 Responses to “Blacklist your PC speaker”


  1. 1 Dr Small 2007/09/18 at 2:40 AM

    I miss the system beep on this new motherboard :’(
    It doesn’t have an internal speaker, I guess.

    Where would I look to find an internal speaker for my motherboard, to install on it ?

    Dr Small

  2. 2 xanthus 2007/09/18 at 6:40 AM

    It is better to put the blacklisted modules in a custom file (i.e. /etc/modprobe.d/my_custom_blacklist) because if you upgrade the system /etc/modprobe.d/blacklist can be overriden and you lost your blacklisted modules.

    Regards.

  3. 3 K.Mandla 2007/09/18 at 8:01 AM

    I tried that once, about a year ago, and it didn’t work for me. It’s possible I did it wrong; I’ll try that in the next install, and see if it works any better for me. Thanks.

  4. 4 K.Mandla 2007/09/18 at 8:03 AM

    @Dr Small: Usually the speaker itself is part of the case, and there’s a slim wire that leads from a jumper on the motherboard to the speaker. Every motherboard is different, of course. I guess you could check a parts store to see if they have mountable speakers, but I don’t know. You could also tear one out of a used case, and attach it to your present case if it doesn’t have one. :)

  5. 5 Luke 2007/09/18 at 10:16 AM

    This is a tad extreme approach. Have you tried simply adding:

    set bell-style none

    to your .bashrc, .bash_profile or .inputrc?

    Also, xset -b should disable it for the current X session. Or was that not enough for Arch?

  6. 6 K.Mandla 2007/09/18 at 3:35 PM

    I’ll try all three of these. I learned to blacklist the module from the Arch wiki, and just translated it to Ubuntu later. If I’m right, that will only work on a per-user basis, won’t it? I’ll have to try; I don’t want the bell to ring in a root session of nano. :|

  7. 7 GoofY 2007/11/04 at 8:48 PM

    Great artikle, it drove me nuts when I was trying out things. Problem is I couldn’t find out whether it could be a bit more silent, though I don’t think so cause it’s only a beep thingie.

  8. 8 Paul Roach 2008/05/01 at 1:37 AM

    My god…..that’s may my day/week/year and those of my colleagues who share an open-plan office with me…..

    THANKYOUTHANKYOUTHANKYOU :D

  9. 9 RusFuture 2008/06/08 at 1:17 AM

    Hi,

    This was very, very useful information for me. I used your
    note on how to do the “blacklist” to remove the loading of
    my pcspkr speaker driver, on my Fedora 9 DEC-5000 box. This
    has been a *VERY GOOD THING*, as the pcspkr driver apparently
    was conflicting with my “snd-cs4236″ sound card driver, and
    now I have *music*!! (as well as not having the damn
    beeping speaker…) I had put the set no-bell option in
    my runcontrol files, but still got the beep in the vi editor,
    by the way, so this approach is still useful, even if all you
    want to do is whack the annoying beeping.
    Thanx for this.
    - Rus

  10. 10 jan 2009/03/13 at 7:42 AM

    THANKS
    there is always some app i could not control.
    when using headphones the beep really destroyed my ears.

    Never thought to disable in kernel. thanks again for this simple solution.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,959,958 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: