The PC speaker "beep" aka alerts / audio alerts.
Testing if you can beep ∞
There is an "alert" escape code. You can use it like so:
echo -e "\a"
control-alt-f1and log in at the console.
- Then try the above command.
To get back, log out and then press
If you get no sound at the console, then begin troubleshooting the console before X.
If yo you do get sound at the console, then obviously you can skip console troubleshooting and go straight into troubleshooting X and any terminal(s) you use.
beepis installed in some distributions, but not PCLinuxOS. =/
- Various alerts and beeps are available in most programming languages, but I'd prefer a simple standalone application.
Walk through each of these items in turn.
- Some computers have no PC speaker.
The PC speaker may be physically disconnected.
Some CMOS' have the PC speaker disabled.
Check yours. For most, they press delete on startup. Check your bootup messages to learn how you can do this.
Be careful, and don't change other settings if you don't know what you're doing.
kernel module ∞
Some people have the PC speaker compiled as a kernel module rather than having it compiled in. So it may not be loaded. Check if it exists as a module.
modprobe -l|grep $MODULE
Or for the cut-and-paste types..
MODULE=pcspkr # MODULE="usb-interface" # for testing with a module which I know exists # MODULE="xcbc" # for testing with a module which I know exists if [ "`modprobe -l|grep $MODULE`" ]; then echo "$MODULE is a kernel module." # I'm not sure how to test if a module is actually loaded. # modprobe -r $MODULE --dry-run 2> /dev/null; result=$? # if [ "$result" -ne 0 ]; then # echo "$MODULE is a kernel module, and it is not loaded" # else # # got a 0 # echo "$MODULE is a kernel module, and it is loaded" # fi else echo "$MODULE is not a kernel module" fi
Someone else's code has this to disable the beep. I'm not sure what it means. I cannot try it, because pcspkr is not a module for me.
(echo '#!/bin/sh'; echo 'modprobe -r pcspkr') > /etc/sysconfig/modules/pcspkr.modules chmod +x /etc/sysconfig/modules/pcspkr.modules
Another note says to disable the beep, check
/etc/modprobe.d/blacklist for "blacklist pcspkr" and then run
To disable it..
set bell-style visible
set bell-style none
... then log out and back in. But you'll have to add this to every account you want to disable it for. Adding it to
/etc/inputrc didn't work for me. I think because I'm using Red Hat Linux 5.2 (kernel 2.0.34) on here.
I added the line "set bell-style none" to the file
~/.inputrcthen logged out and back in and it worked right away. But you'll have to add
xset b on
This doesn't work for me.
To disable it in all terminals, edit
setterm -bfreq 0