Screensaver not activating due to inhibits not being cleared
Hey,
I have set the screensaver to activate on idle, and regard the computer as idle after 1 mins (for testing purposes). The screensaver does not reliably activate after 1 minute. This is a potential security issue.
If xfce4-screensaver was just started, it works. When a movie was played (and stopped!) in the meantime, it doesn't. It seems that when an application inhibits the screensaver and clears the inhibit, the clearing is logged by xfce4-screensaver but not applied internally. Once there was an inhibit, it will never activate again on its own.
Observed with xfce4-screensaver-4.18.2 (no further patches) on Gentoo Linux.
Log:
# fresh start
# xfce4-screensaver --debug
(xfce4-screensaver:771702): Gtk-WARNING **: 17:16:08.723: Theme parsing error: gtk.css:9228:21: Not using units is deprecated. Assuming 'px'.
[gs_debug_init] gs-debug.c:115 (17:16:08.764): Debugging enabled
[main] xfce4-screensaver.c:89 (17:16:08.764): Initializing xfce4-screensaver 4.18.2
[init_session_id] gs-listener-dbus.c:2190 (17:16:08.773): Got session-id: /org/freedesktop/login1/session/_332
[gs_listener_init] gs-listener-dbus.c:2216 (17:16:08.773): Acquiring logind sleep inhibitor lock
[gs_listener_x11_set_timeouts] gs-listener-x11.c:320 (17:16:08.778): Saver timeout updated to 60 seconds
[gs_listener_x11_set_timeouts] gs-listener-x11.c:326 (17:16:08.778): Lock timeout updated to 60 seconds
[gs_listener_x11_acquire] gs-listener-x11.c:296 (17:16:08.780): ScreenSaver Registered
[xroot_filter] gs-listener-x11.c:264 (17:17:08.780): Activating screensaver on ScreenSaverOn
....
# --> it works!
# unlock
# let's try playing and stopping a video in Firefox 116 for a second.
[listener_add_ref_entry] gs-listener-dbus.c:655 (17:25:04.549): Adding inhibitor from libxfce4ui for reason 'Inhibit requested' on connection :1.13
[listener_check_activation] gs-listener-dbus.c:308 (17:25:04.557): Checking for activation
[listener_remove_ref_entry] gs-listener-dbus.c:687 (17:25:05.351): Removing inhibitor from libxfce4ui for reason 'Inhibit requested' on connection :1.13
[listener_check_activation] gs-listener-dbus.c:308 (17:25:05.351): Checking for activation
[get_x11_idle_info] gs-listener-x11.c:111 (17:25:39.192): XScreenSaverInfo: state 3 kind 1 tos 0 idle 30657 m 1
[lock_timer] gs-listener-x11.c:164 (17:25:39.192): Idle: 30s, Saver: Enabled, Saver Timeout: 60s, Lock: Enabled, Lock Timeout: 60s, Lock Timer: 0s, Lock Status: Unlocked, Fullscreen: Uninhibited
[get_x11_idle_info] gs-listener-x11.c:111 (17:26:39.192): XScreenSaverInfo: state 3 kind 1 tos 0 idle 90657 m 1
[lock_timer] gs-listener-x11.c:164 (17:26:39.192): Idle: 90s, Saver: Enabled, Saver Timeout: 60s, Lock: Enabled, Lock Timeout: 60s, Lock Timer: 30s, Lock Status: Unlocked, Fullscreen: Uninhibited
[get_x11_idle_info] gs-listener-x11.c:111 (17:27:39.192): XScreenSaverInfo: state 3 kind 1 tos 0 idle 48666 m 1
...
# screensaver won't activate anymore, it's as if the inhibit got stuck
Manual activation with the corresponding commands (xflock4
, etc.) is not affected. This perma-inhibited state can be cleared by either restarting xfce4-screensaver, or toggling Inhibit screensaver for fullscreen applications
, (either off->on or on->off seems to work for clearing this state)
Thanks! :)
Full settings:
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-screensaver" version="1.0">
<property name="lock" type="empty">
<property name="sleep-activation" type="bool" value="true"/>
<property name="user-switching" type="empty">
<property name="enabled" type="bool" value="false"/>
</property>
<property name="status-messages" type="empty">
<property name="enabled" type="bool" value="false"/>
</property>
<property name="saver-activation" type="empty">
<property name="delay" type="int" value="1"/>
</property>
</property>
<property name="saver" type="empty">
<property name="mode" type="int" value="0"/>
<property name="idle-activation" type="empty">
<property name="enabled" type="bool" value="true"/>
<property name="delay" type="int" value="1"/>
</property>
<property name="fullscreen-inhibit" type="bool" value="true"/>
<property name="enabled" type="bool" value="true"/>
</property>
<property name="screensavers" type="empty">
<property name="xfce-blank" type="empty">
<property name="dpms-sleep-after" type="double" value="1"/>
<property name="arguments" type="string" value=""/>
<property name="dpms-off-after" type="double" value="1"/>
</property>
<property name="xfce-floaters" type="empty">
<property name="show-paths" type="bool" value="false"/>
<property name="arguments" type="string" value="-n 5"/>
<property name="do-rotations" type="bool" value="false"/>
<property name="print-stats" type="bool" value="false"/>
</property>
</property>
</channel>