[Bug 486154] Re: System beep broken in Karmic despite heroic efforts to fix it

Robert Schroll rschroll at gmail.com
Wed Mar 24 05:38:33 GMT 2010


Just to confirm my previous assertion, I installed the Lucid beta on a virtual machine.  I applied my patch [1], restarted metacity, and unloaded and reloaded Pulse Audio's module-x11-bell [2].  System bells rang the same bell.ogg sound file, but through Pulse Audio.  Additionally, I could now set the volume with `xset b`.  Thus, using this patch would result in the *exact same* behavior as currently exists, except that Pulse Audio is making the noise instead of metacity.  Stopping the behavior, to reenable to PC speaker, is now just a matter of unloading the module.  Additionally, there are fringe benefits:
1) No delay while metacity loads the sample the first time it's needed.
2) No rate limiting of playback by metacity.
3) Consistent handling of system bell events between metacity and compiz.

Honestly, what more is desired?  In several bugs related to this, I have
yet to hear a good explanation for why metacity should be handling
system bell events.  Here's a chance to switch this capability to a more
sensible sub-system and solve several bugs or potential bugs all at
once.  Why are we not jumping all over this?  (Sorry to sound shrill,
but I'm rather frustrated at this point.)

[1] It didn't quite apply cleanly, but it was easy enough to clean up by
hand.  I wasn't planning on posting a new patch for Lucid, but if it's
desired, let me know.

[2] I don't know why un- and re-loading the module-x11-bell was
necessary, but I suspect that it's related to the fact that the old
metacity had been trapping the system bell events.  I suspect, but
haven't confirmed, that this won't be necessary once the new metacity is
installed and X is restarted.

-- 
System beep broken in Karmic despite heroic efforts to fix it
https://bugs.launchpad.net/bugs/486154
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.

Status in The Metacity Window Manager: Unknown
Status in “libcanberra” package in Ubuntu: New
Status in “metacity” package in Ubuntu: Confirmed
Status in “pulseaudio” package in Ubuntu: Invalid

Bug description:
Between Jaunty and Karmic, a number of changes were made to keep the PC speaker from beeping.  As part of this, system bell events are now captured by metacity, which uses libcanberra to play a sound.  For users without speakers, this fails to be useful.  The current setup makes restoring the old behavior extremely difficult.

The absolute show stopper is that metacity traps audible system bell events.  This behavior is, as best we can tell, not configurable.  The attached patch keeps metacity from capturing system bell events.  It also removes the sound playback capability.  As Lucid will be using pulse audio's module-x11-bell to play sounds for system bell events, it is not necessary for this capability to be in metacity.  Additionally, this removes the discrepancy between metacity's and compiz's handling of system bell events.

There are several other difficulties in enabling the system bell:
1) Even if it is taken out of the blacklist, the pcspkr module may not load properly.  Another modprobe may be necessary to get it loaded.  See bug #398161.
2) Something in Gnome's startup does the equivalent of `xset b off`, so `xset b on` must be run on every login.  (Note that bug #280767 keeps you from setting the bell volume with xset.)
3) A number of settings in gnome-terminal and gconf may keep the shell from sounding system bell events.

Comments #28, #34, and #50 give more detailed summaries of the various problems.






More information about the Ubuntu-sponsors mailing list