Xfce Power Manager Troubleshooting
Suspend and backlight issues.
As of 05/15/2020, there are 2 rules files missing from /etc/polkit-1/ that are required to make xfce4-power-manager work properly. One is for the backlight permission and the other is for suspend permission. The specific error message is "authentication is required to suspend the system" & "authentication is required to modify laptop display brightness"
In order to get suspend issue corrected perform the following:
- 1) Create the '/etc/polkit-1/rules.d' directory
$ sudo su # mkdir /etc/polkit-1/rules.d
- 2) Correct the permissions for the directory
# chmod 755 /etc/polkit-1/rules.d
- 3) Create a new file called /etc/polkit-1/rules.d/85-suspend.rules
# vi /etc/polkit-1/rules.d/85-suspend.rules
- 4) Add the following text to the new file called '/etc/polkit-1/rules.d/85-suspend.rules'
polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.login1.suspend" && subject.isInGroup("users")) { return polkit.Result.YES; } });
- 5) Correct the permissions on the file '/etc/polkit-1/rules.d/85-suspend.rules'
# chmod 644 /etc/polkit-1/rules.d/85-suspend.rules
6) Edit the file '/usr/share/polkit-1/actions/org.freedesktop.login1.policy' and change the "suspend" rules to <allow_any>yes</allow_any>
The process is similar to fix the backlight modification authentication errors.
- 1) Create the '/etc/polkit-1/rules.d' directory ("if it doesn't exist")
$ sudo su # mkdir /etc/polkit-1/rules.d
- 2) Correct the permissions for the directory ("if created above, in step 1")
# chmod 755 /etc/polkit-1/rules.d
- 3) Create a new file called /etc/polkit-1/rules.d/89-backlight.rules
# vi /etc/polkit-1/rules.d/89-backlight.rules
- 4) Add the following text to the new file called '/etc/polkit-1/rules.d/89-backlight.rules'
polkit.addRule(function(action, subject) { if (action.id == "org.xfce.power.backlight-helper" && subject.isInGroup("users")) { return polkit.Result.YES; } });
- 5) Correct the permissions on the file '/etc/polkit-1/rules.d/89-backlight.rules'
# chmod 644 /etc/polkit-1/rules.d/89-backlight.rules
6) Edit the file '/usr/share/polkit-1/actions/org.freedesktop.login1.policy' and change the "backlight" rules to <allow_any>yes</allow_any>
This will stop the 'authentication' errors and it will also stop xfce4 from blanking the screen / suspending "BEFORE" locking which is the workaround suggested in other fixes using the GUI only.