Bug 200541 - sysutils/upower: Update to 0.99.3
Summary: sysutils/upower: Update to 0.99.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-05-30 19:56 UTC by Olivier Duchateau
Modified: 2015-09-04 10:23 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Patch to update sysutils/upower (2.08 KB, patch)
2015-05-30 19:56 UTC, Olivier Duchateau
koobs: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Duchateau freebsd_committer freebsd_triage 2015-05-30 19:56:30 UTC
Created attachment 157292 [details]
Patch to update sysutils/upower

- Update to 0.99.3
- Adjust USES flags and options for configure script.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2015-05-30 21:33:17 UTC
I'd rather like to see this port reverted to the latest 0.9.x.  That would fix suspend support in Xfce.  Upower 0.99.x removed support for that because on Linux it is now handled by systemd.
Comment 2 Olivier Duchateau freebsd_committer freebsd_triage 2015-06-06 14:16:28 UTC
(In reply to Tijl Coosemans from comment #1)

sysutils/xfce4-power-manager uses only UPower for status of battery.

Suspend / resume is enabled by hw.acpi through S3 and S4.
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2015-06-06 14:33:50 UTC
I think xfce4-session also uses upower.  The logout window has a suspend button that only works with upower 0.9 (and when you create a pkla file as explained in xfce4-session pkg-message).
Comment 4 Eric Koegel 2015-06-15 13:49:27 UTC
If it helps, I wrote the UPower/ConsoleKit2/Fallback Xfce patches for xfce4-power-manager (xfpm) and xfce4-session (xfsm).

With both packages, if UPower < 0.99 then UPower's suspend/hibernate will be used.

If UPower 0.99.0+ and ConsoleKit2 (CK2) is installed, then it will use ConsoleKit2's suspend/hibernate calls (i.e. http://consolekit2.github.io/ConsoleKit2/#Manager.Suspend).

If UPower 0.99.0+ and no CK2 (just old ConsoleKit or no ConsoleKit), then it uses an internal fallback. For the fallback code, the can we suspend/can we hibernate code is here:
http://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-suspend.c?h=xfce-4.12

The actual suspend/hibernate commands are handled with the pm-helper:
http://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-pm-helper.c?h=xfce-4.12#n67

xfsm has a similar setup, and CK2 should be the same.

With xfce4-power-manager --debug it should print something like "using xfpm internal suspend backend". xfpm and xfsm fallback code is protected with polkit rules (a change from xfsm in 4.10 that used sudo, to support things like fingerprint readers and auth tokens), org.xfce.power.xfce4-pm-helper and org.xfce.session.xfsm-shutdown-helper respectively and it ships rules that *should* work.


Note that newer dev versions of xfpm (1.5.0+) have dropped support UPower < 0.99 as it's on the Xfce roadmap for 4.14. If this is an issue for FreeBSD open a bug report to let us know.

Now if any of the above doesn't work, feel free to open bug reports. Sorry it's so complicated... it's actually worse since we also support systemd on linux as well.
Comment 5 Olivier Duchateau freebsd_committer freebsd_triage 2015-06-15 16:52:13 UTC
(In reply to Eric Koegel from comment #4)

Personally I use ConsoleKit2, (it's clearly mentioned on our wiki page [1] if we follow the 'trunk' branch available in Xfce repository).

I use xfce4-power-manager 1.5.1 on two releases (9.3 and 10.1), and everything works fine.

Furthermore I asked CFT [2] in order to test sysutils/xfce4-power-manager 1.5.1 with sysutils/upower 0.99.3.

I think the biggest problem here is sysutils/polkit, we use old version. I tried 0.112 release, but daemon refuses to launch on startup.

[1] https://wiki.freebsd.org/Xfce
[2] https://lists.freebsd.org/pipermail/freebsd-xfce/2015-June/001228.html
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2015-06-15 21:17:58 UTC
(In reply to Eric Koegel from comment #4)
I tried upower 0.99 again (with old consolekit) and see the following with 
xfce4-power-manager --debug and suspend works.  I guess this was fixed in Xfce 4.12?

TRACE[xfpm-suspend.c:137] xfpm_suspend_can_suspend(): entering
TRACE[xfpm-suspend.c:90] freebsd_supports_sleep_state(): entering
TRACE[xfpm-suspend.c:154] xfpm_suspend_can_hibernate(): entering
TRACE[xfpm-suspend.c:90] freebsd_supports_sleep_state(): entering
TRACE[xfpm-power.c:236] xfpm_power_check_polkit_auth(): using xfpm internal suspend backend
Comment 7 Eric Koegel 2015-06-16 16:39:11 UTC
(In reply to Tijl Coosemans from comment #6)
Yes, all this is for 4.12. Glad to hear it works!

(In reply to Olivier Duchateau from comment #5)
I'll see if I can look into polkit on FreeBSD this weekend. But I don't want to clutter up your bug report any more than I already have. Cheers!
Comment 8 Koop Mast freebsd_committer freebsd_triage 2015-08-12 13:56:51 UTC
Upower 0.99.3 update is in the works.
Since consolekit was mentioned may I point out the https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202269 bug? It contains a update to consolekit2 1.0.0.
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-09-04 10:15:35 UTC
A commit references this bug:

Author: kwm
Date: Fri Sep  4 10:15:32 UTC 2015
New revision: 396070
URL: https://svnweb.freebsd.org/changeset/ports/396070

Log:
  Update upower to 0.99.3.

  PR:		200541 (based on)
  Submitted by:	olivierd@

Changes:
  head/sysutils/upower/Makefile
  head/sysutils/upower/distinfo