* [gentoo-user] Suspend and Hibernation not working on XFace desktop @ 2019-12-20 13:55 Mick 2019-12-20 16:14 ` [gentoo-user] " Dr Rainer Woitok 0 siblings, 1 reply; 6+ messages in thread From: Mick @ 2019-12-20 13:55 UTC (permalink / raw To: gentoo-user; +Cc: Dr Rainer Woitok [-- Attachment #1: Type: text/plain, Size: 2111 bytes --] Rainer, 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 I suppose xface would install similar? These are the USE flags for polkit on this system: $ equery u sys-auth/polkit [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for sys-auth/polkit-0.115-r4: U I - - consolekit : Use sys-auth/consolekit for session tracking + + elogind : Use sys-auth/elogind for session tracking - - examples : Install examples, usually source code - - gtk : Add support for x11-libs/gtk+ (The GIMP Toolkit) + + introspection : Add support for GObject based introspection - - jit : Enable just-in-time compilation for improved performance. May prevent use of some PaX memory protection features in Gentoo Hardened. + + kde : Add support for software made by KDE, a free software community + + nls : Add Native Language Support (using gettext - GNU locale utilities) + + pam : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip - - systemd : Use sys-apps/systemd for session tracking - - test : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop 2019-12-20 13:55 [gentoo-user] Suspend and Hibernation not working on XFace desktop Mick @ 2019-12-20 16:14 ` Dr Rainer Woitok 2019-12-21 12:22 ` Mick 0 siblings, 1 reply; 6+ messages in thread From: Dr Rainer Woitok @ 2019-12-20 16:14 UTC (permalink / raw To: Mick; +Cc: gentoo-user 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 $ 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop @ 2019-12-21 12:22 ` Mick 2019-12-21 12:22 ` Mick 2020-01-17 11:18 ` [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] Dr Rainer Woitok 0 siblings, 2 replies; 6+ messages in thread From: Mick @ 2019-12-21 12:22 UTC (permalink / raw To: gentoo-user --nextPart1816019.02x4Fs9hru Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" 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 --nextPart1816019.02x4Fs9hru Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEt7MNaGaS6HvTUrEz6WnU8jC95dcFAl3+DocACgkQ6WnU8jC9 5dfogA//cIYWUDZ8DZXQ9Z9gQ7AedVWRuelHkyjUU8j1T2yeVWrwMMZE5Kor4PLn xjtdZBlUM6W3C+BdZjV6sSMA8ec7pnh67+Y/Ml6Dg0J50kwsSV4HqJzSVPf4NfoS mBdf3U3SXX5LgY+5NUDz8cYSj8hNjQ9TacVLRLW94LoNd0gk7nqXG6o17OrjaQqb K74hp66R3PgbaFjb/X82pIOXU2EYo8fqLKzh5y7TYPVfTi4XHkw0Hz8RWLLqnjuN JODhOaqEAefYT8U3KaWYfp3YgtE1fy4YDC+IpmbhZBRsQxO1MJu6pXfZoTqxjTOk Y/82mI//sifXmfqk93Ql3sBGpg1dYu5JZbTZSJ04d7dopMQVVmwx18Ic6KOC2UNa BPvvVEqpoH8EZl4vT0EgMLmrgD+TYJX4BmtUgL/M2acBwcdxJukzBEVz8ee7zs4T KAFKsqaycPiJtbn+3BDKrcPu6rAKjUcgD5OVQMEntANy2FIZw+XCjloxN08/7Y1s RlmCynp1A0N8WLIv6r1UsZh7rGgM8wnHkIT/CPJeKNWeaes7D6vC2ZrEVr3VS9bD Q2gFhqr3xP4doXVce5Mo7k/TCi7QK+B3L61dKPGsc/b3vylmt/YYAv6S4tIBtT1h UBAjrYVeVI5lk/NRcczpKgp4rKApgwmjv/UXH2NGrkioyHkNKjo= =mJxM -----END PGP SIGNATURE----- --nextPart1816019.02x4Fs9hru-- ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop 2019-12-21 12:22 ` Mick @ 2019-12-21 12:22 ` Mick 2020-01-17 11:18 ` [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] Dr Rainer Woitok 1 sibling, 0 replies; 6+ messages in thread From: Mick @ 2019-12-21 12:22 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 4417 bytes --] 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 #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] 2019-12-21 12:22 ` Mick 2019-12-21 12:22 ` Mick @ 2020-01-17 11:18 ` Dr Rainer Woitok 2020-01-17 14:06 ` Mick 1 sibling, 1 reply; 6+ messages in thread From: Dr Rainer Woitok @ 2020-01-17 11:18 UTC (permalink / raw To: gentoo-user Mick and All, On Saturday, 2019-12-21 12:22:31 +0000, 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] 2020-01-17 11:18 ` [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] Dr Rainer Woitok @ 2020-01-17 14:06 ` Mick 0 siblings, 0 replies; 6+ messages in thread From: Mick @ 2020-01-17 14:06 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2071 bytes --] On Friday, 17 January 2020 11:18:22 GMT Dr Rainer Woitok wrote: > Mick and All, > > On Saturday, 2019-12-21 12:22:31 +0000, 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 [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-17 14:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-12-20 13:55 [gentoo-user] Suspend and Hibernation not working on XFace desktop Mick 2019-12-20 16:14 ` [gentoo-user] " Dr Rainer Woitok 2019-12-21 12:22 ` Mick 2019-12-21 12:22 ` Mick 2020-01-17 11:18 ` [gentoo-user] Re: Suspend and Hibernation not working on XFace desktop [SOLVED] Dr Rainer Woitok 2020-01-17 14:06 ` Mick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox