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. For situations where no sound card or speakers are available and a simple audio notification is desired, see #Beep.
Sounds from the computer can be heard from the built-in case speaker, the speakers, or headphones which are plugged into the soundcard (in which case the noise may be unexpectedly loud).
Disable PC Speaker
Turning off a particular instance of a sound, while leaving the others operational, is possible if and only if one can identify which portion of the environment generates the particular sound. This allows customizing the selection of sounds. Please feel free to add any configurations and settings to this wiki page that may be useful for other users.
# rmmod pcspkr
# echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
Blacklisting it on the kernel command line is yet another way. Simply add
modprobe.blacklist=pcspkr to your bootloader's kernel line.
$ xset -b
You can add this command to a startup file such as
/etc/xprofile to make it permanent. See xprofile for more information.
You can add this command in
/etc/profile or a dedicated file like
setterm -blength 0
Another way is to add or uncomment this line in
set bell-style none
For most sound cards the PC speaker is listed as an ALSA channel, named either PC Speaker, PC Beep, or Beep. To mute the speaker, either use alsamixer or amixer:
$ amixer set channel 0% mute
To unmute the channel, see Advanced Linux Sound Architecture#Unmuting the channels.
$ gsettings set org.gnome.desktop.wm.preferences audible-bell false
Cinnamon seems to play a "water drop" sound. To disable it, set in dconf:
$ dconf write /org/cinnamon/desktop/wm/preferences/audible-bell false
Append this line to
gtk-error-bell = 0
Add the same line to the [Settings] section of
[Settings] gtk-error-bell = 0
This is documented in the Gnome Developer Handbook.
Beep is an advanced PC speaker beeping program. It is useful for situations where no sound card and/or speakers are available, and simple audio notification is desired.
Install the package.
Access for non-root users
beep will fail if not run by the root. Other users may call it using sudo. To let group
sudo beep without a password (for example to use it in scripts),
/etc/sudoers should be edited:
%users ALL=(ALL) NOPASSWD: /usr/bin/beep
or, to let only a single user do that:
username ALL=(ALL) NOPASSWD: /usr/bin/beep
Another way is setting the sticky bit on
# chmod 4755 /usr/bin/beep
Note however that this way anyone can execute
/usr/bin/beep with root permissions. The change also creates a difference between local copy and the package, which will be reported by
Tips and Tricks
While many people are happy with the traditional beep sound, some may like to change its properties a bit. The following example plays slighly higher and shorter sound and repeats it two times.
# beep -f 5000 -l 50 -r 2
- , ,