Re: [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED]
On Friday, 17 January 2020 11:18:22 GMT Dr Rainer Woitok wrote: > Mick and All, > > On Saturday, 2019-12-21 12:22:31 +, you wrote: > > ... > > 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. > > Well, it's been a while ... > > In my attempt to hunt down this bug I stumbled upon more than one omiss- > ion, glitch, misinterpretation, you name it that had crept into my init- > ial Gentoo installation. And since I had to fix these anyway, progress > on the initial problem was somewhat slow. > > Eventually I found that > >$ ck-list-sessions >$ > > just returned nothing. There wasn't any ConsoleKit session running at > all! I was using "x11-misc/sddm" as a desktop manager and something had > made it stop starting a ConsoleKit session before starting Xfce. I nev- > er found out what, but found a workaround. Before it starts Xfce "sddm" > sources "~/.xsession", if it exists. Therefore running > >$ echo 'exec ck-launch-session dbus-launch --exit-with-session $@' > > ~/.xsession > > once and then rebooting solves the problem. Within the script sourcing > "~/.xsession" the arguments "$@" will expand to the command (including > arguments) configured to start your session ("startxfce4" in my case) > and the "exec" prefix will simply prevent this script from running "$@" > twice. However, since I also had other reservations about "sddm" I dec- > ided to replace it with "lightdm" which correcly ran out of the box (ex- > cept for configuring the background image and -- most importantly -- the > keyboard layout for entering the password). And "lightdm" does not need > "~/.xsession". > > So finally a big thank you to all the kind people trying to help ... :-) > > Sincerely, > Rainer Glad you got this going and thanks for posting back in case others come across the same problem. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
[gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED]
Mick and All, On Saturday, 2019-12-21 12:22:31 +, you wrote: > ... > 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. Well, it's been a while ... In my attempt to hunt down this bug I stumbled upon more than one omiss- ion, glitch, misinterpretation, you name it that had crept into my init- ial Gentoo installation. And since I had to fix these anyway, progress on the initial problem was somewhat slow. Eventually I found that $ ck-list-sessions $ just returned nothing. There wasn't any ConsoleKit session running at all! I was using "x11-misc/sddm" as a desktop manager and something had made it stop starting a ConsoleKit session before starting Xfce. I nev- er found out what, but found a workaround. Before it starts Xfce "sddm" sources "~/.xsession", if it exists. Therefore running $ echo 'exec ck-launch-session dbus-launch --exit-with-session $@' > ~/.xsession once and then rebooting solves the problem. Within the script sourcing "~/.xsession" the arguments "$@" will expand to the command (including arguments) configured to start your session ("startxfce4" in my case) and the "exec" prefix will simply prevent this script from running "$@" twice. However, since I also had other reservations about "sddm" I dec- ided to replace it with "lightdm" which correcly ran out of the box (ex- cept for configuring the background image and -- most importantly -- the keyboard layout for entering the password). And "lightdm" does not need "~/.xsession". So finally a big thank you to all the kind people trying to help ... :-) Sincerely, Rainer
[gentoo-user] Re: Suspend and Hibernation not working on XFace desktop
On Friday, 20 December 2019 16:14:00 GMT you wrote: > Mick, > > On Friday, 2019-12-20 13:55:29 +, 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 signature.asc Description: This is a digitally signed message part.
[gentoo-user] Re: Suspend and Hibernation not working on XFace desktop
Mick, On Friday, 2019-12-20 13:55:29 +, 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 $ And using "--verbose" I get: $ pkaction --action-id org.freedesktop.consolekit.system.hibernate --verbose org.freedesktop.consolekit.system.hibernate: description: Hibernate the system message: System policy prevents hibernating the system vendor: vendor_url: icon: implicit any: no implicit inactive: no implicit active: yes $ pkaction --action-id org.freedesktop.consolekit.system.suspend --verbose org.freedesktop.consolekit.system.suspend: description: Suspend the system message: System policy prevents suspending the system vendor: vendor_url: icon: implicit any: no implicit inactive: no implicit active: yes $ 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; } }); # > ... > 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". If someone could point me to any missing policy rules, I would be glad to add them. Sincerely, Rainer