Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510096 - =xfce-extra/xfce4-power-manager-1.2.0_p20140511: no suspend/hibernate support without systemd after upgrade
Summary: =xfce-extra/xfce4-power-manager-1.2.0_p20140511: no suspend/hibernate support...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: XFCE Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 508920
  Show dependency tree
 
Reported: 2014-05-11 20:23 UTC by Coacher
Modified: 2014-05-27 11:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2014-05-11 20:23:43 UTC
Hello.

After upgrade to xfce-extra/xfce4-power-manager-1.2.0_p20140511 I cannot access suspend and hibernate actions. After downgrade to 1.2.0-r2 everything is back to normal. Nothing else was up/downgraded together with xfce4-power-manager.

I have sys-power/upower-0.9.23 installed and no systemd stuff.

After quick git log analysis I found this commit:
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=ae97be6f3500eea509d61c914e22c5355e7d57de
It says that "suspend / hibernate is handled by systemd/logind". However, there are still code paths for polkit, when running on <upower-0.99, but in my case this doesn't work for some reason. I have polkit installed and it works fine with 1.2.0-r2.

Not sure if this upstream issue or some problem on my side, so I post bug here first.
If you, devs, think it is upstream issue I'll open bug there as well.


Reproducible: Always
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-05-12 08:05:30 UTC
What about `xfce4-power-manager --dump` output if you run it from terminal? Does it say...

Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True

Or what?

Add 'sys-power/upower **' to /etc/portage/package.keywords and upgrade to =sys-power/upower-0.99, recompile xfce4-power-manager
Does that make the problem go away, or are the hibernate/suspend still unavailable?

And yes, I think you should most definately report this to upstream, but you need more debug information for that, let's start with testing with 0.99 and checking --dump output
Comment 2 Coacher 2014-05-12 17:44:43 UTC
Here's gathered info:


xfce4-power-manager-1.2.0-r2 with upower-0.9.23:
---------------------------------------------------
Can suspend: True
Can hibernate: True
Can spin down hard disks: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Authorized to spin down hard disks: True


xfce4-power-manager-1.2.0_p20140511 with upower-0.9.23:
---------------------------------------------------
Can suspend: False
Can hibernate: False
Can spin down hard disks: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Authorized to spin down hard disks: True

And there are 3 additional error messages:
(xfce4-power-manager:8288): xfce4-power-manager-WARNING **: Error: using upower >= 0.9.0 but logind is not running

(xfce4-power-manager:8288): xfce4-power-manager-WARNING **:        suspend / hibernate will not work!

(xfce4-power-manager:8288): xfce4-power-manager-WARNING **: Failed to get keyboard max brightness level : Method "GetMaxBrightness" with signature "" on interface "org.freedesktop.UPower.KbdBacklight" doesn't exist

This limitation (upower >= 0.9.0 && logind) was introduced in the commit mentioned above together with this one:
http://git.xfce.org/xfce/xfce4-power-manager/commit/src/xfpm-power.c?id=f2ba5b74f21b6d9a8d0eb2ff088a6aeab8c60530


xfce4-power-manager-1.2.0_p20140511 with upower-0.99.0:
---------------------------------------------------
Can suspend: False
Can hibernate: False
Can spin down hard disks: True
Authorized to suspend: False
Authorized to hibernate: False
Authorized to shutdown: True
Authorized to spin down hard disks: True

And even more error messages:
(xfce4-power-manager:3059): xfce4-power-manager-WARNING **: Error: using upower >= 0.9.0 but logind is not running

(xfce4-power-manager:3059): xfce4-power-manager-WARNING **:        suspend / hibernate will not work!

(xfce4-power-manager:3059): xfce4-power-manager-WARNING **: 'CheckAuthorization' failed with Action org.freedesktop.upower.suspend is not registered

(xfce4-power-manager:3059): xfce4-power-manager-WARNING **: 'CheckAuthorization' failed with Action org.freedesktop.upower.hibernate is not registered

(xfce4-power-manager:3059): xfce4-power-manager-WARNING **: Failed to get keyboard max brightness level : Method "GetMaxBrightness" with signature "" on interface "org.freedesktop.UPower.KbdBacklight" doesn't exist
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-05-12 18:29:16 UTC
Looks like upstream purposely killed suspend/hibernate support for UPower that is build with --enable-deprecated (== with pm-utils support, without systemd)

As in, looks like upstream is purposely forcing systemd now for these actions, which isn't really suprising as the package is maintained by Xubuntu developers and Xubuntu went to systemd.

