[Pkg-alsa-devel] Bug#540831: blacklisting pcspkr ruins beep(1), and icewm' mail beep

Josh Triplett josh at joshtriplett.org
Thu Sep 3 07:21:31 UTC 2009


On Thu, Sep 03, 2009 at 08:36:03AM +0200, Gerfried Fuchs wrote:
> * Josh Triplett <josh at joshtriplett.org> [2009-09-03 04:15:52 CEST]:
> > On Thu, Sep 03, 2009 at 09:23:25AM +0800, jidanni at jidanni.org wrote:
> > > Blacklisting pcspkr ruins beep(1), and icewm' mail beep, and probably
> > > other programs.
> > > 
> > > There should perhaps be a whiptail question saying what is being ruined
> > > and what to do about it.
> > > 
> > > I don't know the official way one should fix it.
> > > 
> > > I could tamper with some blacklist, but that is not official.
> > 
> > This primarily seems like a bug in whatever alsa driver you use, for not
> > taking over the function of the console beep (and thus routing it
> > through the normal sound card, which allows muting, volume control, and
> > various other niceties that pcspkr doesn't).
> 
>  The core functionality of beep _is_ to use the pcspkr. Having alsa-base

I looked at beep, and it just runs an ioctl on the tty to turn on and
off the console beep.  Whether that maps to pcspkr or the sound card
seems outside the scope of beep or any other program using the console
beep.

> stumble upon other packages usefulness with some reasoning that I have a
> hard time to follow -- the intention is clear but the outcome is a
> horror to quite some other packages -- I really would request to revert
> this change. Having some alsa drivers routing it through their own sound
> system might be nice but it doesn't seem to work, e.g. people on powerpc
> seem to have problems to get any beep at all, and blacklisting the
> modules in no way helps with that.
> 
> > If you don't use an alsa driver, then uninstall alsa-base and the
> > blacklist of pcspkr will go away.
> 
>  Sorry, but alsa-base breaks other application through that
> blacklisting, which is a no-go.

Fixes one thing, breaks another.  See below.

> > And if you want to keep alsa-base installed and still have pcspkr, just
> > edit /etc/modprobe.d/alsa-base-blacklist.conf and comment the "blacklist
> > pcspkr" line.
> 
>  Why is this forced down the throat of users? How regular actually is
> the question on how to disable the speaker? In fact, the speaker IMHO is
> in no scope of the alsa-base area so it shouldn't address it. Having
> some README.Debian entry about it might be reasonable, touching an area
> that isn't alsa-bases is just wrong.

OK, for the sake of argument, I just ran a Google search for "pcspkr".
First page of ten results:
1) "Rambling around foo: how to disable the pcspkr in Etch?",
<http://ramblingfoo.blogspot.com/2007/01/how-to-disable-pcspkr-in-etch.html>.
2) "change system beep (pcspkr) - Ubuntu Forums", "I need some help
redirecting the system beep. Right now it's just too annoying and I have
it disabled using modprobe -r pcspkr. However, I'm finding it would be
useful to actually have a system beep enabled but I would like to
redirect it to the sound card play a less annoying wav file or something
along those lines."
<http://ubuntuforums.org/showthread.php?t=406397>
3) "Bug#540831: alsa-base: Please blacklist pcspkr by : msg#03038 ...",
this bug, <http://osdir.com/ml/debian-bugs-dist/2009-08/msg03038.html>
4) "What is loading module pcspkr (inspite blacklist)?",
<http://lists.debian.org/debian-user/2007/02/msg00122.html>
5) "Ubuntu question #11556: “How can I blacklist the 'pcspkr' module?”",
<https://answers.launchpad.net/ubuntu/+question/11556>
6) "pcspkr How to", "Q. I’m using CentOS Linux v5.x and I’d like to turn
off the bell sound. How do turn off the beep?",
<http://www.cyberciti.biz/faq/tag/pcspkr/>
7) "Patrick's Blog(2) » Disable pcspkr module on Fedora",
<http://blog.laimbock.com/2009/08/08/disable-pcpskr-module-on-fedora/>
8) "Should we just build the pcspkr driver into the X86 kernels?",
<http://www.redhat.com/archives/fedora-kernel-list/2007-August/msg00040.html>.
A list thread on a regression that caused the pcspkr driver not to
autoload.  A look at the thread shows many people objecting to including
the pcspkr driver, particularly if they can't disable it.
9) "Re: race condition audio cards + pcspkr",
<http://linux.derkeiler.com/Mailing-Lists/Debian/2008-12/msg01226.html>
actually a complaint about the ALSA snd-pcsp driver as well as pcspkr.
10) "Bug#540831: blacklisting pcspkr ruins beep(1), and icewm' mail
...", jidanni's bug,
<http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/6fcdb2f7017759d0/da60208538fb032a?lnk=raot>.

And that just came from the first page of Google search results.
~8.5/10 pages wanting pcspkr to go away.  Oh, and the "Searches related
to: pcspkr" at the bottom?  "blacklist pcspkr", "rmmod pcspkr", "disable
pcspkr"...

Another few:
http://khaoohs.wordpress.com/2006/06/11/howto-turn-off-mute-system-beep/
http://www.thinkwiki.org/wiki/How_to_disable_the_pc_speaker_%28beep!%29


Between that and my original bug report, if I haven't yet demonstrated
the existence of a problem, I don't know what will.

As for why this relates to ALSA: because the sound driver should
take over (or otherwise manage) the function of the console beep.  I
suppose it could appear in linux-sound-base instead, since it doesn't
seem ALSA-specific.

I sympathize with jidanni's concerns.  The console beep not working at
all seems like a bug.  pcspkr getting loaded at all *also* seems like a
bug.  (Or, if you prefer, pcspkr getting loaded in the absence of a
sound card represents a bug.)  Both of these represent a bug.  At the
moment, the obvious solutions seem to break one to fix the other.
Rather than just immediately switching back to the previous choice of
brokenness, perhaps we could come up with a solution that solves both
problems.

jidanni, a few questions about your lack of a console beep:

- Can you open up the ALSA mixer and look for anything related to "beep"
  or "speaker" or similar, and try unmuting it or fiddling with volume
  to see if that gives you a console beep?

- Can you confirm that "modprobe pcspkr" makes the console beep work
  again?  After doing so, does anything new show up in your ALSA mixer?
  Does "modprobe -r pcspkr" make the console beep stop working again?

- Does "modprobe snd-pcsp" make the console beep work again?  Does the
  ALSA mixer let you control it, and in particular mute and unmute it?
  Does commenting out the "blacklist snd-pcsp" in
  alsa-base-blacklist.conf make the console beep work after you boot
  your system?  Does snd-pcsp properly come up as the second sound
  card, not the first?

(And to answer the question in your other mail, if your ALSA driver does
not support the console beep, that *seems* like a bug in the ALSA
driver; you should report that against the linux-image-2.6.foo package
for your kernel if you use the stock kernel with its built-in ALSA
drivers, or against alsa-driver if you build ALSA drivers from the
alsa-source package.)

- Josh Triplett





More information about the Pkg-alsa-devel mailing list