Saturday, December 13, 2008

Linux : Turning Off The System (hardware) Beep

The system speaker is controlled by a driver in the Linux kernel. This allows the pc speaker to beep at you for different reasons or at different events. If you remove the module which drives the speaker, the beeping goes away, as the machine no longer knows how to interface with that device.
This can be done manually with a command such as:

sudo modprobe -r pcspkr

or you can set it as a persistent change by adding the module to your system driver blacklist, available at:

/etc/modprobe.d/blacklist

simply append the line “blacklist pcspkr” for that driver to be disregarded at every boot.

If you’d like to manually re-insert the module use:

sudo modprobe pcspkr

Enjoy Silence.

-Mihir


No comments: