Difference between revisions of "Disable PC speaker beep"

From ArchWiki
Jump to: navigation, search
(fix headings; use i18n template)
Line 1: Line 1:
 
[[Category:Sound (English)]]
 
[[Category:Sound (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
{{i18n_links_start}}
+
{{i18n|Disable PC Speaker Beep}}
{{i18n_entry|English|Disable the PC speaker beep}}
+
{{i18n_entry|Česky|Zakázání PC repráčku}}
+
{{i18n_entry|Русский|Отключение PC Speaker}}
+
{{i18n_entry|Українська|Вимкнути PC Speaker}}
+
{{i18n_entry|简体中文|禁用喇叭 (简体中文)}}
+
{{i18n_entry|Български|Disable PC Speaker Beep (Български)}}
+
{{i18n_links_end}}
+
  
= Globally =
+
== Globally ==
 
* You can completely disable the PC speaker module at startup by adding <code>!pcspkr</code> to the <code>MODULES</code> array in <code>/etc/rc.conf</code>:
 
* You can completely disable the PC speaker module at startup by adding <code>!pcspkr</code> to the <code>MODULES</code> array in <code>/etc/rc.conf</code>:
 
  MODULES=( ... !pcspkr ... )
 
  MODULES=( ... !pcspkr ... )
Line 19: Line 12:
 
In [http://bbs.archlinux.org/viewtopic.php?pid=557665#p557665 this] forum thread, it's recommended to add both to your <code>/etc/rc.conf</code>.
 
In [http://bbs.archlinux.org/viewtopic.php?pid=557665#p557665 this] forum thread, it's recommended to add both to your <code>/etc/rc.conf</code>.
  
= Locally =
+
== Locally ==
==In X==
+
===In X===
 
  $ xset -b
 
  $ xset -b
 
You can add this command to a startup file, such as <code>~/.xinitrc</code>, to disable it every time X starts.
 
You can add this command to a startup file, such as <code>~/.xinitrc</code>, to disable it every time X starts.
==In Console==
+
 
 +
===In console===
 
  $ setterm -blength 0
 
  $ setterm -blength 0
 
Similarly you can add it to <code>~/.bashrc</code>.
 
Similarly you can add it to <code>~/.bashrc</code>.
Line 29: Line 23:
 
* Another way is to add this line to <code>~/.inputrc</code>:
 
* Another way is to add this line to <code>~/.inputrc</code>:
 
  set bell-style none
 
  set bell-style none
==Using ALSA==
+
 
 +
===Using ALSA===
 
* Try muting the PC Speaker:
 
* Try muting the PC Speaker:
 
  $ amixer set 'PC Speaker' 0% mute
 
  $ amixer set 'PC Speaker' 0% mute
Line 41: Line 36:
 
In order for this method to work, you must add '''alsa''' to the list of daemons in ''/etc/rc.conf''
 
In order for this method to work, you must add '''alsa''' to the list of daemons in ''/etc/rc.conf''
  
 +
==Resources==
 
Have a look at these '''man pages''' for further information: ''xset(1), setterm(1), readline(3)''
 
Have a look at these '''man pages''' for further information: ''xset(1), setterm(1), readline(3)''

Revision as of 14:38, 4 March 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Globally

  • You can completely disable the PC speaker module at startup by adding !pcspkr to the MODULES array in /etc/rc.conf:
MODULES=( ... !pcspkr ... )
  • If lsmod | grep snd-pcsp returns something, add !snd-pcsp:
MODULES=( ... !snd-pcsp ... )

In this forum thread, it's recommended to add both to your /etc/rc.conf.

Locally

In X

$ xset -b

You can add this command to a startup file, such as ~/.xinitrc, to disable it every time X starts.

In console

$ setterm -blength 0

Similarly you can add it to ~/.bashrc.

  • Another way is to add this line to ~/.inputrc:
set bell-style none

Using ALSA

  • Try muting the PC Speaker:
$ amixer set 'PC Speaker' 0% mute

For certain sound cards, it is the PC Beep:

$ amixer set 'PC Beep' 0% mute

You can also use alsamixer for a console GUI

$ alsamixer

Scroll to PC beep and press 'M' to mute. Save your alsa settings:

# alsactl store

In order for this method to work, you must add alsa to the list of daemons in /etc/rc.conf

Resources

Have a look at these man pages for further information: xset(1), setterm(1), readline(3)