# Disable/change audio bell



## ybungalobill (Mar 22, 2013)

The audio bell is painfully loud when I use my headphones on my laptop. I successfully disabled it in the terminal using [cmd=]kbdcontrol -b 0.0[/cmd]. For Xorg I tried [cmd=]xset -b[/cmd], however it disables it only in some cases, like pressing backspace on an empty line in xterm. In other cases, like when there is no match when I do a "find" in Firefox, it still painfully beeps.

If I understand correctly, this beep is handled at a lower level, and bypasses the audio driver. The mixer settings have no effect on its volume. I do not know what system interface it uses exactly, however. If I knew, I could recompile the relevant parts.

Q: How can I globally (in the order of preference):


customize the beep with an arbitrary PCM audio?
 get it affected by the mixer volume?
 turn it off?

Any help is welcome!

P.S. This is my day 3 using FreeBSD, and this is the first UNIX-like system I own.


----------



## cpm@ (Mar 22, 2013)

You can disable bell if you set MIB hw.syscons.bell value to 0. Just type `# sysctl hw.syscons.bell=0`

To save changes permanently after reboot your machine `# echo "hw.syscons.bell=0" >> /etc/sysctl.conf`


----------



## ybungalobill (Mar 22, 2013)

Yes, this solved it! Thanks!


----------



## ybungalobill (Oct 11, 2016)

The proposed solution stopped working in FreeBSD 11.0. Now I managed to disable it through `# sysctl kern.vt.enable_bell=0`, or to make it permanent: `# echo "kern.vt.enable_bell=0" >> /etc/sysctl.conf`.

If there is a "more correct" way of doing it, you are welcome to share.


----------



## cpm@ (Oct 11, 2016)

ybungalobill said:


> The proposed solution stopped working in FreeBSD 11.0. Now I managed to disable it through `# sysctl kern.vt.enable_bell=0`, or to make it permanent: `# echo "kern.vt.enable_bell=0" >> /etc/sysctl.conf`.
> 
> If there is a "more correct" way of doing it, you are welcome to share.



According to the vt(4) man page you can add

```
kern.vt.enable_bell=0
```
in loader.conf(5) or sysctl.conf(5).


----------

