Ubuntu – Ubuntu 16.04 Screen lock suddenly not working

16.04lock-screenunity

I have two notebooks with Ubuntu 16.04.1/Unity 7.4.0 and few days ago the Lock screen stopped working on both machines. It worked before. The option to lock the screen has disappeared from the menu too. When I press Super+L, only black screen is shown, after mouse moving or any keyboard pressing desktop is back without prompting password.

When I use dm-tool lock from terminal, it shows the Lock screen, but after pressing Ctrl+Alt+F7 I am back to the desktop (without being prompted for a password). I think this maybe started after some update.

I use Ubuntu on my working notebook and I must protect the machine when I leave it.

Best Answer

You don't need to install 3rd party package

You can re-enable lock screen directly from the terminal.

To see if Lock screen is disabled:

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