Ubuntu 17.04 no longer asking for password when coming out of sleep mode
For some reason, when I open my laptop and it wakes up, it no longer asks me for my user password (it used to). How do I troubleshoot this and enable password request upon wake?
Check the value of
gsettings get org.gnome.desktop.screensaver ubuntu-lock-on-suspend
if it comes back with 'false' set this to 'true' with
gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
You can also do this with a GUI, using dconf-editor
- navigate to 'org->gnome->desktop->screensaver->ubuntu-lock-on-suspend'
Step 1 is Screensaver installed?
The password when resuming from suspend is based on lock screen screen and lock screen is based upon screen saver. To check screen saver use apt list --installed | grep saver
:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gnome-screensaver/xenial,now 3.6.1-7ubuntu4 amd64 [installed]
If you don't see a screen saver above then use:
sudo apt install gnome-screensaver
Step 2 is lock screen enabled?
Lock screen needs to be enabled:
gsettings get org.gnome.desktop.lockdown disable-lock-screen
false
If result is true
then use:
gsettings set org.gnome.desktop.lockdown disable-lock-screen false
It's so because Automatic Suspend may be off.
Turning it on will solve the problem. Here is how:
- Go to Settings > Power.
- Click 'Automatic Suspend' option.
- Turn "When Idle" option on.
Done. Let me know if this solves your problem or not.