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:
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!
So the question is: what is this not the default? Who, on earth, can find the system beep pleasant nowadays?
Most easier is to set in ~/.inputrc
set bell-style none
Like shermann said, and easier and non-root required way would be to add
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.
Pingback: Famous last words of Marius » From my RSS feedreader to the world — 28 July 2007
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.
Pingback: It tastes like burning : Blog Archive : links for 2007-09-07
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!
Or change the frequency of the beep (in shell)
setterm -blength 0
the number is the frequency, so ‘0’ turns it off.
Pingback: hubab » Turning Off The System (hardware) Beep : Linux Tutorial
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?
I kind of like the system speaker. It almost never rings for me, and you can make a simple script to have it ring at random times to piss off people. I bet there’s some way of playing music through it too (or something like that). In fact, I can’t figure out how to _enable_ the system beeps on my Gentoo system!
My laptop doesn’t POST beep and GoboLinux doesn’t appear to even HAVE the pcspkr module.
If I can’t get it to STFU, I might just open my laptop and hack off the wires.
There are a bunch of ways to accomplish the goal, but this is by far the simplest, most practical, and takes the least time.
Excellent – a huge thanks for the tip. I’d completely forgotten how to do this until I literally “fell over” your post via our perpetual friend Google.
ACE! Thanks much!!!
Under Ibex, the pc speaker module is not loaded but it still makes the annoying beep… If you’re using Compiz, the easiest way is to disable is using Compiz manager under ‘general’. Changing the preference under system/sound does not work, apparently Compiz overrules this. Thanks to ‘Subbu’ for the tip..
My boyfriend is such a light sleeper.
He’s on the bedroom, and I’m on the kitchen, and he wakes up everytime the computer beeps.
And I almost drop what I have on my hand, when I hear that beep.
But it sure wakes me up when I’m browsing source-code, and I’m getting sleepy… *BEEP*!
Thank you. 🙂
I use Ubuntu 8.10 (Intrepid Ibex), and the above commands didn’t work for me. I don’t want the Compiz effect either, it’s almost even more annoying.
I found the toggle:
Preferences | Sounds | on the “sounds” tab: toggle off “play alert sound”
THANK YOU !!
It works fine for me on ubuntu 9.04 jaunty.
Thanks for the help.
It sounds great to turn off speaker to turn off shutdown and backspace sounds. But it ‘s very idiot to turn off speaker for all purposes. I wonder whether above commands turn off pc speaker for all beeps. If yes, it’s not very wise.
Thanks man! That stupid shutdown beep was driving me crazy.
thx a lot for covering this up. Sitting in an open office with 10 people around you using Ubuntu with enabled internal speakers is quite a pain in the butt. Told everybody to do these steps and now it's silence! Thank you again.
thank you so much!
IN Ubuntu 9.04:
System –> Preferences –> Sounds –> Sound tab –> Visual Alert —> Window
So you don't miss the message after you follow everyone else's "how to disable".
toggle "play alert sound"
set bell-style none
A much less intrusive way (not sure whether it removes the shutdown beeps) is to lower the volume for the pc speaker in the control volume, assuming your environment has one. This works in ubuntu 9.
“Silence! I kill you!”
thanks you ! I made it
I tried everything (ubuntu 10.04), in the end it was the Bios
Check this website for an updated solution: http://www.thinkwiki.org/wiki/How_to_disable_the_pc_speaker_(beep!)
In my case (Ubuntu 10.04) the faulty module was snd_pcsp and not pcspkr