Annoying console beep in 2.6.37

Forum: LinuxTotal Replies: 11
Author Content
Bob_Robertson

Jan 25, 2011
8:52 AM EST
Previously, simply having "pcspkr" in the kernel module blacklist was enough. Now, 2.6.37 is beeping and "pcspkr" doesn't seem to exist.

Does anyone know what the present pcspkr driver is?

I've looked it up and found several options for putting in my .bashrc, "setterm -blength 0" for example, but simply removing the system module was so much better an answer to me.

Suggestions?
hkwint

Jan 25, 2011
12:07 PM EST
It used to be located at "input devices".
tuxchick

Jan 25, 2011
12:44 PM EST
Where is "input devices"?
Bob_Robertson

Jan 25, 2011
1:48 PM EST
Hk, you mean turn it off in the compile config? That's a great idea. Let me see if I can find it.

Edit: Ok. Device Drivers > Input Devices > Misc Devices > PC Speaker Support

Said it was being built as a module called "pcspkr", which is strange because I have pcspkr in the blacklist, it's not listed in running modules (lsmod), and still it beeps.

I feel like Galileo, "But it does beep!"

I'll do a recompile and report back in an hour when that system is finished. My laptop takes an hour to compile the 2.6.37 kernel, my desktop takes 16 minutes. If I had lots of money I'd get one of those 6-core Phenom IIs and see what that would do!
gus3

Jan 25, 2011
2:54 PM EST
@Bob, if they're networked and running the same distro/version, you might want to look into "distcc" for that slow laptop!
tuxchick

Jan 25, 2011
2:56 PM EST
Compile the kernel to turn off the beep?

Um....
gus3

Jan 25, 2011
3:20 PM EST
That's preferable to opening the case. The older the system, the more true that is.
Bob_Robertson

Jan 25, 2011
4:01 PM EST
Can't "open the case", it's a laptop.

My 16-minute-recompile desktop doesn't have a speaker, and the server I built in November has one of these tiny pizo-buzzer sized things dangling from the "SPKR" jumper on its motherboard. I don't mind that beep because it's quieter than a cat's meow.

But the laptop, that I have to use in polite company and work places. That BEEP makes the console unusable for me in those circumstances.

Yes, I know about cross-compiling, and it would not be a difficult thing because the only real change is which CPU it's optimized for, "Phenom" or "Opteron".

I miss the old numbered CPUs, much easier to keep track of.

=======

Ok, test complete, sad to report that the BEEP! is still alive and well.

I'll have to put one of the "beep=0" commands into my .bashrc or whatever.

JaseP

Jan 25, 2011
5:25 PM EST
You try the BIOS? Sometimes there's a setting there... Something about emulating the PC speaker through the sound card.

Steven_Rosenber

Jan 25, 2011
5:27 PM EST
This is what worked for me in Squeeze:

Quoting:I also took care of the one very annoying thing in the Debian Squeeze default configuration: the loud system beep/bell heard whenever the machine is powered down.

With rootly powers I opened up /etc/modprobe.d/blacklist.conf and added this line:

blacklist pcspkr


That's still working for me, and I'm running the 2.6.37 kernel from Liquorix. Here's my unname -a output:

Linux lenovo 2.6.37-0.dmz.5-liquorix-amd64 #1 ZEN SMP PREEMPT Sat Jan 22 20:44:01 CST 2011 x86_64 GNU/Linux
Bob_Robertson

Jan 25, 2011
6:05 PM EST
Added the following line to .bash_profile

=======
setterm -blength 0
=======


Anyway, I've long since always put pcspkr in the blacklist, which is why I am so surprised that this beep is happening anyway. Or rather, "was happening".
hkwint

Jan 26, 2011
4:05 PM EST
TC: Oh, you don't want to know how often I recompiled my kernel because I forgot sysbeep. I have a "bash-alarm-clock" (handy for cooking and stuff) which uses it.

#!/bin/bash

function wait_sound { sleep $WAIT echo -n $MESSAGE; for ((i=1;i<=20;i++)); do echo -ne "\a"; sleep .25; done }

#Check arguments [ "$1" = "" ] && echo -e "No arguments given. \nUsage: alarm MINUTES\nExiting..." && exit 2 #Convert minutes to seconds (( WAIT = 60 * $1 )) #Save message MESSAGE=$2

wait_sound&


Doesn't work from Konsole though, but it does work from virtual terminal.

If the beep continues even if the pc speaker is not configured (as =y) in the kernel, then there's something seriously wrong I'd say, because the Linux kernel is not supposed to command hardware which it shouldn't even know how to command!

You cannot post until you login.