[request-sponsor] disable console bell in the kernel

2006-06-30 Thread Doug Scott
I have noticed, a few posts asking how to disable the console beep/bell on some 
laptops. While it is possible to disable some applications such as bash, and 
gnome, you should be able to disable it globally with the kdb command or in 
/etc/default/kbd. This can already be done for the keyboard click, and should 
be extended to the console bell.

The changes are relatively simple, as adding an option (-b on|off) and code 
similar to keyclick in /usr/src/cmd/kbd/kbd.c. The appropriate ioctl 
KBD_CMD_BELL and KBD_CMD_NOBELL are already in sys/kbd.h.

Possibly changes may need to made to /usr/src/uts/intel/io/beeper.c (and code 
for other platforms).

Doug
P.S. It has annoyed me enought to something about it :)
 
 
This message posted from opensolaris.org



[request-sponsor] disable console bell in the kernel

2006-06-30 Thread Alan Coopersmith
Doug Scott wrote:
 I have noticed, a few posts asking how to disable the console beep/bell on 
 some laptops. While it is possible to disable some applications such as bash, 
 and gnome, you should be able to disable it globally with the kdb command or 
 in /etc/default/kbd. This can already be done for the keyboard click, and 
 should be extended to the console bell.
 
 The changes are relatively simple, as adding an option (-b on|off) and code 
 similar to keyclick in /usr/src/cmd/kbd/kbd.c. The appropriate ioctl 
 KBD_CMD_BELL and KBD_CMD_NOBELL are already in sys/kbd.h.

Those ioctls don't make it so the bell doesn't sound in the future - they
are used for sounding the bell.   In the X server, to make a 100ms beep,
we do:
kbdCmd = KBD_CMD_BELL;
ioctl(fd, KIOCCMD, kbdCmd)
sleep for 100ms
kbdCmd = KBD_CMD_NOBELL;
ioctl(fd, KIOCCMD, kbdCmd)

You'ld need to add new ones to make a keyboard bell disabling command.

(When X is running xset b 0 disables the bell, but there's nothing
  similar for the console when not running X.)

-- 
-Alan Coopersmith-   alan.coopersmith at sun.com
 Sun Microsystems, Inc. - X Window System Engineering



[request-sponsor] disable console bell in the kernel

2006-06-30 Thread Darren J Moffat
Doug Scott wrote:
 I have noticed, a few posts asking how to disable the console beep/bell on 
 some laptops. While it is possible to disable some applications such as bash, 
 and gnome, you should be able to disable it globally with the kdb command or 
 in /etc/default/kbd. This can already be done for the keyboard click, and 
 should be extended to the console bell.
 
 The changes are relatively simple, as adding an option (-b on|off) and code 
 similar to keyclick in /usr/src/cmd/kbd/kbd.c. The appropriate ioctl 
 KBD_CMD_BELL and KBD_CMD_NOBELL are already in sys/kbd.h.
 
 Possibly changes may need to made to /usr/src/uts/intel/io/beeper.c (and code 
 for other platforms).

This will need ARC review so you will need an ARC sponsor was well. 
Whom ever steps up to be your code putback sponsor can help find an ARC
sponsor for you (hint I'm willing to do that bit).

-- 
Darren J Moffat