Jul
26
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”
Leave a Reply

So the question is: what is this not the default? Who, on earth, can find the system beep pleasant nowadays?
s/what/why/
Most easier is to set in ~/.inputrc
set bell-style none
Regards,
\sh
Like shermann said, and easier and non-root required way would be to add
setx -b
to your ~/.bashrc
This would have been useful at UbuntuLive. Did anyone else notice all the system beeps from people taking notes in Vim?
In vim, you simply have to “set visualbell”.
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.
[...] 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/ [...]
[...] 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 [...]
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.
[...] Turning Off The System (hardware) Beep (tags: beep howto ubuntu tutorial linux) [...]
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!
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.
[...] here for [...]
Thank you, this did the trick for fedora on vmware.
THANK YOU! I came close to prying my laptop open and hammering in that motherboard speaker.
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.