Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop
Date: Sat, 21 Dec 2019 12:22:54
Message-Id: 2093508.sDOpovdmRf@localhost
In Reply to: [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop by Dr Rainer Woitok
1 On Friday, 20 December 2019 16:14:00 GMT you wrote:
2 > Mick,
3 >
4 > On Friday, 2019-12-20 13:55:29 +0000, you wrote:
5 > > ...
6 > > If you can't run suspend/hibernate it may be polkit policies are not
7 > > allowing you to run these commands via dbus. However, polkit policies
8 > > are
9 > > automatically installed/updated as required by the packages you have on
10 > > your system. For example, this is what I have on my desktop (KDE):
11 > >
12 > > $ pkaction | grep susp
13 > > org.freedesktop.login1.inhibit-handle-suspend-key
14 > > org.freedesktop.login1.suspend
15 > > org.freedesktop.login1.suspend-ignore-inhibit
16 > > org.freedesktop.login1.suspend-multiple-sessions
17 > >
18 > > $ pkaction | grep hibernate
19 > > org.freedesktop.login1.hibernate
20 > > org.freedesktop.login1.hibernate-ignore-inhibit
21 > > org.freedesktop.login1.hibernate-multiple-sessions
22 > > org.freedesktop.login1.inhibit-handle-hibernate-key
23 >
24 > Here it is:
25 >
26 > $ pkaction|\grep -E 'hiber|susp'
27 > org.freedesktop.consolekit.system.hibernate
28 > org.freedesktop.consolekit.system.hibernate-multiple-users
29 > org.freedesktop.consolekit.system.suspend
30 > org.freedesktop.consolekit.system.suspend-multiple-users
31 > $
32
33 Hmm ... clearly we have a difference in polkit authorised actions between our
34 two systems. I use elogind, but don't have a box with consolekit to compare.
35
36 [snip ...]
37 > In "/etc/polkit-1/rules.d/" are only three rules files, the first and
38 > last one being copied by me from the internet somewhere, the second one
39 > being original:
40 >
41 > # cd /etc/polkit-1/rules.d
42 > # for f in *; do echo ---- $f; cat $f; done
43 > ---- 10-admin.rules
44 > polkit.addAdminRule(function(action, subject) {
45 > return ["unix-group:wheel"];
46 > });
47 > ---- 50-default.rules
48 > /* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
49 >
50 > // DO NOT EDIT THIS FILE, it will be overwritten on update
51 > //
52 > // Default rules for polkit
53 > //
54 > // See the polkit(8) man page for more information
55 > // about configuring polkit.
56 >
57 > polkit.addAdminRule(function(action, subject) {
58 > return ["unix-user:0"];
59 > });
60 > ---- 50-org.freedesktop.NetworkManager.rules
61 > polkit.addRule(function(action, subject) {
62 > if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &&
63 > subject.isInGroup("plugdev")) { return polkit.Result.YES;
64 > }
65 > });
66 > #
67 >
68 > > ...
69
70 I only have the 50-default.rules, I suspect you copied 10-admin.rules from:
71
72 https://wiki.gentoo.org/wiki/Polkit
73
74
75 > > These are the USE flags for polkit on this system:
76 > These are the polkit USE flags here:
77 >
78 > $ eix -l sys-auth/polkit|grep Installed
79 > Installed versions: 0.115-r4(15:10:56 22/10/19)(consolekit gtk
80 > introspection nls pam -elogind -examples -jit -kde -selinux -systemd -test)
81 > $
82 >
83 > The only differences I see are that you are using "elogind" rather than
84 > "consolekit", and that I'm using "gtk" while you are using "kde".
85
86 Yes, this is as it should be.
87
88
89 > If someone could point me to any missing policy rules, I would be glad
90 > to add them.
91 >
92 > Sincerely,
93 > Rainer
94
95 The thing is you shouldn't have to add polkit actions or rules manually. As I
96 understand it any userspace applications which require access to system
97 services should install any rules as dependencies.
98
99 A Gentoo user with consolekit and xfce should kindly check their settings and
100 compare with yours to see if something is amiss. I'm thinking, any xfce
101 regression bugs ought to affect more than one user at a time, so you shouldn't
102 be alone in this.
103
104 PS. I had a look at the interwebs for your problem and a user mentioned upower
105 (as I did in a previous message) - do you have upower installed? The xfce
106 desktop should have installed this as a dependency:
107
108 sys-power/upower
109 Available versions:
110 0.99.9-r1 (0/3) [doc +introspection ios selinux
111 KERNEL="FreeBSD linux"]
112 ~ 0.99.11 (0/3) [doc +introspection ios selinux
113 KERNEL="FreeBSD linux"]
114 Installed versions: 0.99.9-r1(0/3)(10:05:06 14/06/19)(introspection -doc
115 -ios -selinux KERNEL="linux -FreeBSD")
116 Homepage: https://upower.freedesktop.org/
117 Description: D-Bus abstraction for enumerating power devices,
118 querying history and statistics
119
120
121 PPS. This page mentions some troubleshooting steps which you may have not been
122 through yet:
123
124 https://docs.xfce.org/xfce/xfce4-power-manager/faq
125
126 --
127 Regards,
128
129 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature