Disable PC speaker beep
Introduction
The computer often seems to make beep noises or other sounds at various times, whether we want them or not. They come from various sources, and as such, you may be able to configure if or when they occur.
The sounds are caused by the BIOS (Basic Input/Output System), the OS (Operating System), the DE (Desktop Environment), or various software programs. The BIOS is a particularly troublesome problem because it is kept inside an EPROM chip on the motherboard, and the only direct control the user has is by turning the power on or off. Unless the BIOS setup has a setting you can adjust or you wish to attempt to reprogram that chip with the proper light source, it is not likely you will be able to change it at all. BIOS-generated beep sounds are not addressed here, except to say that unplugging your computer case speaker will stop all such sounds from being heard. (Do so at your own risk.)
However, everything else which can cause a sound to come out of the computer case speaker can be handled with the suggestions listed below.
One should also note that the option of turning off a particular instance of a sound, while leaving the others operational, is possible if one can identify which portion of the environment is the source of the particular sound generation. This can make a very customized selection of attention-getting sounds possible. Please feel free to add your findings to this wiki page when you find particular examples of settings combinations which may be useful for other users.
Globally
You can completely disable the PC speaker module at startup by adding Template:Codeline to the [[rc.conf#Hardware|Template:Codeline array]] in Template:Filename:
MODULES=( ... !pcspkr ... )
If Template:Codeline returns something, also add Template:Codeline:
MODULES=( ... !snd-pcsp ... )
In this forum thread, it's recommended to add both.
Locally
In X
$ xset -b
You can add this command to a startup file such as xprofile to make it permanent.
In console
You can add this command in Template:Filename or a dedicated file like Template:Filename (must be executable):
setterm -blength 0
Another way is to add or uncomment this line in Template:Filename or Template:Filename:
set bell-style none
Using ALSA
Try muting the PC Speaker:
$ amixer set 'PC Speaker' 0% mute
For certain sound cards, it is the PC Beep:
$ amixer set 'PC Beep' 0% mute
You can also use alsamixer for a console GUI
$ alsamixer
Scroll to PC beep and press 'M' to mute. Save your alsa settings:
# alsactl store
In order for this method to work, Template:Codeline must be in your [[rc.conf#Daemons|Template:Codeline array]] in Template:Filename.
Resources
Have a look at these Template:Codeline pages for further information: Template:Codeline, Template:Codeline, Template:Codeline.