Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED No suspend or hibernate options in xfce-power-manager
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 179

PostPosted: Wed May 18, 2016 4:17 am    Post subject: SOLVED No suspend or hibernate options in xfce-power-manager Reply with quote

The xfce power manager is missing suspend/hibernate options, as you can see in this image here. All I can do when I press my power button is "Do Nothing" or "Ask" (and the only option when it asks is to log out...). If I run xfce-power-manager-settings as root, the suspend and hibernate options appear as expected.

I have ACPI and suspend and hibernate enabled in the kernel, and they work if I call them by hand as a sudoer. I have upower and suspend and pm-utils installed, but not upower-pm-utils because upower blocks it supposedly because the newer versions implement the functionality of upower-pm-utils.

Any ideas why the actual useful PM options are all missing from the menus in the xfce power management tool?


Last edited by Drasica on Thu May 19, 2016 3:50 am; edited 1 time in total
Back to top
View user's profile Send private message
derk
Guru
Guru


Joined: 10 Mar 2003
Posts: 347
Location: St Thomas Ontario

PostPosted: Wed May 18, 2016 11:06 am    Post subject: Reply with quote

which version of consolekit are you using? set the pm-utils flag on it
Back to top
View user's profile Send private message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 179

PostPosted: Wed May 18, 2016 10:03 pm    Post subject: Reply with quote

derk wrote:
which version of consolekit are you using? set the pm-utils flag on it


I was using consolekit-1.0.0-r1, which already had the pm-utils flag set. I just updated to 1.1.0 and there was no change.
Back to top
View user's profile Send private message
derk
Guru
Guru


Joined: 10 Mar 2003
Posts: 347
Location: St Thomas Ontario

PostPosted: Wed May 18, 2016 10:54 pm    Post subject: Reply with quote

might be a policykit permissions issue .. are you using policykit? how are you starting your session? is dbus running? .. standard xfce4 install? or something different?

if using xfce4-session w/ logout on panel .. does it show the suspend and hibernate active? is your computer using ..eudev, udev or systemd or something else?

since it shows with root .. must be a permissions issue of some type .. did you make any changes to the default policykit/consolekit/dbus files

.. not quite sure i have enough info at the moment to diagnose the issue completely .. these are just a few areas to consider ..

you can try installing a qt4 or qt5 based tool called qdbusviewer .. and try using it to diagnose the issue .. it will even send commands to activate hibernate and suspend..

does a sudo/gksu pm-suspend or sudo pm-hiberate work?
Back to top
View user's profile Send private message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 179

PostPosted: Thu May 19, 2016 2:00 am    Post subject: Reply with quote

derk wrote:
might be a policykit permissions issue .. are you using policykit? how are you starting your session? is dbus running? .. standard xfce4 install? or something different?


I'm using policykit:
Code:
sys-auth/polkit-0.113::gentoo  USE="gtk introspection nls pam -examples -jit -kde (-selinux) -systemd {-test}"


What type of session do you mean? When I log in I do it from a terminal and then manually run startx to begin an xfce session.

Quote:

if using xfce4-session w/ logout on panel .. does it show the suspend and hibernate active? is your computer using ..eudev, udev or systemd or something else?


No suspend/hibernate options show up. I have both udev and eudev installed, no systemd though.

Quote:
since it shows with root .. must be a permissions issue of some type .. did you make any changes to the default policykit/consolekit/dbus files


I didn't modify any of those files myself. This is a pretty vanilla install. I did it two months ago from scratch, left on vacation, and just this week started customizing things for daily use. /etc/polkit-1/rules.d/ is blank except for 50-default.rules (containing only
Code:
polkit.addAdminRule(function(action, subject) {
    return ["unix-user:0"];
})
.

