GNOME Bugzilla – Bug 692082
Changing idle-delay during session run has no effect
Last modified: 2013-01-22 22:15:25 UTC
While testing bug 691964 and bug 691965, I realised that changing the idle-delay configuration has no effect on the delay in changing the status to idle, resulting in the screensaver kicking off too early or too late.
That might fix it, but it's likely a GnomeIdleMonitor bug: diff --git a/gnome-session/gsm-presence.c b/gnome-session/gsm-presence.c index 86c7043..1bbda5f 100644 --- a/gnome-session/gsm-presence.c +++ b/gnome-session/gsm-presence.c @@ -144,7 +144,8 @@ idle_became_idle_cb (GnomeIdleMonitor *idle_monitor, gpointer user_data) { GsmPresence *presence = user_data; - set_session_idle (presence, TRUE); + if (id == presence->priv->idle_watch_id) + set_session_idle (presence, TRUE); }
Well, I changed idle-delay often when testing the screenshield, and I never experienced this bug before. I could even count mentally to the idle-delay, and it worked just fine. Do you have some local patch on GnomeIdleMonitor?
There's problems transitioning the idle/non-idle state. This works around the problem, but isn't quite right. I think the "became-active" signal might sometimes get lost, as we disconnect/reconnect it. I'll look into it tomorrow. In the meanwhile, the test suite is at: http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/test.py#n205 Let me know if you find something wrong there. diff --git a/gnome-session/gsm-presence.c b/gnome-session/gsm-presence.c index 86c7043..3e894e7 100644 --- a/gnome-session/gsm-presence.c +++ b/gnome-session/gsm-presence.c @@ -394,7 +394,12 @@ gsm_presence_set_idle_timeout (GsmPresence *presence, if (timeout != presence->priv->idle_timeout) { presence->priv->idle_timeout = timeout; + g_debug ("Changed idle-timeout to %d", timeout); reset_idle_watch (presence); + if (presence->priv->idle_timeout < gnome_idle_monitor_get_idletime (presence->priv->idle_monitor)) + set_session_idle (presence, TRUE); + else + set_session_idle (presence, FALSE); g_object_notify (G_OBJECT (presence), "idle-timeout"); } }
Probably fixed by: http://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/power/test.py?id=82f141da77a0133a36249662253039d0b6aac6d4 I'll reopen if I can reproduce again.