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 677241 - use systemd for suspend and hibernate when available
use systemd for suspend and hibernate when available
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks: systemd
 
 
Reported: 2012-06-01 03:12 UTC by Matthias Clasen
Modified: 2012-06-14 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
factor out upower code in power plugin (2.62 KB, patch)
2012-06-01 03:13 UTC, Matthias Clasen
accepted-commit_now Details | Review
use systemd for suspend in power plugin (3.00 KB, patch)
2012-06-01 03:13 UTC, Matthias Clasen
accepted-commit_now Details | Review
use systemd for suspend in media-keys plugin (4.75 KB, patch)
2012-06-01 03:14 UTC, Matthias Clasen
reviewed Details | Review

Description Matthias Clasen 2012-06-01 03:12:44 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.
Comment 1 Matthias Clasen 2012-06-01 03:13:29 UTC
Created attachment 215382 [details] [review]
factor out upower code in power plugin
Comment 2 Matthias Clasen 2012-06-01 03:13:53 UTC
Created attachment 215383 [details] [review]
use systemd for suspend in power plugin
Comment 3 Matthias Clasen 2012-06-01 03:14:22 UTC
Created attachment 215384 [details] [review]
use systemd for suspend in media-keys plugin
Comment 4 Bastien Nocera 2012-06-01 10:38:47 UTC
Review of attachment 215383 [details] [review]:

Looks good.

::: plugins/power/gsd-power-manager.c
@@ +2086,3 @@
 
+#ifdef HAVE_SYSTEMD
+

No need for an empty line here

@@ +2163,3 @@
 }
 
+#endif

#endif /* HAVE_SYSTEMD */ please
Comment 5 Bastien Nocera 2012-06-01 10:39:02 UTC
Review of attachment 215382 [details] [review]:

Looks good.
Comment 6 Bastien Nocera 2012-06-01 10:39:57 UTC
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
Comment 7 Richard Hughes 2012-06-01 12:35:17 UTC
Makes sense to me too.
Comment 8 Bastien Nocera 2012-06-14 16:45:15 UTC
I refactored this, moving the suspend, poweroff and hibernate calls to a helper in common/
and used those in power and media-keys.