Since the last update of Ubuntu 14.04, when I press the sleep button in my laptop, a pop-up window appears with "Authentication is required for suspending the system".
Password is not requested when closing the lid. However, this doesn't work when another monitor is plugged in.
Is there anything that can be set up (in sudoers or somewhere else) to avoid this password prompt?
In command line run:
The found file is
/usr/share/polkit-1/actions/org.freedesktop.login1.policy
.In the file, near line
check these:
(Source)
Using Polkit
Add yourself to
users
group byYou need to reboot your computer after the following steps.
1. If PolKit version >= 0.106
You can check version of Polkit by:
pkaction --version
If PolKit version < 0.106, there are NO
.rules
files but only old.pkla
and.conf
files because those Polkit versions do not have the Javascript interpreter.Just adding a file
/etc/polkit-1/rules.d/85-suspend.rules
with:And in Terminal, type:
2. If PolKit version < 0.106
In this case, adding a file
/var/lib/polkit-1/localauthority/50-local.d/50-enable-suspend-on-lockscreen.pkla
with:In bash, type:
More about pklocalauthority
Using Power Manager settings (not sure if it works)
In XFCE Power Manager:
Under the
Security
tab:Automatically lock the session
to NeverLock the screen when the system is going for sleep
Display
tab, blank the screen after 15 minutes. SetSleep
andSwitch off
times to be disabled (greyed out).System
tab, set system sleep mode toSuspend
after an half of hour.References: