Nasser Heidari

2009-07-08

Disable Beep/Bell ( Hardware beep )

Filed under: freebsd,Linux — Nasser Heidari @ 06:55

Linux:
Linux kernel has PC speaker beeper driver called pcspkr.ko. This driver is responsible for generating beeps while working at shell prompt / x terminal. To turn off the beep, simply remove driver from kernel. You also need to black list this driver so that it will not get loaded automatically.

# rmmod -v pcspkr

to prevent this module load automatically when you reboot your pc:
Open /etc/modprobe.d/blacklist file and add pcspkr:

blacklist pcspkr

appending a module here prevents the hotplug scripts from loading it .

you can use this command To turn it back on:

# modprobe pcspkr 

FreeBSD:
To enable or disable bell use MIB hw.syscons.bell under FreeBSD operating systems. Type the following command to disable for current session:

# sysctl hw.syscons.bell=0

Make sure settings remains same after you reboot you pc, enter:

# echo "hw.syscons.bell=0" >> /etc/sysctl.conf

X11

If you are working with X11, you can turn off the console beep using the command xset.

To turn the console beep off enter:

# xset b off

To turn it back on, enter:

# xset b on

You can also set the volume and the pitch of the beep. This is not always supported, depending on the hardware.

However if you want to set volume and pitch you can do something like that:

# xset b 10 1000 100

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: