Power manager is asking for authentication to perform automatic suspend.

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Laurentius

Power manager is asking for authentication to perform automatic suspend.

Post by Laurentius »

Power manager is asking for authentication to perform automatic suspend.

When idle for the suspend-time, i find the login window, then log in, then i see this window:
“Authentication is required to place the system in suspend or hibernate mode
An aplication is attempting to perform an action that requires privileges.
Authentication as one of the users below is required to perform this action.”

if i give the password, then it suspends.

Obviously, this means i have no power saving at all (only screensaver works). The system won't never suspend by itself.

I'm running LM 18.3 xfce. I have never had this authentication issue on earlier releases,

Another issue related to Power Manager: Sometimes, suspend shortcut (XF86Sleep) stops working. If i restart session, it works again.

EDIT:
i've been trying some things.
Found this on the web: https://forum.xfce.org/viewtopic.php?id=11254.

So, I tried disabling dpms.

Code: Select all

mint18@CQ40 ~ $ xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/blank-on-ac                        0
/xfce4-power-manager/blank-on-battery                   5
/xfce4-power-manager/brightness-level-on-ac             40
/xfce4-power-manager/brightness-on-ac                   9
/xfce4-power-manager/brightness-on-battery              100
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  -1
/xfce4-power-manager/critical-power-action              2
/xfce4-power-manager/dpms-enabled                       false
/xfce4-power-manager/dpms-on-ac-off                     0
/xfce4-power-manager/dpms-on-ac-sleep                   0
/xfce4-power-manager/dpms-on-battery-sleep              8
/xfce4-power-manager/hibernate-button-action            2
/xfce4-power-manager/inactivity-on-ac                   2
/xfce4-power-manager/inactivity-on-battery              15
/xfce4-power-manager/inactivity-sleep-mode-on-battery   1
/xfce4-power-manager/lid-action-on-ac                   0
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/lock-screen-suspend-hibernate      true
/xfce4-power-manager/logind-handle-lid-switch           true
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/presentation-mode                  false
/xfce4-power-manager/show-tray-icon                     1
/xfce4-power-manager/sleep-button-action                1


With this settings automatic suspend works ok at the expected time (2΅)

So, there must be something with the dpms, screen saving/ locker.
I find there is a strange behaviour with screen saving when enabled
If i set this
a) dpms:
-blank: 1 minute
-sleep: 2 minutes
-off: 3 minutes

b) Security: Light locker: auto lock session when the screensaver is activated - Delay locking after screensaver for 15 seconds

c) and system suspend at 5 minutes,

so xfconf-query -c xfce4-power-manager -lv looks like this

Code: Select all

mint18@CQ40 ~ $ xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/blank-on-ac                        1
/xfce4-power-manager/blank-on-battery                   5
/xfce4-power-manager/brightness-level-on-ac             40
/xfce4-power-manager/brightness-on-ac                   9
/xfce4-power-manager/brightness-on-battery              100
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  0
/xfce4-power-manager/critical-power-action              2
/xfce4-power-manager/dpms-enabled                       true
/xfce4-power-manager/dpms-on-ac-off                     3
/xfce4-power-manager/dpms-on-ac-sleep                   2
/xfce4-power-manager/dpms-on-battery-sleep              8
/xfce4-power-manager/hibernate-button-action            2
/xfce4-power-manager/inactivity-on-ac                   5
/xfce4-power-manager/inactivity-on-battery              15
/xfce4-power-manager/inactivity-sleep-mode-on-battery   1
/xfce4-power-manager/lid-action-on-ac                   0
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/lock-screen-suspend-hibernate      true
/xfce4-power-manager/logind-handle-lid-switch           true
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/presentation-mode                  false
/xfce4-power-manager/show-tray-icon                     1
/xfce4-power-manager/sleep-button-action                1
This is what happens:

