Disable Beeper on Linux
I find the occasional BEEEEP coming from my PC speaker extremely annoying. My irritation is amplified tenfold by the fact that my ThinkPad's speaker is very, VERY loud.
After playing Whack-a-Mole for some time, attempting to disable the audible bell in various environments, I decided to take more destructive action.
To temporarily disable the Clangy McBangy, run the following command in the terminal:
sudo rmmod pcspkr
To prevent the speaker from loading at boot, you can blacklist the
module. Create or edit the file /etc/modprobe.d/nosound.conf
(or any
suitable name) and add the following line:
blacklist pcspkr
After blacklisting, update the initramfs:
sudo dracut -v -f
You should never hear that horrible noise again.