[pulseaudio-tickets] [Bug 85987] New: X bell is not re-enabled after pulseaudio exits / x11-beel is unloaded (XkbSetAutoResetControls)
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Nov 6 20:32:24 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=85987
Bug ID: 85987
Summary: X bell is not re-enabled after pulseaudio exits /
x11-beel is unloaded (XkbSetAutoResetControls)
Product: PulseAudio
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: modules
Assignee: pulseaudio-bugs at lists.freedesktop.org
Reporter: freedesktop-bugs at thequod.de
QA Contact: pulseaudio-bugs at lists.freedesktop.org
CC: lennart at poettering.net
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 (Bug 58930).
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);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20141107/147a14a4/attachment.html>
More information about the pulseaudio-bugs
mailing list