GNOME Bugzilla – Bug 677241
use systemd for suspend and hibernate when available
Last modified: 2012-06-14 16:45:25 UTC
Using these has the advantage that we get to benefit from the system-wide inhibit framework that systemd has now. This will allow use to do things like preventing suspend when a user in another session is burning a cd, etc.
To have a consistent story, gnome-session and gnome-shell need to be ported to use systemd for suspend/hibernate/inhibit as well.
Created attachment 215382 [details] [review]
factor out upower code in power plugin
Created attachment 215383 [details] [review]
use systemd for suspend in power plugin
Created attachment 215384 [details] [review]
use systemd for suspend in media-keys plugin
Review of attachment 215383 [details] [review]:
@@ +2086,3 @@
No need for an empty line here
@@ +2163,3 @@
#endif /* HAVE_SYSTEMD */ please
Review of attachment 215382 [details] [review]:
Review of attachment 215384 [details] [review]:
Looking at it, maybe we could move those calls in a helper in common/
Please also make sure that you bump the systemd requirement in configure.ac
Makes sense to me too.
I refactored this, moving the suspend, poweroff and hibernate calls to a helper in common/
and used those in power and media-keys.