GNOME Bugzilla – Bug 619049
[Suggestion] Running Program Prevent from Suspend
Last modified: 2010-05-19 13:56:17 UTC
Could gnome-power-manager support a function, which can temporarily disable "suspend to RAM" as a program is running? I know Windows API supports this function: if a program calls the WinAPI function SetThreadExecutionState, the "idle timer" will be disabled and there is no timeout for entering sleep. This function meaningfully saves the power at suitable time. Without this function, we might have to fully disable the suspend function, because the suspend function might suspend our running programs (for example, some simulation or computing programs). Thanks.
That's exactly what the Inhibit() API allows you to do. See http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit
(In reply to comment #1) > That's exactly what the Inhibit() API allows you to do. See > http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit Thank you for your information. Unfortunately, it seems to being that my Ubuntu 9.10 (GNOME 2.28) and CentOS 5.5 (GNOME 2.16) don't support org.gnome.SessionManager. However, my Ubuntu 9.04 (GNOME 2.26.1) supports.