[SOLVED] How to turn ON/OFF beep_mode in oss_hdaudio ?
It turns out that Intel HD audio chipsets are capable of producing "loud as hell beep".
ALSA supports this very useful feature of Intel HDA codecs, and it seems that OSS4 also supports it viewtopic.php?f=3&t=5222
The users of Debian, Linux Mint and Arch Linux reported that Gnome3 and/or systemd can trigger "very loud beep which never stops" with Intel HDA chipsets:
http://forums.debian.net/viewtopic.php? ... 27#p416250
http://forums.linuxmint.com/viewtopic.php?f=191&t=94514
https://bbs.archlinux.org/viewtopic.php?pid=1148026
Therefore, it might reasonable to learn how to turn ON/OFF beep_mode in oss_hdaudio.
With ALSA, it can be done in this way:
ALSA driver for Intel HDA codecs, snd_hda_intel, does have beep_mode:
1. There is a small chip, called "Intel HDA codec". It is integrated into motherboard.
2. There is also a little thing affixed directly to motherboard, called "pc speaker", or "motherboard speaker".
Video: 4-Pin Motherboard Speaker Unboxing http://www.youtube.com/watch?v=vIYsgFZKX98
This "motherboard speaker" is supposed to be controlled by pcspkr driver.
However, snd_hda_intel driver can override pcspkr and privatize the "motherboard speaker".
ALSA simply grabs the system beep and plays "loud as hell beep" through the "motherboard speaker".
systemd can also grab the system beep and send it to "motherboard speaker".
See: Computer POST and beep codes http://www.computerhope.com/beep.htm
OSS4 driver for Intel HDA codecs, oss_hdaudio, should also have a kind of "beep_mode" to override pcspkr, grab the system beep, and produce "loud as hell beep" through the help of the "motherboard speaker".
It seems that oss_hdaudio also overrides pcspkr, because pcspkr does not produce any beep:
Moreover, pcspkr does not produce any beep, even if OSS4 is unloaded:
ALSA supports this very useful feature of Intel HDA codecs, and it seems that OSS4 also supports it viewtopic.php?f=3&t=5222
The users of Debian, Linux Mint and Arch Linux reported that Gnome3 and/or systemd can trigger "very loud beep which never stops" with Intel HDA chipsets:
http://forums.debian.net/viewtopic.php? ... 27#p416250
http://forums.linuxmint.com/viewtopic.php?f=191&t=94514
https://bbs.archlinux.org/viewtopic.php?pid=1148026
Therefore, it might reasonable to learn how to turn ON/OFF beep_mode in oss_hdaudio.
With ALSA, it can be done in this way:
Re: Disable gdm3 startup beep
by enok » 2012-01-22 14:10
I had the same issue with the system beep when the gdm3 login screen loaded and when I rebooted. It turns out it was the sound card module (snd_hda_intel) that was causing it. The snd_hda_intel has an option, "beep_mode", that grabs the system beep when it loads, overriding pcspkr. And, of course, "beep_mode" is enabled by default. That's why you still get the beep even when you remove and blacklist pcspkr.
- Code: Select all
# modinfo snd_hda_intel | grep beep
parm: beep_mode:Select HDA Beep registration mode (0=off, 1=on, 2=mute switch on/off) (default=1). (array of int)
To disable the system beep:
- Code: Select all
# echo "options snd_hda_intel beep_mode=0" >> /etc/modprobe.d/alsa-base.conf
# echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist.conf
That should get rid of the annoying beep you get when gdm3 loads and in the console. The Intel HD audio chipset is common in laptops now, so if you have a laptop that won't stop beeping, snd_hda_intel is likely the culprit. I haven't tried the "beep_mode=2" mute switch option, so I'm not sure what it does.
http://forums.debian.net/viewtopic.php? ... 27#p416250
ALSA driver for Intel HDA codecs, snd_hda_intel, does have beep_mode:
- Code: Select all
!!Module: snd_hda_intel
bdl_pos_adj : 32,32,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
beep_mode : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
enable_msi : -1
id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
position_fix : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
power_save : 0
power_save_controller : Y
probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
single_cmd : N
http://permalink.gmane.org/gmane.linux.alsa.user/35879
1. There is a small chip, called "Intel HDA codec". It is integrated into motherboard.
2. There is also a little thing affixed directly to motherboard, called "pc speaker", or "motherboard speaker".
Video: 4-Pin Motherboard Speaker Unboxing http://www.youtube.com/watch?v=vIYsgFZKX98
This "motherboard speaker" is supposed to be controlled by pcspkr driver.
However, snd_hda_intel driver can override pcspkr and privatize the "motherboard speaker".
ALSA simply grabs the system beep and plays "loud as hell beep" through the "motherboard speaker".
systemd can also grab the system beep and send it to "motherboard speaker".
See: Computer POST and beep codes http://www.computerhope.com/beep.htm
OSS4 driver for Intel HDA codecs, oss_hdaudio, should also have a kind of "beep_mode" to override pcspkr, grab the system beep, and produce "loud as hell beep" through the help of the "motherboard speaker".
It seems that oss_hdaudio also overrides pcspkr, because pcspkr does not produce any beep:
- Code: Select all
$ sudo modprobe pcspkr
$ lsmod | grep pcspkr
pcspkr 12631 0
$ echo -e "\007"
Moreover, pcspkr does not produce any beep, even if OSS4 is unloaded:
- Code: Select all
$ sudo soundoff
$ sudo soundoff
OSS not loaded.
$ sudo modprobe pcspkr
$ lsmod | grep pcspkr
pcspkr 12631 0
$ echo -e "\007"