GNOME Bugzilla – Bug 589835
Idle dectection does not work with gnome-screensaver
Last modified: 2009-07-29 14:10:03 UTC
In the latest version of gnome-screensaver, it's using gnome-session idle signal instead of idle watcher[1]. Which means the 3rd party software should also use gnome-session idle intend of gnome-screensaver, since gnome-screensaver no longer provides idle time. This bug has been reported to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538790 and http://mail.gnome.org/archives/hamster-applet-devel-list/2009-July/thread.html#00000 1. http://bugzilla.gnome.org/show_bug.cgi?id=567919
Created attachment 139271 [details] [review] changed the idle checking with org.gnome.SessionManager.Presence
Your patch is introducing a regression Rex - the task should be considered stopped at the time when computer becomes idle. That is current time - configured idle minutes. I wonder why have you ripped out the parts that were doing it.
Oh also, could you please base your patch on 2.27 branch first - the 2.27.5 has to be rolled out today and i hope to incorporate your changes in it and that will fasten the review process. Thank you for your work!
Created attachment 139299 [details] [review] fixed the idle time checking for newer GnomeScreenSaver and GnomeSessionManager Sorry, I can not find the 2_27_5 tag or branch in git repository (http://git.gnome.org/cgit/hamster-applet/). So this patch is against to master. This version considered the stopped time when computer becomes idle. And also changed on_idle_changed as signal, to avoid race condition of dbus signal. -Rex
Hey Rex! git master is just fine! It seems to me that "/desktop/gnome/session/idle_delay" key that is used to subtract idle minutes, does not correspond to the idle event. And i'm not sure what that key corresponds to. The screensaver kicks in the time specified by "/apps/gnome-screensaver/idle_delay" and so is the idle event. Also i'm somewhat confused now - are we back to listening to screensaver events? From the fixes in idle.py it sure looks so.
Hi, From my study, 1. /apps/gnome-screensaver/idle_delay is no longer used in gnome-screensaver 2.26.1-2. In fact, if you changed the gnome-screensaver idle time setting, it changed to /desktop/gnome/session/idle_delay, not /apps/gnome-screensaver/idle_delay now. 2. gnome-session fired StatusChanged event, when the /desktop/gnome/session/idle_delay (in minutes) is dued. path=/org/gnome/SessionManager/Presence; interface=org.gnome.SessionManager.Presence; member=StatusChanged 3. gnome-screensaver fired ActiveChanged, when it received StatusChanged from gnome-session. (gnome-screensaver/src/gs-watcher-x11.c) path=/org/gnome/ScreenSaver; interface=org.gnome.ScreenSaver; member=ActiveChanged 4. So, for hamster, we can use either StatusChanged (gnome-session) or ActiveChanged (gnome-screensaver). However, the gnome-session does not store the idle time. regards -Rex
Oh, the reason I like to monitor org.gnome.ScreenSaver, it's because it tells both ActiveChanged and Lock signals. From gnome-session, I only know it's idle don't know if it's because the user launch the screensaver. regards -Rex
Finally I could verify the bug by installing ubuntu's karmic koala version on virtual box. Cleaned the code up some more and implemented a fix that works on both solutions. It's based on somewhat hackish duck typing. Bug has been solved in git master. Thank you very much for the report and patch.