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:

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

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.

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.

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.

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

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

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.net Working with Unix since 1983.

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.

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...

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`.