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

Forum rules
Before you post please read how to get help
Post Reply
Laurentius
Level 2
Level 2
Posts: 93
Joined: Sat Oct 25, 2014 4:31 pm

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

Post by Laurentius » Wed Dec 20, 2017 11:58 am

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

sjm_uk
Level 1
Level 1
Posts: 1
Joined: Sat Apr 28, 2018 11:10 am

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

Post by sjm_uk » Sat Apr 28, 2018 11:18 am

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: 5
Joined: Wed Nov 01, 2017 10:56 am

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

Post by decuser » Thu Jul 19, 2018 6:03 pm

+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.

Post Reply

Return to “Xfce”