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

Robert Schroll rschroll at gmail.com
Tue Sep 28 03:18:57 BST 2010


Nic, thanks for figuring out that Pulse Audio was the thing breaking the
bell in Compiz.  I couldn't believe that I should have to restart Compiz
to restore the bell, and you showed that I don't.

Armed with this knowledge, I went looking around for where Pulse Audio
loads its modules.  The X11 ones seem to be loaded in the script
'/usr/bin/start-pulseaudio-x11'.  The modules and their options are
hardcoded (!) here, so I commented out the line mentioning
'module-x11-bell'.  Now, the bell beeps appropriately as soon as Compiz
starts.  (I've not had the problem in bug #398161.)  Hooray!

But this doesn't help us with Metacity.  The problem there is that
Metacity itself is catching bell events and playing sounds itself.
There's no way to turn this off short of patching Metacity.  I've
submitted such patches everywhere I can, and nobody seems to care.

While I'm here, I want to correct two mistakes I made in my previous post.  At that point, I was having problems with my video card and window managers were often crashing, so often both Metacity and Compiz had been run in a session.  Now that that's fixed and I can run Compiz from session start, I note:
1) The X bell volume (as reported by 'xset q') is 50.  Metacity must have been messing with this.
2) There are NO samples loaded into Pulse Audio.  This (not a mis-naming) is why the Pulse Audio bell doesn't work by default.  Presumably if you wanted the Pulse Audio bell instead of the PC speaker beep you could leave the loading of module-x11-bell in /usr/bin/start-pulseaudio-x11 and add a line that loads an appropriate sample, given the name bell.ogg.  But I haven't tested this, because having gotten things working, I'm not messing them up again!

-- 
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: New
Status in “libcanberra” package in Ubuntu: New
Status in “metacity” package in Ubuntu: Triaged
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