Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xfce4-power-manager cannot suspend or hibernate
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
jacobsenscott
n00b
n00b


Joined: 14 Jul 2010
Posts: 4

PostPosted: Thu Jul 22, 2010 4:18 pm    Post subject: xfce4-power-manager cannot suspend or hibernate Reply with quote

I have xfce4-power-manager installed, but the suspend and hibernate options are disabled. I can't figure out what I need to do to enable them. I have emerged
xfce-extra/xfce4-power-manager-0.9.98 USE="networkmanager plugins policykit -debug -doc

I have hald and dbus emerged and running.

The only clue I have so far is when I run xfce4-power-manager-settings from the command line the console shows:

(xfce4-power-manager-settings:6886): xfconf-WARNING **: Error check failed at xfconf_channel_get_internal():441: Property "/xfce4-power-manager/lock-screen-suspend-hibernate" does not exist on channel "xfce4-power-manager"

Any ideas?
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Thu Jul 22, 2010 4:35 pm    Post subject: Reply with quote

xfce-extra/xfce4-power-manager-0.9.98 doesn't use hald, it's using upower (udev). in fact, hald could just be messing it up...

Some ideas...

Make sure consolekit system is running:

Code:

# /etc/init.d/consolekit start
# rc-update add consolekit default


As a user. Make sure consolekit session is running.

Code:

$ cat ~/.xinitrc
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session xfce4-session
$ startx


Last edited by ssuominen on Thu Sep 23, 2010 7:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
jacobsenscott
n00b
n00b


Joined: 14 Jul 2010
Posts: 4

PostPosted: Thu Jul 22, 2010 5:05 pm    Post subject: Reply with quote

Yes, consolekit is running:

Code:
% sudo /etc/init.d/consolekit status                 07/22/10 11:03
 * status: started


My xinitrc:
Code:
exec ck-launch-session startxfce4


I start x using the slim XDM package.

I noticed when I run xfce4-power-manager as root I do have the hibernate/suspend options.

Also noticed gnome-power-manager does have the suspend/hibernate options when run as a regular user.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Thu Jul 22, 2010 9:58 pm    Post subject: Reply with quote

...

Last edited by ssuominen on Thu Sep 23, 2010 7:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
jacobsenscott
n00b
n00b


Joined: 14 Jul 2010
Posts: 4

PostPosted: Fri Jul 23, 2010 1:42 am    Post subject: Reply with quote

Neither exec ck-launch-session startxfce4 nor exec ck-launch-session xfce4-session work. In either case the suspend and hibernate options are disabled. The gentoo xfce configuration guide does say to use startxfce4, but maybe there's an error in that guide. http://www.gentoo.org/doc/en/xfce-config.xml
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Fri Jul 23, 2010 8:25 am    Post subject: Reply with quote

jacobsenscott wrote:
Neither exec ck-launch-session startxfce4 nor exec ck-launch-session xfce4-session work. In either case the suspend and hibernate options are disabled. The gentoo xfce configuration guide does say to use startxfce4, but maybe there's an error in that guide. http://www.gentoo.org/doc/en/xfce-config.xml


Try with USE="-policykit" in xfce4-power-manager. Or install =gnome-extra/polkit-gnome-0.96-r1 (or above) and restart the desktop.

Also, http://foo-projects.org/pipermail/xfce/2010-May/027130.html
It should work without, but as last resort: http://foo-projects.org/pipermail/xfce/2010-May/027134.html

EDIT: Found it, see http://bugzilla.xfce.org/show_bug.cgi?id=6462
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Tue Aug 31, 2010 3:31 pm    Post subject: Reply with quote

This should be fixed with xfce4-power-manager-1.0.1
Back to top
View user's profile Send private message
jacobsenscott
n00b
n00b


Joined: 14 Jul 2010
Posts: 4

PostPosted: Mon Sep 20, 2010 3:40 pm    Post subject: Still can't susped/hibernate through xfce4-power-manager Reply with quote

I'm really stumped. I'm missing some permission and I have no idea what it could be.

If I run sudo xfce4-power-manager then the hibernate/suspend options are enabled. If I run it as my regular user they are disabled.

I have consolekit and policykit and hal enabled. I have xfce4-power-manager 1.0.1. I've tried using both the SlIM and GDM login managers. I created the polkit permissions file like described here: http://foo-projects.org/pipermail/xfce/2010-May/027134.html

My user is in the following groups:
lp wheel cron audio cdrom video games cdrw usb pulse-access vboxusers crontab polkituser scanner pulse scott

