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 567918 - idle delay changes
idle delay changes
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-01-15 22:29 UTC by William Jon McCann
Modified: 2009-01-28 10:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description William Jon McCann 2009-01-15 22:29:51 UTC
So now that gnome-session will be used to track idleness we need power manager stop listening to the screensaver's signals.

So gpm cares about two different timeouts:
 1. power management signal for dimming the screen
 2. idle signal that starts the countdown to power save actions

Both should be subject to idle inhibitors.

For 2, this is a simple change to listen to the StatusChanged signal from gnome-session 
http://svn.gnome.org/viewvc/gnome-session/trunk/gnome-session/org.gnome.SessionManager.Presence.xml?view=markup

The session is idle if the argument == 3.


For 1, you want to do your own timer probably based on:
http://svn.gnome.org/viewvc/gnome-session/trunk/gnome-session/gs-idle-monitor.c?view=markup

Except that it should not trigger if GetInhibitors returns any IDLE inhibitors:
http://svn.gnome.org/viewvc/gnome-session/trunk/gnome-session/org.gnome.SessionManager.xml?view=markup
Comment 1 Richard Hughes 2009-01-16 10:25:46 UTC
So gnome-screensaver isn't going to track the idle state anymore? How does it work when:

We're watching a movie in totem (inhibit dimming, sleep, and screen blank)
We're copying a file in nautilus (inhibit sleep, but allow blank and dimming)

I guess totem now does an inhibit on gnome-session, and nautilus does an inhibit on gnome-power-manager. Correct?
Comment 2 William Jon McCann 2009-01-23 17:57:25 UTC
gnome-session will track idle state.  You inhibit the session.

We make gnome-power-manager proxy inhibits to the gnome-session too.  We should deprecate the g-p-m inhibit apis.

The screensaver does not send out the sesssion idle or power-notice signals anymore.
Comment 3 Richard Hughes 2009-01-28 09:12:41 UTC
2009-01-27  Richard Hughes  <richard@hughsie.com>

	* configure.ac:
	* src/gpm-backlight.c: (gpm_backlight_error_quark),
	(gpm_backlight_sync_policy), (gpm_backlight_set_mode),
	(gpm_backlight_get_mode),
	(gpm_backlight_brightness_evaluate_and_set),
	(gpm_conf_gconf_key_changed_cb), (ac_adapter_changed_cb),
	(gpm_backlight_notify_system_idle_changed), (idle_changed_cb),
	(mode_changed_cb), (sensor_changed_cb), (control_resume_cb),
	(gpm_backlight_finalize), (gpm_backlight_init):
	* src/gpm-common.h:
	* src/gpm-idle.c: (gpm_idle_evaluate), (gpm_idle_set_timeout_dim),
	(gpm_idle_set_timeout_blank), (gpm_idle_set_timeout_sleep),
	(gpm_idle_idletime_alarm_expired_cb), (gpm_idle_idletime_reset_cb),
	(gpm_idle_finalize), (gpm_idle_init):
	* src/gpm-manager.c: (gpm_manager_sync_policy_sleep):
	* src/gpm-phone.c: (gpm_phone_test):
	Use EggIdletime code to control the X idle time, and use gnome-session
	to control the session idle time.
	We still need to proxy requests from the legacy interface.
	Fixes #567918
Comment 4 Richard Hughes 2009-01-28 09:49:45 UTC
2009-01-28  Richard Hughes  <richard@hughsie.com>

	* src/gpm-inhibit.c: (gpm_inhibit_inhibit),
	(gpm_inhibit_un_inhibit), (gpm_inhibit_remove_dbus),
	(gpm_inhibit_init), (gpm_inhibit_finalize):
	* src/gpm-inhibit.h:
	Proxy inhibit requests up to gnome-session.
Comment 5 Richard Hughes 2009-01-28 10:39:04 UTC
I've blogged about this here: http://blogs.gnome.org/hughsie/2009/01/28/inhibits-and-the-new-world-order/