<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - X bell is not re-enabled after pulseaudio exits / x11-beel is unloaded (XkbSetAutoResetControls)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=85987">85987</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>X bell is not re-enabled after pulseaudio exits / x11-beel is unloaded (XkbSetAutoResetControls)
</td>
</tr>
<tr>
<th>Product</th>
<td>PulseAudio
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>modules
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pulseaudio-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>freedesktop-bugs@thequod.de
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>pulseaudio-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>CC</th>
<td>lennart@poettering.net
</td>
</tr></table>
<p>
<div>
<pre>The following code is used in src/modules/x11/module-x11-bell.c to disable the
audible bell:
> XkbChangeEnabledControls(pa_x11_wrapper_get_display(u->x11_wrapper),
XkbUseCoreKbd, XkbAudibleBellMask, 0);
..after the following code, which is meant to re-enable/reset it after the X
client quits:
> auto_ctrls = auto_values = XkbAudibleBellMask;
> XkbSetAutoResetControls(pa_x11_wrapper_get_display(u->x11_wrapper),
XkbAudibleBellMask, &auto_ctrls, &auto_values);
But this either has a bug somewhere or just does not work as expected.
I am not sure where / how the (wrapped) X client is supposed to get closed.
TEST CASE:
1. Add "autospawn=no" to ~/.pulse/client.conf
2. Kill pulseaudio: pulseaudio -k
3. Start a new X session, and/or make sure that the audible bell is enabled,
e.g. "xset b 100". You can use printf '\a' in a terminal to trigger it.
4. Start pulseaudio and load the x11-bell module:
> pactl load-module module-x11-bell sample=bell.ogg
> pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg
bell.ogg
5. The bell should either get routed through PA now (if you have a "bell"
sample uploaded), fallback to the speaker or you will hear nothing (<a class="bz_bug_link
bz_status_NEW "
title="NEW - X11 bell event dropped in Xfce and other non-Gnome desktops"
href="show_bug.cgi?id=58930">Bug 58930</a>).
6. Unload the module again:
> pactl unload-module module-x11-bell
EXPECTED:
Now the default X bell should be enabled again.
ACTUAL RESULT:
Nothing happens on a bell event now: pulseaudio is stopped and the previous
state has not been restored.
A workaround is to (unconditionally) enable the X bell again when the x11-bell
module gets unloaded, but then it might get enabled, although it wasn't before:
XkbChangeEnabledControls(pa_x11_wrapper_get_display(u->x11_wrapper),
XkbUseCoreKbd, XkbAudibleBellMask, XkbAudibleBellMask);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>