Here is the output of xfce4-power-manager --dump
---------------------------------------------------
Xfce power manager version 1.0.1
Without HAL support
With policykit support
With network manager support
With DPMS support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Can spin down hard disks: True
Authorized to suspend: False
Authorized to hibernate: False
Authorized to shutdown: False
Authorized to spin down hard disks: False
Has brightness panel: False
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True

Also, in xfce4-power-manager-settings in the 'On Ac' -> 'Actions' -> 'When laptop lid is closed' pull down suspend and hibernate are available. They are not available in the 'On Battery' section or the 'General' section. So maybe there is a bug in the settings manager that doesn't properly populate that pull down. Also setting it to 'Suspend' doesn't actually suspend the machine.
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Tue Sep 21, 2010 3:33 am    Post subject: Reply with quote

Same here. I just completed un-HALing my laptop, setting up udisks, upower, policykit; you name it. Even though my xfce4-power-manager dump shows that I'm authorized to do things like suspend, hibernate, and shutdown, I can't actually do those things from the Xfce logout dialog. HAL isn't running, which I guess is why those buttons are disabled.

Now, I can suspend/hibernate by pressing the Fn buttons on my laptop, or by right-clicking the X-P-M panel applet and choosing the appropriate action from the dropdown menu. But I can't access anything on the Xfce logout dialog except "logout," and even pressing the power button on my laptop doesn't do what it's supposed to do, which is "ask what to do," as configured in X-P-M.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Tue Sep 21, 2010 8:00 am    Post subject: Reply with quote

nightmorph wrote:
Same here. I just completed un-HALing my laptop, setting up udisks, upower, policykit; you name it. Even though my xfce4-power-manager dump shows that I'm authorized to do things like suspend, hibernate, and shutdown, I can't actually do those things from the Xfce logout dialog. HAL isn't running, which I guess is why those buttons are disabled.

Now, I can suspend/hibernate by pressing the Fn buttons on my laptop, or by right-clicking the X-P-M panel applet and choosing the appropriate action from the dropdown menu. But I can't access anything on the Xfce logout dialog except "logout," and even pressing the power button on my laptop doesn't do what it's supposed to do, which is "ask what to do," as configured in X-P-M.


You'll need at least xfce4-session-4.7.0 (the p.masked) version for HAL-less Suspend and Hibernate in The Logout buttons. It'll then use UPower. Yes, this means the Logout buttons *are not using* xfce4-power-manager and are a separate entity.

And you might even want at least xfce-utils-4.7.0 (the p.masked) version to get consolekit started properly with dbus-launch from xinitrc/startxfce4

Otherwise it requires or might require without display manager, like GDM, some annoying manual setting I dont want to go into details here... The p.masked Xfce4 is generally very safe to use by now, I'm seriously considering unmasking it into ~arch soon
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Tue Sep 21, 2010 8:12 am    Post subject: Reply with quote

ssuominen wrote:
You'll need at least xfce4-session-4.7.0 (the p.masked) version for HAL-less Suspend and Hibernate in The Logout buttons. It'll then use UPower. Yes, this means the Logout buttons *are not using* xfce4-power-manager and are a separate entity.

Otherwise it requires or might require without display manager, like GDM, some annoying manual setting I dont want to go into details here... The p.masked Xfce4 is generally very safe to use by now, I'm seriously considering unmasking it into ~arch soon

Awesome! I'll try this immediately. Thanks for the pointers.
ssuominen wrote:
And you might even want at least xfce-utils-4.7.0 (the p.masked) version to get consolekit started properly with dbus-launch from xinitrc/startxfce4

How does the startup command differ from what's documented in my Xfce guide? Something different to put in ~/.xinitrc? This is the first I've heard of it. Right now the guide only mentions consolekit; there's nothing in there about ~arch bits like udisks/upower/PolicyKit. Since those are supposedly the future, if Xfce ever gets all its components working with 'em, then I need to document 'em in the guide.


Last edited by 96140 on Tue Sep 21, 2010 8:36 am; edited 1 time in total
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Tue Sep 21, 2010 8:23 am    Post subject: Reply with quote

ssuominen wrote:
And you might even want at least xfce-utils-4.7.0 (the p.masked) version to get consolekit started properly with dbus-launch from xinitrc/startxfce4

Quote:
How does the startup command differ from what's documented in my Xfce guide? Something different to put in ~/.xinitrc?


startxfce4 is using file /etc/xdg/xfce4/xinitrc which in xfce-utils-4.7.0 is calling:

ck-launch-session dbus-launch --sh-syntax --exit-with-session xfce4-session

I'm not sure if the equivalent of that would be:

ck-launch-session dbus-launch --sh-syntax --exit-with-session startxfce4

to ~/.xinitrc

