GNOME Bugzilla – Bug 677265
use systemd for suspend and hibernate when available
Last modified: 2012-07-08 03:18:23 UTC
this will allow us to use system-wide inhibitors for suspend, so you won't accidentally suspend your system while another user is burning a cd.
Created attachment 215402 [details] [review] simplify systemd implementation
Created attachment 215403 [details] [review] move suspend api to GsmSystem
Created attachment 215404 [details] [review] add system inhibitors
Makes sense to me.
Review of attachment 215404 [details] [review]: ::: gnome-session/gsm-systemd.c @@ +507,3 @@ + res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error); + + if (!res) { we should actually look at res here. It should have type (h), and the integer is the index into the fd list.
The following fixes have been pushed: 3cc2619 Add system inhibitors 2e69a0c Move suspend API to GsmSystem 634ea36 Update systemd dependencies 9ab2645 Simplify systemd implementation
Created attachment 218245 [details] [review] Add system inhibitors When we get a suspend inhibitor, we pass it on to the GsmSystem implementation, which may try to inhibit suspending system-wide. This is only implemented for systemd.
Created attachment 218246 [details] [review] Move suspend API to GsmSystem This allows us to add a systemd-based suspend/hibernate implementation.
Created attachment 218247 [details] [review] Update systemd dependencies We no longer use polkit directly, but the systemd suspend and inhibit apis require a new version.
Created attachment 218248 [details] [review] Simplify systemd implementation Don't use polkit ourselves, instead call the CanRestart and CanPowerOff D-Bus methods.