File:  [NetBSD Developer Wiki] / wikisrc / tutorials / how_to_turn_off_console_beep.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sun Nov 20 20:55:21 2011 UTC (2 years, 4 months ago) by mspo
Branches: MAIN
CVS tags: HEAD
import all of the how-to articles from the pkgsrc.se wiki

Sometimes it is necessary to be more quiet, when using the shell. For example, when working in groups, or if you're just annoyed of the beep. 

  
The console beep can be effectively disabled by disabling the pcppi driver in the kernel. This is done during kernel configuration by finding and commenting out the lines referring to the pcppi(4) driver and its attached child devices in the kernel configuration file, e.g. "sysbeep at pcppi" on i386. See the NetBSD Guide for information on compiling customised kernels. 

  
In the event the user must use a precompiled kernel that has the sysbeep device enabled, the pcppi driver and attached devices can be interactively disabled at boot time, via userconf(1), as follows: 

  
1. Select "Drop to boot prompt" at the boot menu. 

  
2. Enter "boot -c" to begin interactive boot using userconf(1). 

  
3. Disable the pcppi driver and its attached devices using the "disable" command. Type "?" or "help" at the "uc>" prompt for a list of the userconf(1) commands and their syntax. You may find the device numbers of "sysbeep at pcppi" and associated pcppi device drivers using the "list" command. Type "quit" when done disabling the pcppi devices. 

  
These methods should work on any hardware. 

  
Alternatively, there are several ways to disable the beep after the system has booted and the user has logged in, as described below. 

  
On the console you can set the volume of the console beep with [[basics/wsconsctl]]. 

To display the current volume enter: 
    
    # wsconsctl bell.volume
    

You can control the volume setting different values. To turn the volume off enter: 
    
    # wsconsctl -w bell.volume=0
    

This may not work on every hardware. The solution is to set the the bell pitch to 0 Hz. 
    
    # wsconsctl -w bell.pitch=0
    

The bell pitch defaults to 1500 Hz. Sometimes a lower value is more comfortable. Just keep trying. 

#  X11 

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

If you are using modular Xorg you need to install [[basics/xset]], it is under x11/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
    

#  See also 

  * [wsconsctl(8)](http://netbsd.gw.com/cgi-bin/man-cgi?wsconsctl+8+NetBSD-current)


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb