Subject: [xfce] - power management

From: Herbert Fortes <[email-masked]>
Date: Tue, 6 Sep 2016 10:45:57 -0300

Hi,

I switched from gnome to xfce because the notebook
can not run gnome and pycharm at the same time.

I am facing problems with power management. Suspend
works is I click on the button. Hibernate does not
seems to work properly because I see a lot of 'OK'
when I notebook wakes up.

I tried to config policykit without success. I put a
.pkla file in /etc/polkit-1/localauthority/50-local.d/
about suspend and hibernate:

Identity=unix-user:*
Action=org.freedesktop.XXXXX.XXXXX
ResultActive=yes

XXXXX can be upower|login1 and suspend|hibernate. The
message asking a password says login1.

I also tried putting a file in /usr/share/polkit-1/rules.d/
with:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.suspend" ||
        action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
        action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
    {
        return polkit.Result.YES;
    }
});

# Debian Testing
$ pkaction --version
pkaction version 0.105

If someone can help me please Cc me because I am
not on the list.

Regards,
Herbert

---

From: Stephan Beck <[email-masked]>
Date: Tue, 06 Sep 2016 20:21:00 +0000

Hi Herbert,

I don't have XFCE installed, and I don't have a solution to your problem
right now, but have you checked if your /etc/systemd/logind.conf file
has the option #HandleHibernateKey=hibernate uncommented?

Does your window manager handle this type of ACPI event(s) now?
/usr/bin/xfce4-power-manager

Does acpid handle those events? Check the scripts in /etc/acpid/events
and section Troubleshooting on acpid's man page.

Stephan

---

From: Stephan Beck <[email-masked]>
Date: Tue, 06 Sep 2016 20:13:00 +0000

Hi Herbert,

Stephan

---

From: deloptes <[email-masked]>
Date: Tue, 06 Sep 2016 20:46:31 +0200

Herbert Fortes wrote:

> /etc/polkit-1/

do you have
/usr/share/polkit-1/actions/org.freedesktop.upower.policy

and what is libupower or libupower-glib1 version

I still keep 

hi  policykit-1                            0.105-3                             
amd64        framework for managing administrative policies and privileges
hi  upower                                 0.9.23-2+b1                         
amd64        abstraction for power management

dpkg -l | grep libupower
ii  libupower-glib1                        0.9.17-1                            
amd64        abstraction for power management - shared library

Hibernate and suspend are/were in org.freedesktop.upower.policy

regards