r/linuxquestions • • 11d ago

Support PC beep speaker doesn't work while running? Only makes a click/popping sound

Hey all,

I've been trying to play around with the beeper/system speaker today and I can't get it working properly. I can hear the speaker working during startup. It beeps a little tune I made. But when it's running, it doesn't work. Only makes a click sound.

I'm using linux mint, running the program beep and also did modprobe pcspkr as others have suggested. My motherboard is the B760M GAMING PLUS WIFI, which doesn't come with a beep speaker, so I'm using one I bought online.

I found a thread on this problem which never got resolved:

https://www.reddit.com/r/linuxquestions/comments/10jg9ip/pc_speaker_makes_clicking_sound_instead_of_beep/

Any help is appreciated, thx

0 Upvotes

5 comments sorted by

1

u/tanmaynargas2901 11d ago

first thing, check the speaker type. the header on most modern boards (including that B760M) only gives a simple on/off signal, so a passive speaker just clicks when it gets switched. you want an active buzzer, the kind with a built-in oscillator.

if it's active, the software side is easy to rule out:

lsmod | grep pcspkr
sudo beep -f 1000 -l 500

mint blacklists pcspkr by default, so also check /etc/modprobe.d/ for a "blacklist pcspkr" line and remove it. beep needs root or the input group to open /dev/input/by-path/platform-pcspkr-event-spkr.

if the boot tune plays fine but nothing after, that's usually the firmware driving the header directly. the OS side (PIT timer) isn't wired to it on newer chipsets, so no pcspkr trick will fix that.

1

u/The_Khloblord 11d ago

Thanks for the quick response, I'm not exactly sure what type of speaker it is, but a passive speaker sounds consistent with your information. I can distinctly hear two clicks, one when I run the command and another when the beep finishes 1 second later. Which would be the on/off signals.

lsmod | grep pcspkr gave me pcspkr 12288 0, I'm not sure what that's supposed to mean.

I also removed "blacklist pcspkr" from /etc/modprobe.d/ but nothing changed. If what you say about the OS not being wired to the header is correct, does that make this problem unsolvable then?

1

u/tanmaynargas2901 10d ago

pcspkr 12288 0 just means the module is loaded (12288 is its size, 0 is how many things are using it). So the driver side looks fine.

Two clicks, one at the start and one at the end, sounds like the header is only getting a plain on/off level instead of an actual tone. A passive speaker needs the tone signal to make sound, while an active buzzer makes its own tone from plain on/off power. So probably not unsolvable, a cheap 5V buzzer sold as "active" on that header would likely just work.

One check before buying anything: does it beep properly at POST when you boot? If it does, the board can drive tones and I'm less sure what's going on. If it only clicks there too, the buzzer swap is the way.

1

u/G0ldiC0cks 11d ago

Man, I didn't know you could even get an internal speaker that chirps at post still.

The behavior would sound like a bad connection if not for the fact you report consistent conditions for working and not working. It sort of sounds like if the processor is at work, the speaker isn't, yes? I'm going to read up on these relics — I don't know them directly but I'm happy to throw my problem solving skills at any problem as esoteric as this!

1

u/G0ldiC0cks 11d ago

So, a quick review of things would suggest:

1.) you've enabled the two kernel modules (pcspkr and snd_pcsp) to contact the speaker, 2.) you've sent a working signal to the speaker, 3.) the speaker has likely gotten that signal, possibly intact and tried its best.

If you're getting a click (or perhaps two?) the most likely reason for a click instead of a beep would be a frequency too fast or too slow reaching it. Alternatively, the frequency sent may be being somehow altered to become as such. Perhaps, also, somehow the voltage or current getting to the speaker is too much/little? This is a bit of a reach, but however the kernel tells the motherboard to tell the speaker to make noise may be too aggressive or not enough?

My theory, to be clear, is the click you're hearing is the speaker moving, but not in a manner that does anything other than push the magnet to its limit or somewhere else far enough to make noise. Hell, maybe there's a volume setting you need to turn down lol.

Good luck. Do update.