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:

8 Responses to “Blacklist your PC speaker”


  1. 1 Dr Small September 18, 2007 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 September 18, 2007 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 September 18, 2007 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 September 18, 2007 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 September 18, 2007 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 September 18, 2007 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 November 4, 2007 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 May 1, 2008 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

Leave a Reply




Welcome!

Most recent desktop


May 8, 2008
XFCE 4.4.2 on Crux Linux
750Mhz Celeron 128Mb PC100

Most recent game

Gnome Mahjongg on Debian 550Mhz Celeron 192Mb PC100

Be counted!

License

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

Blogs worth watching

Ubuntu Feeds

Blog Stats

  • 597,604 hits

Categories