Friday, January 15, 2010

Linux Disable PC Speaker beeps

Runtime change

  • Check if you have the pcspkr module loaded.
#lsmod | grep pcspkr
pcspkr                  7105  0
  • Remove the module. lsmod will return nothing if the module was removed.
#rmmod pcspkr
#lsmod | grep pcspkr
  • Restore the module when done.
#modprobe pcspkr
#lsmod | grep pcspkr
pcspkr                  7105  0

Permanent change

  • Add the pcspkr module to the modprobe blacklist file.
# vi /etc/modprobe.d/blacklist
{Add the lines below to the file.}
# pcspkr - turn off pc speaker "BEEP!"
blacklist pcspkr
  • Reboot, and check if the pcspkr module was loaded. If the blacklist file kicked in then nothing will be returned.

No comments: