3

I'd like to be able to suspend-then-hibernate automatically with xfce4-power-manager, though I'm not sure if this is possible.

I believe this is a permission error with polkit1 because:

$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.6.1
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: False
Authorized to suspend: True
Authorized to hibernate: False
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True

My polkitsettings under/usr/share/polkit-1/actions/org.freedesktop.login1.policyare identical for suspend and hibernate, so it doesn't make much sense whenxfce-power-manager` can't access hibernate options.

According to How to go automatically from Suspend into Hibernate?: I've created /etc/systemd/sleep.conf and tested it. The following command does work (suspend and then hibernates according to sleep.conf):

sudo systemctl suspend-then-hibernate

But this does not work when I use xfce4-power-manager to do the suspension.

A post I found (How to go automatically from Suspend into Hibernate?) is similar, but is not exactly what I'm trying to do. I don't care about lid closed operation, I want everything time related.

cts
  • 31

1 Answers1

6

I had a similar problem, and found your question before I stumbled on the answer:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s true

This page is where I found the answer:

https://docs.xfce.org/xfce/xfce4-power-manager/faq

If you want everything time related, then you can set them with settings in systemd and logind.conf

Here's a place to start:

https://wiki.archlinux.org/index.php/systemd#Power_management

I hope this helps you!

Chris
  • 61