Comment 68 for bug 486154

Revision history for this message
Robert Schroll (rschroll) wrote :

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!