but if you choose to use xfce-utils-4.7.0, all you need is: exec startxfce4 in .xinitrc and the startxfce4 script will do all the ck-launch-session stuff for you.
Back to top
View user's profile Send private message
figueroa
Apprentice
Apprentice


Joined: 14 Aug 2005
Posts: 221
Location: GA-USA

PostPosted: Mon Oct 18, 2010 4:20 pm    Post subject: Reply with quote

Quote:
I'm not sure if the equivalent of that would be:

ck-launch-session dbus-launch --sh-syntax --exit-with-session startxfce4

to ~/.xinitrc


I'm glad I stumbled on this thread. I can verify that using the quoted line in .xinitrc does work with the stable xfce4-power-manager. I needed that. It also solved my polkit problem.
_________________
Andy Figueroa
andy@andyfigueroa.us
Back to top
View user's profile Send private message
supernovae
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2004
Posts: 82

PostPosted: Thu Nov 11, 2010 10:58 am    Post subject: Reply with quote

ssuominen wrote:
ssuominen wrote:
And you might even want at least xfce-utils-4.7.0 (the p.masked) version to get consolekit started properly with dbus-launch from xinitrc/startxfce4

Quote:
How does the startup command differ from what's documented in my Xfce guide? Something different to put in ~/.xinitrc?


startxfce4 is using file /etc/xdg/xfce4/xinitrc which in xfce-utils-4.7.0 is calling:

ck-launch-session dbus-launch --sh-syntax --exit-with-session xfce4-session

I'm not sure if the equivalent of that would be:

ck-launch-session dbus-launch --sh-syntax --exit-with-session startxfce4

to ~/.xinitrc

but if you choose to use xfce-utils-4.7.0, all you need is: exec startxfce4 in .xinitrc and the startxfce4 script will do all the ck-launch-session stuff for you.


I've just upgraded to the ~amd64 masked xfce packages and i had a look through /etc/xdg/xfce4/xinitrc and nowhere could i find reference to launching consolekit. I was looking as i'm having issues with permissions, i launch xfce from xinitrc with
Code:
exec ck-launch-session startxfce4
this does not seem to give me the correct polkit permissions. If its of any note i autostart X on boot for my user with mingetty using .bashrc to run startx.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Thu Nov 11, 2010 12:00 pm    Post subject: Reply with quote

supernovae wrote:

I've just upgraded to the ~amd64 masked xfce packages and i had a look through /etc/xdg/xfce4/xinitrc and nowhere could i find reference to launching consolekit. I was looking as i'm having issues with permissions, i launch xfce from xinitrc with
Code:
exec ck-launch-session startxfce4
this does not seem to give me the correct polkit permissions. If its of any note i autostart X on boot for my user with mingetty using .bashrc to run startx.


Such a way to launch X is not supported. You'd need to hook ConsoleKit's pam_ck_connector.so to that launching way on your own...

You need to login into a shell first to get initial ConsoleKit session from pam_ck_connector.so (seen by ck-list-sessions)
And then startx to get second ConsoleKit session passed from the first one (now you see 2 sessions in ck-list-sessions, the latter one active)

With your method you propably never get the initial session, and the second session ends up broken...

Or...

Use GDM or KDM to do this for you.
Back to top
View user's profile Send private message
supernovae
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2004
Posts: 82

PostPosted: Thu Nov 11, 2010 12:18 pm    Post subject: Reply with quote

ssuominen wrote:
supernovae wrote:

I've just upgraded to the ~amd64 masked xfce packages and i had a look through /etc/xdg/xfce4/xinitrc and nowhere could i find reference to launching consolekit. I was looking as i'm having issues with permissions, i launch xfce from xinitrc with
Code:
exec ck-launch-session startxfce4
this does not seem to give me the correct polkit permissions. If its of any note i autostart X on boot for my user with mingetty using .bashrc to run startx.


Such a way to launch X is not supported. You'd need to hook ConsoleKit's pam_ck_connector.so to that launching way on your own...

You need to login into a shell first to get initial ConsoleKit session from pam_ck_connector.so (seen by ck-list-sessions)
And then startx to get second ConsoleKit session passed from the first one (now you see 2 sessions in ck-list-sessions, the latter one active)

With your method you propably never get the initial session, and the second session ends up broken...

Or...

Use GDM or KDM to do this for you.


Also afaik my method gets a login shell that runs startx, this should for all intensive purposes be the same as logging in and then running `startx`.

I do get 2 ck sessions.
Code:

Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty6'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2010-11-11T09:49:24.229483Z'
   login-session-id = ''
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat2'
   session-type = ''
   active = FALSE
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = '/dev/tty6'
   remote-host-name = ''
   is-local = FALSE
   on-since = '2010-11-11T09:49:29.209649Z'
   login-session-id = ''

