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?
-
Anything in syslog or dmesg around the time of the wakeup ? Can you paste it here or link it to pastebin ? – Robert Riedl Jan 20 '18 at 22:48
-
This happens intermittently for me on 16.04. Is it still always happening for you or just sometimes? – Chai T. Rex Jan 21 '18 at 00:59
-
You mention closing and opening lid for suspend/resume actions. What happens when you select Suspend from the menu and use power button to resume? – WinEunuuchs2Unix Jan 25 '18 at 00:45
-
Same behavior. It wakes up and I’m back at my desktop. – ffxsam Jan 25 '18 at 01:12
4 Answers
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'

- 13,134

- 21,339
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.

- 893
-
Nope, it was not off. And it's set to "when on battery", delay of 15 mins. There is no "when idle" option. (I'm on Ubuntu 17.10) – ffxsam Jan 27 '18 at 01:30
-
-
-
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

- 102,282
-
-
-
Aha! Now we're onto something. Super+L does not lock the system as it should. And that key shortcut is defined properly. – ffxsam Jan 27 '18 at 01:55
-
Try
gsettings get org.gnome.desktop.lockdown disable-lock-screen
– WinEunuuchs2Unix Jan 27 '18 at 01:59 -
I just noticed I have this same issue: https://askubuntu.com/questions/986182/ubuntu-17-10-screen-lock-not-working-and-grey – ffxsam Jan 27 '18 at 02:02
-
-
-
That fixed it!! Thank you! I have no idea how that happened.. I certainly didn't set it. – ffxsam Jan 27 '18 at 02:04
-
Glad it works. Thanks for pointing out the similar problem, I copied a portion of the answer over there for them. – WinEunuuchs2Unix Jan 27 '18 at 02:06
Check the suspend logs at /var/log/pm-suspend.log
sudo nano /var/log/pm-suspend.log
Possible Solution 1:
Edit the file '/etc/systemd/logind.conf'
sudo nano /etc/systemd/logind.conf
Removed the # comment from the beginning of the line 'HandleLidSwitchDocked=ignore' and changed the value to be:
HandleLidSwitchDocked=suspend
Restart the systemd daemon with this command:
sudo restart systemd-logind
or, from 15.04 onwards:
sudo service systemd-logind restart

- 3,139
-
No such luck. And there is no
/var/log/pm-suspend.log
. It's not necessarily closing the lid that's the issue. Suspend in general doesn't require a password when waking up. – ffxsam Jan 26 '18 at 02:23