Difference between revisions of "Disable PC speaker beep"

From ArchWiki
Jump to: navigation, search
(Add section Introduction)
(templates; bashrc→/etc/profile; xinitrcxprofile)
Line 4: Line 4:
  
 
== Introduction ==
 
== Introduction ==
The computer often seems to make beep noises at various times, whether we want them or not.  They come from various sources, and as such, you may be able to configure if or when they occur.
 
  
They are often caused by the BIOS (Basic Input/Output System), the OS (Operating System), the DE (Desktop Environment), or other software programs. The BIOS is a particularly troublesome problem because it is kept inside an EPROM chip on the motherboard, and unless have a setting you can adjust in the BIOS setup or you wish to attempt to reprogram that chip with the proper light source, it is not likely you will be able to change it at all. That beep sound is not addressed here.
+
The computer often seems to make beep noises at various times, whether we want them or not. They come from various sources, and as such, you may be able to configure if or when they occur.
 +
 
 +
They are often caused by the BIOS (Basic Input/Output System), the OS (Operating System), the DE (Desktop Environment), or other software programs. The BIOS is a particularly troublesome problem because it is kept inside an EPROM chip on the motherboard, and unless it has a setting you can adjust in the BIOS setup or you wish to attempt to reprogram that chip with the proper light source, it is not likely you will be able to change it at all. That beep sound is not addressed here.
  
 
However, everything else which can cause a sound to come out of the computer case speaker can be handled with the suggestions below.
 
However, everything else which can cause a sound to come out of the computer case speaker can be handled with the suggestions below.
  
{{Note|One should also note that the option of turning off a particular instance of the sound, while leaving the others operational, is possible if one can identify which portion of the environment is the source of the particular sound generation. This can make a very customized selection of attention-getting sounds possible. Please feel free to add your findings to this wiki page when you find particular examples of settings combinations which may be useful for other users.}}
+
One should also note that the option of turning off a particular instance of the sound, while leaving the others operational, is possible if one can identify which portion of the environment is the source of the particular sound generation. This can make a very customized selection of attention-getting sounds possible. Please feel free to add your findings to this wiki page when you find particular examples of settings combinations which may be useful for other users.
  
 
== 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 {{Codeline|!pcspkr}} to the [[rc.conf#Hardware|{{Codeline|MODULES}} array]] in {{Filename|/etc/rc.conf}}:
 
  MODULES=( ... !pcspkr ... )
 
  MODULES=( ... !pcspkr ... )
  
* If <code>lsmod | grep snd-pcsp</code> returns something, add <code>!snd-pcsp</code>:
+
If {{Codeline|<nowiki>lsmod | grep snd-pcsp</nowiki>}} returns something, also add {{Codeline|!snd-pcsp}}:
 
  MODULES=( ... !snd-pcsp ... )
 
  MODULES=( ... !snd-pcsp ... )
  
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.
  
 
== 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.
 
  
===In console===
+
You can add this command to a startup file such as [[xprofile]] to make it permanent.
$ setterm -blength 0
+
Similarly you can add it to <code>~/.bashrc</code>.
+
  
* Another way is to add this line to <code>~/.inputrc</code>:
+
=== In console ===
 +
 
 +
You can add this command in {{Filename|/etc/profile}} or a dedicated file like {{Filename|/etc/profile.d/disable-beep.sh}} (must be executable):
 +
setterm -blength 0
 +
 
 +
Another way is to add or uncomment this line in {{Filename|/etc/inputrc}} or {{Filename|~/.inputrc}}:
 
  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
 +
 
For certain sound cards, it is the PC Beep:
 
For certain sound cards, it is the PC Beep:
 
  $ amixer set 'PC Beep' 0% mute
 
  $ amixer set 'PC Beep' 0% mute
 +
 
You can also use alsamixer for a console GUI
 
You can also use alsamixer for a console GUI
 
  $ alsamixer
 
  $ alsamixer
 +
 
Scroll to PC beep and press 'M' to mute. Save your alsa settings:
 
Scroll to PC beep and press 'M' to mute. Save your alsa settings:
 
  # alsactl store
 
  # alsactl store
  
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, {{Codeline|alsa}} must be in your [[rc.conf#Daemons|{{Codeline|DAEMONS}} array]] in {{Filename|/etc/rc.conf}}
 +
 
 +
== Resources ==
  
==Resources==
+
Have a look at these {{Codeline|man}} pages for further information: {{Codeline|xset(1)}}, {{Codeline|setterm(1)}}, {{Codeline|readline(3)}}.
Have a look at these '''man pages''' for further information: ''xset(1), setterm(1), readline(3)''
+
==See also==
+
[[rc.conf#Hardware]]
+

Revision as of 09:32, 1 August 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 – فارسی

Introduction

The computer often seems to make beep noises at various times, whether we want them or not. They come from various sources, and as such, you may be able to configure if or when they occur.

They are often caused by the BIOS (Basic Input/Output System), the OS (Operating System), the DE (Desktop Environment), or other software programs. The BIOS is a particularly troublesome problem because it is kept inside an EPROM chip on the motherboard, and unless it has a setting you can adjust in the BIOS setup or you wish to attempt to reprogram that chip with the proper light source, it is not likely you will be able to change it at all. That beep sound is not addressed here.

However, everything else which can cause a sound to come out of the computer case speaker can be handled with the suggestions below.

One should also note that the option of turning off a particular instance of the sound, while leaving the others operational, is possible if one can identify which portion of the environment is the source of the particular sound generation. This can make a very customized selection of attention-getting sounds possible. Please feel free to add your findings to this wiki page when you find particular examples of settings combinations which may be useful for other users.

Globally

You can completely disable the PC speaker module at startup by adding Template:Codeline to the [[rc.conf#Hardware|Template:Codeline array]] in Template:Filename:

MODULES=( ... !pcspkr ... )

If Template:Codeline returns something, also add Template:Codeline:

MODULES=( ... !snd-pcsp ... )

In this forum thread, it's recommended to add both.

Locally

In X

$ xset -b

You can add this command to a startup file such as xprofile to make it permanent.

In console

You can add this command in Template:Filename or a dedicated file like Template:Filename (must be executable):

setterm -blength 0

Another way is to add or uncomment this line in Template:Filename or Template:Filename:

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, Template:Codeline must be in your [[rc.conf#Daemons|Template:Codeline array]] in Template:Filename

Resources

Have a look at these Template:Codeline pages for further information: Template:Codeline, Template:Codeline, Template:Codeline.