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 677242 - use systemd for suspend when available
use systemd for suspend when available
Product: gnome-shell
Classification: Core
Component: general
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
Depends on:
Blocks: systemd
Reported: 2012-06-01 03:52 UTC by Matthias Clasen
Modified: 2012-09-06 02:55 UTC
See Also:
GNOME target: ---
GNOME version: ---

patch (3.63 KB, patch)
2012-06-01 03:52 UTC, Matthias Clasen
needs-work Details | Review

Description Matthias Clasen 2012-06-01 03:52:44 UTC
Created attachment 215386 [details] [review]

here is a patch that uses systemd instead of upower to suspend. The advantage of this is that systemd has a system-wide inhibit framework for suspend. The patch will have to be reworked a bit when gcampax' lock screen work lands, to allow showing a polkit dialog for the suspend action before locking the screen.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-06-01 04:06:21 UTC
Is systemd a GNOME dependency? I thought upower was actively maintained, too.
Comment 2 drago01 2012-06-01 07:09:51 UTC
Not sure we want to make systemd a hard requirement yet (do we) ? 
In case we don't we should wrap this in if (Systemd.haveSystemd()) calls.
Comment 3 Florian Müllner 2012-06-01 07:21:39 UTC
I agree - it doesn't make sense to require systemd here and use wrappers elsewhere.
Comment 4 Florian Müllner 2012-06-01 11:22:38 UTC
Review of attachment 215386 [details] [review]:

Marking needs-work based on the previous comments. Also gdm's power menu has a suspend option as well.
Comment 5 Matthias Clasen 2012-06-01 13:29:47 UTC
right, forgot to mention that 'soft dep' is not solved in this patch. good that you are all paying attention :-)
Comment 6 Matthias Clasen 2012-07-08 03:25:14 UTC
Also see
When upower learns to use systemd for suspend, then is patch becomes somewhat unimportant, since upower's suspend will then also be subject to the systemd inhibit framework (which is the motivation for rerouting through systemd in the first place).
Comment 7 Matthias Clasen 2012-09-06 02:55:48 UTC
done in upower now