Please, open a bug at http://bugzilla.xfce.org/ and tell them how retarded this is ;-)
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-05-12 18:31:24 UTC
+  12 May 2014; Samuli Suominen <ssuominen@gentoo.org>
+  xfce4-power-manager-1.2.0_p20140511.ebuild:
+  Remove keywording as the package is clearly not compatible with sys-
+  power/upower built with --enable-deprecated wrt #510096
Comment 5 Eric Koegel 2014-05-13 17:14:14 UTC
xfce4-power-manager from git currently doesn't support suspend/hibernate with upower .99. This will get fixed before a release of xfpm, https://wiki.xfce.org/design/power-manager?&#open_issues details some of the other proposed changes. It's just a matter of getting time to write the functionality back in and test it, but I'll make this a higher priority, sorry for any inconvenience.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2014-05-13 17:55:39 UTC
(In reply to Eric Koegel from comment #5)
> xfce4-power-manager from git currently doesn't support suspend/hibernate
> with upower .99. This will get fixed before a release of xfpm,
> https://wiki.xfce.org/design/power-manager?&#open_issues details some of the
> other proposed changes. It's just a matter of getting time to write the
> functionality back in and test it, but I'll make this a higher priority,
> sorry for any inconvenience.

arg, I had been wrongly advised to create this snapshot from git then :(

however, looks like it's not only .99 problem, but git is broken with upower-0.9.23 built with --enable-deprecated (== means with pm-utils support, means for users with no systemd, like most gentoo users)

will xfpm be systemd-only app since next release?
Comment 7 Eric Koegel 2014-05-24 18:18:28 UTC
(In reply to Samuli Suominen from comment #6)
> (In reply to Eric Koegel from comment #5)
> > xfce4-power-manager from git currently doesn't support suspend/hibernate
> > with upower .99. This will get fixed before a release of xfpm,
> > https://wiki.xfce.org/design/power-manager?&#open_issues details some of the
> > other proposed changes. It's just a matter of getting time to write the
> > functionality back in and test it, but I'll make this a higher priority,
> > sorry for any inconvenience.
> 
> arg, I had been wrongly advised to create this snapshot from git then :(
> 
> however, looks like it's not only .99 problem, but git is broken with
> upower-0.9.23 built with --enable-deprecated (== means with pm-utils
> support, means for users with no systemd, like most gentoo users)
> 
> will xfpm be systemd-only app since next release?

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=8cc3a47c0265bcfb4627c1f503534dd20bfbffdc
Fixes suspend for upower < .99 (sorry I broke it) and it also adds an xfce4-pm-helper binary to call suspend/hibernate with upower .99+ so it will work again (using pm-utils on linux). This is the same way xfce4-session does shutdown/reboot, the code was adapted from it.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-05-27 11:33:13 UTC
(In reply to Eric Koegel from comment #7)
> (In reply to Samuli Suominen from comment #6)
> > (In reply to Eric Koegel from comment #5)
> > > xfce4-power-manager from git currently doesn't support suspend/hibernate
> > > with upower .99. This will get fixed before a release of xfpm,
> > > https://wiki.xfce.org/design/power-manager?&#open_issues details some of the
> > > other proposed changes. It's just a matter of getting time to write the
> > > functionality back in and test it, but I'll make this a higher priority,
> > > sorry for any inconvenience.
> > 
> > arg, I had been wrongly advised to create this snapshot from git then :(
> > 
> > however, looks like it's not only .99 problem, but git is broken with
> > upower-0.9.23 built with --enable-deprecated (== means with pm-utils
> > support, means for users with no systemd, like most gentoo users)
> > 
> > will xfpm be systemd-only app since next release?
> 
> http://git.xfce.org/xfce/xfce4-power-manager/commit/
> ?id=8cc3a47c0265bcfb4627c1f503534dd20bfbffdc
> Fixes suspend for upower < .99 (sorry I broke it) and it also adds an
> xfce4-pm-helper binary to call suspend/hibernate with upower .99+ so it will
> work again (using pm-utils on linux). This is the same way xfce4-session
> does shutdown/reboot, the code was adapted from it.

appericiated, really :)   made a new git snapshot called xfce4-power-manager-1.2.0_p20140527 from few minutes ago, so it includes latest compat patch that went in..

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=b8bd237b2dabb86b8609b470dfa61dbbad36a24b

..too

this should allow closing the bug, if someone has new issues, please open a new bug, since the issue is almost certainly different than what has been discussed here so far. thank you :)