I do have /etc/dbus-1/system.d/ConsoleKit.conf (why is it system.d if I don't have systemd installed? is it related?)
Code:

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Only root can own the service -->
  <policy user="root">
    <allow own="org.freedesktop.ConsoleKit"/>

    <!-- Allow all methods on interfaces -->
    <allow send_destination="org.freedesktop.ConsoleKit"/>
  </policy>

  <!-- Deny all and then allow some methods on interfaces -->
  <policy context="default">
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.DBus.Introspectable"/>
    <deny send_destination="org.freedesktop.ConsoleKit"
          send_interface="org.freedesktop.ConsoleKit.Manager"/>
    <deny send_destination="org.freedesktop.ConsoleKit"
          send_interface="org.freedesktop.ConsoleKit.Seat"/>
    <deny send_destination="org.freedesktop.ConsoleKit"
          send_interface="org.freedesktop.ConsoleKit.Session"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
          send_interface="org.freedesktop.DBus.Properties" />

    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Restart"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanRestart"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Stop"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanStop"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Reboot"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanReboot"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="PowerOff"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanPowerOff"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Suspend"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanSuspend"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Hibernate"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanHibernate"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="HybridSleep"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CanHybridSleep"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="Inhibit"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="ListInhibitors"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="OpenSession"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="CloseSession"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSeats"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessions"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessionForCookie"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessionForUnixProcess"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetCurrentSession"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessionsForUnixUser"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSessionsForUser"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSystemIdleHint"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Manager"
           send_member="GetSystemIdleSinceHint"/>

    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="GetId"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="GetSessions"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="GetDevices"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="GetActiveSession"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="CanActivateSessions"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Seat"
           send_member="ActivateSession"/>

    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetId"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetSeatId"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetLoginSessionId"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetSessionType"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetUser"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetUnixUser"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetXDGRuntimeDir"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetX11Display"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetX11DisplayDevice"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetDisplayDevice"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetRemoteHostName"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="IsActive"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="IsLocal"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetCreationTime"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="Activate"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetIdleHint"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="SetIdleHint"/>
    <allow send_destination="org.freedesktop.ConsoleKit"
           send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="GetIdleSinceHint"/>
    <allow send_interface="org.freedesktop.ConsoleKit.Session"
           send_member="SetIdleHint"/>
  </policy>

</busconfig>


and /etc/dbus-1/system-d/org.freedesktop.PolicyKit1.conf
Code:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy user="polkitd">
    <allow own="org.freedesktop.PolicyKit1"/>
  </policy>

  <policy context="default">
    <allow send_destination="org.freedesktop.PolicyKit1"/>
  </policy>

  <!-- Allow uid 0 to send messages on the org.freedesktop.PolicyKit1.AuthenticationAgent interface -->
  <policy user="polkitd">
    <allow send_interface="org.freedesktop.PolicyKit1.AuthenticationAgent"/>
  </policy>

</busconfig>


Quote:
you can try installing a qt4 or qt5 based tool called qdbusviewer .. and try using it to diagnose the issue .. it will even send commands to activate hibernate and suspend..


I've installed it, but not seeing anything enlightening when I try to do a hibernate. This is what shows up. Suspend works already but still doesn't appear in any of my menus.

Quote:
does a sudo/gksu pm-suspend or sudo pm-hiberate work?

both work
Back to top
View user's profile Send private message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 179

PostPosted: Thu May 19, 2016 3:48 am    Post subject: Solved Reply with quote

I solved it, my .xinitrc wasn't starting a consolekit session. Solution came from the first reply here: https://forums.gentoo.org/viewtopic-t-836949-highlight-.html

Thanks Derk for your time + effort, your suggestions were helpful for me to learn my way around this hibernation/consolekit/policykit rats nest.
Back to top
View user's profile Send private message
derk
Guru
Guru


Joined: 10 Mar 2003
Posts: 347
Location: St Thomas Ontario

PostPosted: Thu May 19, 2016 9:20 am    Post subject: Reply with quote

FYI: the original consolekit was superceded by systemd and work on it abandoned.. the current (consolekit2 source code) versions were forked from the original and developed further. consolekit2 is actively developed and emulates some systemd behaviours thus .. it uses policykit/dbus/protocols for these operations .. thus those references .. but it is not part of systemd. At least one major xfce developer is part of this effort.

the consolekit in gentoo is built from the consolekit2 source and renamed by the ebuild.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum