GNOME Bugzilla – Bug 677242
use systemd for suspend when available
Last modified: 2012-09-06 02:55:48 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.
Is systemd a GNOME dependency? I thought upower was actively maintained, too.
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.
I agree - it doesn't make sense to require systemd here and use wrappers elsewhere.
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.
right, forgot to mention that 'soft dep' is not solved in this patch. good that you are all paying attention :-)
Also see https://bugs.freedesktop.org/show_bug.cgi?id=51305
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).
done in upower now