After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692082 - Changing idle-delay during session run has no effect
Changing idle-delay during session run has no effect
Status: RESOLVED NOTABUG
Product: gnome-session
Classification: Core
Component: gnome-session
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-19 14:11 UTC by Bastien Nocera
Modified: 2013-01-22 22:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2013-01-19 14:11:42 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.
Comment 1 Bastien Nocera 2013-01-19 14:22:41 UTC
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);
 }
Comment 2 Giovanni Campagna 2013-01-19 14:49:22 UTC
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?
Comment 3 Bastien Nocera 2013-01-21 22:33:20 UTC
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");
         }
 }
Comment 4 Bastien Nocera 2013-01-22 22:15:25 UTC
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.