Missing suspend and hibernate functionality for non-systemd systems with upower 0.99.0 =>

Bug #1631707 reported by tankmissile on 2016-10-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Gentoo Linux

Bug Description

upower 0.99.0 => removes suspend and hibernate functionality. Suspend and hibernate buttons do not appear as a result. However, ConsoleKit2 has these functions implemented, so I'm hoping support for that package is added.

Created attachment 459582
Patch to liblightdm-gobject/power.c to use ConsoleKit for Suspend/Hibernate

When using =>x11-misc/lightdm-1.18.3 it is not possible to select Suspend or Hibernate on the LightDM login screen of a Gentoo installation that does not use systemd. This is because x11-misc/lightdm uses systemd-logind for Suspend/Hibernate, with upower as the fallback. I am assuming that sys-power/upower, sys-power/pm-utils and sys-auth/consolekit are installed.

In an installation that does not use systemd the Suspend and Hibernate entries in the Power pull-down menu on the LightDM GTK Greeter (x11-misc/lightdm-gtk-greeter-2.0.1-r1) are greyed-out and unusable.

In an installation that does not use systemd, the Suspend button on the LightDM KDE Greeter (lightdm-kde- is greyed-out and unusable. (The Hibernate button is configured by default to be hidden, but would also be greyed-out were it configured to be visible.)

I have not tried the other LightDM greeters, but, due to the current coding in liblightdm-gobject/power.c, I cannot conceive that Suspend/Hibernate could be selectable from any of the greeters in an installation that does not use systemd.

The current code of liblightdm-gobject/power.c uses org.freedesktop.login1 for each of Suspend, Hibernate, Restart and Shutdown. The code falls back to org.freedesktop.UPower for Suspend/Hibernate, and falls back to org.freedesktop.ConsoleKit for Restart/Shutdown.

The attached patch to power.c replaces the use of UPower with ConsoleKit.

If I apply the attached patch, Suspend and Hibernate buttons on the GTK Greeter are no longer greyed-out and they can be used to Suspend/Hibernate the machine. (Unfortunately, the code of lightdm-kde- is several years old and only appears to cater for org.freedesktop.UPower, therefore, even with the attached patch applied to x11-misc/lightdm-1.18.3, Suspend/Hibernate are still inactive on the KDE Greeter.)

Fitzcarraldo (fitzcarraldo) wrote :

I have created a patch for lightdm-1.18.3/liblightdm-gobject/power.c and it enables me to use Suspend and Hibernate in a non-systemd Gentoo Linux installation (it uses Gentoo ebuilds openrc-0.22.4, consolekit-1.1.0-r1, upower-0.99.4 and pm-utils-1.4.1-r7). Further details (including the patch) can be viewed via the following two links:



I'm currently using it with KDE Plasma 5.8.3 and the LightDM GTK Greeter (Gentoo ebuild lightdm-gtk-greeter-2.0.1-r1) rather than the LightDM KDE Greeter (light-kde- This is because the current upstream source code for the LightDM KDE Greeter is several years old and appears to require upower <0.99.0. Suspend/Hibernate (and Restart/Shutdown) work fine with the patched LightDM and LightDM GTK Greeter, though.

Changed in lightdm:
status: New → Triaged
importance: Undecided → High
Robert Ancell (robert-ancell) wrote :

Thanks Fitzcarraldo! I've pushed a modified version of this patch that also fixes the support for KDE greeters. We now try to do power management with systemd, falling back to ConsoleKit and falling back to upower.

Changed in lightdm:
status: Triaged → Fix Committed
milestone: none → 1.21.4

I added a comment in LightDM Bug Report No. 1631707 about the lack of support for Suspend/Hibernate for non-systemd installations:


As a result, LightDM developer Robert Ancell has kindly pushed a modified version of my patch that also fixes support for KDE greeters into the LightDM trunk, 1.20, 1.18 and 1.10 branches. So hopefully upcoming LightDM versions 1.21.4, 1.20.1, 1.18.4 and 1.10.7 will include support for Suspend/Hibernate on the login screen for both non-systemd and systemd installations. His commit log explains the update as follows:

Use power management functions from ConsoleKit2 if available.

Suspend and hibernate functionality was removed from upower 0.99.0, so systems not using systemd had no suspend/hibernate functionality. Support for this was added into ConsoleKit2.

Most systems will either be systemd or ConsoleKit2 now, so we try the following:
1. Power management in logind
2. Power management in ConsoleKit
3. upower for suspend/resume (really only here to not break backwards

Based on a patch for Gentoo by Fitzcarraldo.

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → New

His has long been implemented by upstream. Marking this bug as obsolete.

Thanks for your great work Fitzcarraldo and sorry this bug didn't get the attention it deserved.

Changed in gentoo:
status: New → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.