Turning speaker beep off by alsamixer permanently

3

2

Debian 7, x64.

I can turn off the beep by reducing Speaker bar volume in alsamixer to 0.

However, after reboot speaker volume in alsamixer is set to 100% again.

How can I turn off speker beep permanently (or possibly save current alsamixer settings in such way that they survive reboot)?

(P.S. I'm using KDE - perhaps it's KDE that messes with it?)

LetMeSOThat4U

Posted 2014-03-05T13:13:49.580

Reputation: 495

Answers

2

Unfortunately answer by user19087 did not work as pcspkr module is not loaded by boot on Debian 7 at all (at least on my Dell Vostro laptop) but the ArchLinux wiki did contain the right answer:

amixer set 'Speaker' 0% mute

After doing alsactl store this shut the beep up for good, no beep after reboot.

LetMeSOThat4U

Posted 2014-03-05T13:13:49.580

Reputation: 495

For the record I suggest blacklisting both pcspkr and snd_pcsp (unfortunately my answer was edited, making this less clear). In newer kernels pcspkr has been renamed to snd_pcsp. – user19087 – 2014-03-06T19:15:06.427

@user19087: Debian 7 has file:

 % cat /etc/modprobe.d/alsa-base-blacklist.conf 
 # Comment this entry in order to load snd-pcsp driver
 blacklist snd-pcsp. Apparently snd-pcsp is blacklisted by default. It does not show up in lsmod output.
 – LetMeSOThat4U  – 2014-03-07T14:33:59.523

3

Use the directions at Disable PC Speaker Beep. Basically, as root, run this command:

printf "%s\n" "blacklist "{pcspkr,snd_pcsp} > /etc/modprobe.d/beep_blacklist.conf

Two important things to note if you blacklist the modules via /etc/modprobe.d/

  • Might need to blacklist both pcspkr as well as snd_pcsp
  • Blacklisted modules can still be pulled in as dependencies of other modules (this can be determined by modprobe --show-depends mymodule

Of course there are other methods, such as in X, from Console, using ALSA (as you've already found), etc. If you insist on using ALSA, then alsactl store after muting the volume should do the trick.

user19087

Posted 2014-03-05T13:13:49.580

Reputation: 513