I installed xfce4-power-manager after installing FreeBSD 12.1-RELEASE. At first the slider for suspend/hibernate was not moving "Hibernate and suspend operations not permitted" when started as a user. So I set up sudo and the slider was working when started from terminal with sudo. Suspend worked on and off but all of a sudden even with sudo the slider is gray-out with "Hibernate and suspend blah blah". While searching the forum I found solutions that worked, I believe for some people. Below are changes made so far based on advises from the forum:
I would like to have "Authorized to suspend: True" and "Authorized to hibernate: True".
/usr/local/etc/polkit-1/rules.d/50-default.rules
I will appreciate some help. I do believe changing these "Authorized to suspend: True" and "Authorized to hibernate: True" is key but I could be wrong.
Regards,
Code:
$ xfce4-power-manager --dump --------------------------------------------------- Xfce power manager version 1.6.5 With policykit support Without network manager support --------------------------------------------------- Can suspend: True Can hibernate: True Authorized to suspend: False Authorized to hibernate: False Authorized to shutdown: False Has battery: False Has brightness panel: False Has power button: True Has hibernate button: False Has sleep button: True Has battery button: True Has LID: True
I would like to have "Authorized to suspend: True" and "Authorized to hibernate: True".
/usr/local/etc/polkit-1/rules.d/50-default.rules
Code:
polkit.addRule(function (action, subject) { if ((action.id == "org.freedesktop.consolekit.system.restart" || action.id == "org.freedesktop.consolekit.system.stop") && subject.isInGroup("operator")) { return polkit.Result.YES; } }); For those who have working suspend/resume: polkit.addRule(function (action, subject) { if (action.id == "org.freedesktop.consolekit.system.suspend" && subject.isInGroup("operator")) { return polkit.Result.YES; } });
Code:
$ sysctl hw.acpi.supported_sleep_state hw.acpi.supported_sleep_state: S3 S4 S5
I will appreciate some help. I do believe changing these "Authorized to suspend: True" and "Authorized to hibernate: True" is key but I could be wrong.
Regards,