However they do not seem to be initialized correctly.

While i'm happy to use gdm for the time being(emerging it as we speak) i don't think that simply having to use a graphical login manager is an acceptable final solution.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Thu Nov 11, 2010 12:52 pm    Post subject: Reply with quote

supernovae wrote:

Code:

   login-session-id = ''

However they do not seem to be initialized correctly.

While i'm happy to use gdm for the time being(emerging it as we speak) i don't think that simply having to use a graphical login manager is an acceptable final solution.


login-session-id shouldn't be empty, it could be that you have misconfigured kernel

Kernel option "CONFIG_AUDITSYSCALL=y" is required to get /proc/<pid>/sessionid for ConsoleKit to work outside of graphical login managers.
Back to top
View user's profile Send private message
supernovae
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2004
Posts: 82

PostPosted: Thu Nov 11, 2010 1:03 pm    Post subject: Reply with quote

ssuominen wrote:
supernovae wrote:

Code:

   login-session-id = ''

However they do not seem to be initialized correctly.

While i'm happy to use gdm for the time being(emerging it as we speak) i don't think that simply having to use a graphical login manager is an acceptable final solution.


login-session-id shouldn't be empty, it could be that you have misconfigured kernel

Kernel option "CONFIG_AUDITSYSCALL=y" is required to get /proc/<pid>/sessionid for ConsoleKit to work outside of graphical login managers.


Bugger, i knew i'd missed something while i was upgrading to ~amd64, i'll rebuild my kernel and see what changes. Thanks for the heads up.
Back to top
View user's profile Send private message
supernovae
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2004
Posts: 82

PostPosted: Thu Nov 11, 2010 1:29 pm    Post subject: Reply with quote

ssuominen wrote:
supernovae wrote:

Code:

   login-session-id = ''

However they do not seem to be initialized correctly.

While i'm happy to use gdm for the time being(emerging it as we speak) i don't think that simply having to use a graphical login manager is an acceptable final solution.


login-session-id shouldn't be empty, it could be that you have misconfigured kernel

Kernel option "CONFIG_AUDITSYSCALL=y" is required to get /proc/<pid>/sessionid for ConsoleKit to work outside of graphical login managers.


Yep, seems thats all it needed. Removable disks(USB) now mount without a fuss and i have suspend back :)

Thanks once again.
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1316
Location: /uk/sheffield

PostPosted: Tue Jan 11, 2011 8:18 am    Post subject: Reply with quote

Running ~amd64 and this seems to have reappeared with xfce-power-manager-1.0.3 and...

figueroa wrote:
Quote:
I'm not sure if the equivalent of that would be:

ck-launch-session dbus-launch --sh-syntax --exit-with-session startxfce4

to ~/.xinitrc


I'm glad I stumbled on this thread. I can verify that using the quoted line in .xinitrc does work with the stable xfce4-power-manager. I needed that. It also solved my polkit problem.


...doesn't resolve the problem for me. I have consolekit added to my default run-level as also mentioned.

There doesn't seem to be any mention of 'ck-session' in /etc/xdg/xfce4/xinitrc either (nor startxfce4 either come to that, although there is xfce4-session being executed).

Bug 349052 mentiones that consolekit-0.4.3 needs to be stabilised before xfce4-meta-4.8_pre will be stabilised, but that doesn't seem to be the issue (only SPARC reported a problem that was resolved).

Pretty stumped, so any ideas appreciated.
_________________
"Science is what we understand well enough to explain to a computer.  Art is everything else we do." - Donald Knuth
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2105
Location: Finland

PostPosted: Tue Jan 11, 2011 10:58 am    Post subject: Reply with quote

This thread is outdated. Some of the information on it too. I suggest following:

http://forums.gentoo.org/viewtopic-t-858965-highlight-tips+tricks.html
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1316
Location: /uk/sheffield

PostPosted: Tue Jan 11, 2011 11:20 am    Post subject: Reply with quote

ssuominen wrote:
This thread is outdated. Some of the information on it too. I suggest following:

http://forums.gentoo.org/viewtopic-t-858965-highlight-tips+tricks.html


Excellent, thanks for the pointer.

I'm often loathe to start a new thread when there is one that already exists on a given topic, hence the resurrection.

Either way, thanks for the write-up on console/policy kit, will get to work on solving my problems.

Cheers,

slack
_________________
"Science is what we understand well enough to explain to a computer.  Art is everything else we do." - Donald Knuth
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Wed Jan 12, 2011 2:11 pm    Post subject: Reply with quote

Moved from Desktop Environments to Duplicate Threads, please see Tips, and tricks for ConsoleKit/PolicyKit/udev, without hal.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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