Disable PC speaker beep
The computer often seems to make beep noises 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.
They are often caused by the BIOS (Basic Input/Output System), the OS (Operating System), the DE (Desktop Environment), or other software programs. The BIOS is a particularly troublesome problem because it is kept inside an EPROM chip on the motherboard, and unless have a setting you can adjust in the BIOS setup 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. That beep sound is not addressed here.
However, everything else which can cause a sound to come out of the computer case speaker can be handled with the suggestions below.
- You can completely disable the PC speaker module at startup by adding
MODULES=( ... !pcspkr ... )
lsmod | grep snd-pcspreturns something, add
MODULES=( ... !snd-pcsp ... )
In this forum thread, it's recommended to add both to your
$ xset -b
You can add this command to a startup file, such as
~/.xinitrc, to disable it every time X starts.
$ setterm -blength 0
Similarly you can add it to
- Another way is to add this line to
set bell-style none
- 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
Scroll to PC beep and press 'M' to mute. Save your alsa settings:
# alsactl store
In order for this method to work, you must add alsa to the list of daemons in /etc/rc.conf
Have a look at these man pages for further information: xset(1), setterm(1), readline(3)