I was reminded this week of something that I often show people but I have never actually written down in a post. This may be old news to some of you, but when has that stopped me in the past!?

Now I should preface this with a warning that my boss pointed out to me. He says “the system beeps for a reason–it’s trying to tell you something–you should leave it on.” Now that is out of the way I’ll go ahead with how to disable the PC Speaker, which removes the often annoying beeps. It should be mentioned that this should work on any distribution, and is not Ubuntu specific.

Removing the driver

The system speaker is controlled by a driver in the Linux kernel. This allows the pc speaker to beep at you for different reasons or at different events. If you remove the module which drives the speaker, the beeping goes away, as the machine no longer knows how to interface with that device.
This can be done manually with a command such as:

sudo modprobe -r pcspkr

or you can set it as a persistent change by adding the module to your system driver blacklist, available at:

/etc/modprobe.d/blacklist

simply append the line “blacklist pcspkr” for that driver to be disregarded at every boot.

If you’d like to manually re-insert the module use:

sudo modprobe pcspkr

Enjoy the quiet!

I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.

Related Posts

Random Posts

Comments

17 Responses to “Turning Off The System (hardware) Beep : Linux Tutorial”

  1. 1052 on July 26th, 2007 4:16 am

    So the question is: what is this not the default? Who, on earth, can find the system beep pleasant nowadays?

  2. 1052 on July 26th, 2007 4:16 am

    s/what/why/

  3. shermann on July 26th, 2007 5:55 am

    Most easier is to set in ~/.inputrc

    set bell-style none

    Regards,

    \sh

  4. Luke Hoersten on July 26th, 2007 7:02 am

    Like shermann said, and easier and non-root required way would be to add
    setx -b
    to your ~/.bashrc

  5. erik on July 26th, 2007 8:26 am

    This would have been useful at UbuntuLive. Did anyone else notice all the system beeps from people taking notes in Vim?

  6. Athropos on July 26th, 2007 10:29 am

    In vim, you simply have to “set visualbell”.

  7. kh on July 26th, 2007 11:11 am

    The system beeps you (may) get at power-on are important, as the number of them identify a certain hardware problem.

    Within the OS, they’re just annoying and unnecessary.

  8. Famous last words of Marius » From my RSS feedreader to the world — 28 July 2007 on July 28th, 2007 12:46 am

    [...] For the die hard Linux users out there of which I am one.  Turning Off The System (hardware) Beep — http://ubuntu-tutorials.com/2007/07/26/turning-off-the-system-hardware-beep-linux-tutorial/ [...]

  9. Peregrine on July 28th, 2007 2:35 am

    [...] those who might balk at the configuration work found in Christer’s recent post, Turning Off The System (hardware) Beep : Linux Tutorial, I have a solution for you. You can order this simple device and reuse again and again after [...]

  10. Subbu on September 7th, 2007 9:17 am

    If you have compiz running, you could replace PC Speaker with Visual Bell. So you really don’t miss the alert.

    This is available in the general settings option in the compiz settings manager.

  11. It tastes like burning : Blog Archive : links for 2007-09-07 on September 7th, 2007 3:17 pm

    [...] Turning Off The System (hardware) Beep (tags: beep howto ubuntu tutorial linux) [...]

  12. Cyde Weys on October 9th, 2007 2:27 pm

    Thanks for the advice. I read some bad advice on another blog that said there was no universal way to disable the system bell, so I went around figuring out how to disable it in a bunch of different applications. And then of course I was always running into applications that I hadn’t turned it off in yet. Turns out there is a way to disable the system bell globally - thanks so much!

  13. lx on October 15th, 2007 1:43 am

    try
    xset -b
    in ~/.bashrc

    Or change the frequency of the beep (in shell)
    setterm -blength 0

    the number is the frequency, so ‘0′ turns it off.

  14. hubab » Turning Off The System (hardware) Beep : Linux Tutorial on October 22nd, 2007 8:58 am

    [...] here for [...]

  15. bryan on November 5th, 2007 2:05 pm

    Thank you, this did the trick for fedora on vmware.

  16. norwizzle on December 1st, 2007 12:55 am

    THANK YOU! I came close to prying my laptop open and hammering in that motherboard speaker.

  17. Dré on December 31st, 2007 4:48 am

    I would like to disable the system bell when I use the ’shutdown’ command. (I would like to keep the driver loaded…) Because the bell rings every minute. It seems, however, that the proposed solutions ( putting stuff in .bashrc and .inputrc ) don’t work when using a sudo-command. I looked at the source of shutdown but I could’n figure out where the bell is generated. Is there a solution?
    Thanks.

Leave a Reply




    Subscribe to the RSS feed!


    subscribe to the ubuntu tutorials RSS feed

    Get Ubuntu!


    Obama '08


    Obama '08 - Change We Can Believe In

  • Blogroll

  • Ads by Google