at the expected blank time, the screen of my laptop turns off (or blanks, i can't tell the difference between them).
Then, 15 seconds later the screen turns on at the login screen of lightdm. This is the locker effect. But why turn on the screen? Then the screen remains on for about 10 minutes from the blank time (11 minutes after idle) and then turns off again.
The suspend time is apparently ignored.
Notice that this "10 minutes" value is not set anywhere at the xfce4-power-manager. It comes from somewhere else.
No suspend at all.

Then, if i press any key. and enter password at the login screen, the screen unlocks and i get the window asking for password to suspend (or cancel)

so, it seems the problem is when the locker activates. But i'm not sure.

EDIT 2:
I think i found the correct settings:
On Power Manager > Security tab, I set Light locker to Automatically lock the session: When the screensaver is deactivated

That solves the problem. Screen saving and System power saving work as expected now.
Thank you.

Specs:
System: Host: CQ40 Kernel: 4.10.0-40-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Xfce 4.12.3 (Gtk 2.24.28) Distro: Linux Mint 18.3 Sylvia
Machine: System: Hewlett-Packard (portable) product: Compaq Presario CQ40 Notebook PC v: F.31
Mobo: Compal model: 3607 v: 99.97
Bios: Hewlett-Packard v: F.31 date: 02/03/2009
CPU: Dual core Pentium T4200 (-MCP-) cache: 1024 KB
flags: (lm nx sse sse2 sse3 ssse3) bmips: 7979
clock speeds: max: 2000 MHz 1: 1600 MHz 2: 2000 MHz
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sjm_uk
Level 1
Level 1
Posts: 3
Joined: Sat Apr 28, 2018 11:10 am

Re: [SOLVED]Power manager is asking for authentication to perform automatic suspend.

Post by sjm_uk »

Laurentius - I have had a similar issue and found a different fix. My notes:

Fixing suspend / hibernate authentication request with xfce4-power-manager on Mint 18

The problem: When a fresh install of Mint 18.3 XFCE (and older) is left to suspend, the suspend is blocked by an authentication request for the active user. This can be observed at the next use, when clearing the screen-saver. If a password is then entered, the device immediately suspends.

To fix this, edit (as root) the file: /usr/share/polkit-1/actions/org.xfce.power.policy

Under the section <action id="org.xfce.power.xfce4-pm-helper">
change 'auth_admin' to 'yes'

Before:
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>

After:
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>

Although this fixes the issue, I have not considered if this creates any undesirable activity or security issues.

The file can be viewed here: https://www.apt-browse.com/browse/ubunt ... wer.policy

I hope this is useful to someone.
decuser
Level 1
Level 1
Posts: 41
Joined: Wed Nov 01, 2017 10:56 am

Re: [SOLVED]Power manager is asking for authentication to perform automatic suspend.

Post by decuser »

+10 useful

I've been burned by this several times and have been looking for the solution. Thanks! Nothing like putting the lid down after the screen lock starts and packing it all away in your laptop bag, only to get somewhere and wonder why the laptop is so friggin' hot. This works and while it may allow an unauthorized user to close the lid and put the machine into suspend/hibernate, I'm ok with that.
Nona
Level 1
Level 1
Posts: 30
Joined: Sun Nov 12, 2017 8:28 pm

Re: [SOLVED]Power manager is asking for authentication to perform automatic suspend.

Post by Nona »

This fix does not works for me:

Mint XFCE 19.1
sjm_uk
Level 1
Level 1
Posts: 3
Joined: Sat Apr 28, 2018 11:10 am

Re: [SOLVED] Power manager is asking for authentication to perform automatic suspend: Authentication is required to susp

Post by sjm_uk »

Having the problem again where the message Authentication is required to suspend the system appears on Mint 20.1 (Ulyssa), I have re-checked the solution.

Changing 'auth_admin_keep' to 'yes' for 'org.freedesktop.login1.suspend' solves the issue.
The file that needs editing (with sudo) is

Code: Select all

/usr/share/polkit-1/actions/org.freedesktop.login1.policy
as follows on line 260:

Code: Select all

        <action id="org.freedesktop.login1.suspend">
                <description gettext-domain="systemd">Suspend the system</description>
                <message gettext-domain="systemd">Authentication is required to suspend the system.</message>
                <defaults>
                        <allow_any>yes</allow_any>
                        <allow_inactive>yes</allow_inactive>
                        <allow_active>yes</allow_active>
                </defaults>
        </action>
Note that this is a hack and updates of this file will overwrite the fix and I have not checked to see if this creates undesirable security side effects.

The issue is explored on the Ubuntu forum here https://askubuntu.com/questions/543921/ ... re-suspend and XFCE here https://forum.xfce.org/viewtopic.php?id=11254. One comment on the XFCE forum suggests
There must be some combination of configs involving polkit, lightdm (+accountsservice) and/or light-locker that is causing this.
https://forum.xfce.org/viewtopic.php?pid=43697#p43697.

More information on polkit here: https://www.freedesktop.org/software/po ... kit.8.html.
Locked

Return to “Xfce”