Comment 0 for bug 769314

Revision history for this message
Robert Schroll (rschroll) wrote : System bell broken in Natty/Unity (despite heroic...)

Binary package hint: unity

This bug is about problems using the system bell in Unity or another Compiz-based environment. For problems using the system bell in Ubuntu Classic or a Metacity-based environment, please see bug #486154.

The system bell (that beep when you backspace on an empty line on a terminal, i.e.) is badly broken using the Unity environment in the Natty beta 2. By default, no sound is produced, and several misconfigurations make it difficult to produce sound either from the PC speaker or Pulse Audio's module-x11-bell. Not knowing what the desired behavior is, I can't say exactly what needs to be fixed. But the combination of the following issues makes the system quite obviously broken.

1) pcskpr is blacklisted.
The pcspkr module is necessary for the PC speaker to produce sound. It is blacklisted, so regular users cannot turn the bell on. It would be nice for this to be fixed, but the attitudes displayed in #77010 suggest that it won't be. Nonetheless, I note it here because it interacts with some of the following.

2) The X bell volume is set to 0.
As reported by `xset q`, the bell volume is 0 when Unity is started. Both the PC speaker and module-x11-bell respect this setting, so the volume must be turned up (with `xset b on` or `xset b 100`) for either to work. Since both the PC speaker and module-x11-bell are disabled by default, this setting only serves to frustrate attempts to turn them on; it never prevents unwanted sound.

3) module-x11-bell is loaded by /usr/bin/start-pulseaudio-x11
This is a system file, not a user file, so users cannot decide whether they want this module loaded or not. They could write a script to unload the module at login (and hope the module number doesn't vary between boots), but it would be much cleaner to have the modules loaded from a user file, possibly with defaults if the user file doesn't exist.

4) Sample bell.ogg is not loaded.
When module-x11-bell is loaded, it is told to use the sample bell.ogg. But no sample is loaded into Pulse Audio. Thus, module-x11-bell traps system bell events (keeping them from going to the PC speaker) without producing any sound. If module-x11-bell is loaded, the sample it calls on should be loaded as well. (To fix this, run `pactl upload-sample /usr/share/sounds/ubuntu/stereo/bell.ogg bell.ogg`.)

5) gnome-volume-control doesn't.
The "Sound Effects" tab of gnome-volume-control offers to set the volume and sound for system bell events, but these have no effect. This is because gnome-volume-control is trying to control system bells through metacity. Ideally, it should be rewritten to control module-x11-bell instead, but a temporary fix could be to simply disable this tab.

6) System bell settings don't transfer to the Ubuntu Classic environment.
Because that is using metacity, which has it's own set of problems. See bug #486154.

This has been from testing in a VM (virtualbox), but all of these behaviors have also been seen in Compiz in various previous versions of Ubuntu running on various hardware.

I have reported this bug against several components, as it is really an integration issue. The eventual fix may not involve your component, but please do not mark this bug as invalid until we have at least a roadmap for fixing it. Otherwise, I fear responsibility will be passed from component to component without anything being fixed. Rationales:
Unity - As the overarching environment, Unity should be responsible for getting everything integrated. Additionally, some of the problems relate to session startup settings.
Pulse Audio - module-x11-bell is not loaded intelligently or correctly.
Gnome Media - Own gnome-volume-control.

Versions (but note the same behavior has been seen in many earlier versions):
unity: 3.8.10-0ubuntu2
pulseaudio: 1:0.9.22+stable-queue-24-g67d18-0ubuntu3
gnome-media: 2.32.0-0ubuntu7