On Friday, 20 December 2019 16:14:00 GMT you wrote:
> Mick,
> 
> On Friday, 2019-12-20 13:55:29 +0000, you wrote:
> > ...
> > If you can't run suspend/hibernate it may be polkit policies are not
> > allowing you to run these commands via dbus.  However, polkit policies
> > are
> > automatically installed/updated as required by the packages you have on
> > your system.  For example, this is what I have on my desktop (KDE):
> > 
> > $ pkaction | grep susp
> > org.freedesktop.login1.inhibit-handle-suspend-key
> > org.freedesktop.login1.suspend
> > org.freedesktop.login1.suspend-ignore-inhibit
> > org.freedesktop.login1.suspend-multiple-sessions
> > 
> > $ pkaction | grep hibernate
> > org.freedesktop.login1.hibernate
> > org.freedesktop.login1.hibernate-ignore-inhibit
> > org.freedesktop.login1.hibernate-multiple-sessions
> > org.freedesktop.login1.inhibit-handle-hibernate-key
> 
> Here it is:
> 
> $ pkaction|\grep -E 'hiber|susp'
> org.freedesktop.consolekit.system.hibernate
> org.freedesktop.consolekit.system.hibernate-multiple-users
> org.freedesktop.consolekit.system.suspend
> org.freedesktop.consolekit.system.suspend-multiple-users
> $

Hmm ... clearly we have a difference in polkit authorised actions between our 
two systems.  I use elogind, but don't have a box with consolekit to compare.

[snip ...]
> In "/etc/polkit-1/rules.d/"  are only  three rules files,  the first and
> last one being copied by me from the internet somewhere,  the second one
> being original:
> 
>    # cd /etc/polkit-1/rules.d
>    # for f in *; do echo ---- $f; cat $f; done
>    ---- 10-admin.rules
>    polkit.addAdminRule(function(action, subject) {
>        return ["unix-group:wheel"];
>    });
>    ---- 50-default.rules
>    /* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
> 
>    // DO NOT EDIT THIS FILE, it will be overwritten on update
>    //
>    // Default rules for polkit
>    //
>    // See the polkit(8) man page for more information
>    // about configuring polkit.
> 
>    polkit.addAdminRule(function(action, subject) {
>        return ["unix-user:0"];
>    });
>    ---- 50-org.freedesktop.NetworkManager.rules
>    polkit.addRule(function(action, subject) {
>        if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &&
> subject.isInGroup("plugdev")) { return polkit.Result.YES;
>        }
>    });
>    #
> 
> > ...

I only have the 50-default.rules, I suspect you copied 10-admin.rules from:

https://wiki.gentoo.org/wiki/Polkit


> > These are the USE flags for polkit on this system:
> These are the polkit USE flags here:
> 
>    $ eix -l sys-auth/polkit|grep Installed
>         Installed versions:  0.115-r4(15:10:56 22/10/19)(consolekit gtk
> introspection nls pam -elogind -examples -jit -kde -selinux -systemd -test)
> $
> 
> The only differences I see are  that you are using "elogind" rather than
> "consolekit", and that I'm using "gtk" while you are using "kde".

Yes, this is as it should be.


> If someone could point me  to any missing policy rules,  I would be glad
> to add them.
> 
> Sincerely,
>   Rainer

The thing is you shouldn't have to add polkit actions or rules manually.  As I 
understand it any userspace applications which require access to system 
services should install any rules as dependencies.

A Gentoo user with consolekit and xfce should kindly check their settings and 
compare with yours to see if something is amiss.  I'm thinking, any xfce 
regression bugs ought to affect more than one user at a time, so you shouldn't 
be alone in this.

PS. I had a look at the interwebs for your problem and a user mentioned upower 
(as I did in a previous message) - do you have upower installed?  The xfce 
desktop should have installed this as a dependency:

sys-power/upower
     Available versions:  
            0.99.9-r1 (0/3)     [doc +introspection ios selinux 
KERNEL="FreeBSD linux"]
       ~    0.99.11   (0/3)     [doc +introspection ios selinux 
KERNEL="FreeBSD linux"]
     Installed versions:  0.99.9-r1(0/3)(10:05:06 14/06/19)(introspection -doc 
-ios -selinux KERNEL="linux -FreeBSD")
     Homepage:            https://upower.freedesktop.org/
     Description:         D-Bus abstraction for enumerating power devices, 
querying history and statistics


PPS. This page mentions some troubleshooting steps which you may have not been 
through yet:

https://docs.xfce.org/xfce/xfce4-power-manager/faq

-- 
Regards,

Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to