Ubuntu 18.04 refuses to use lock screen

Solution 1:

Try the default lock screen (screen lock) key combination on Ubuntu 18.04 and Fedora 28 first:

  • Super+L (that is Windows+L). On terminal try xdg-screensaver lock.

  • If that did not work then check whether the following command returns true:

     gsettings get org.gnome.desktop.lockdown disable-lock-screen 
    
  • If the command above returned true then do the following:

     gsettings set org.gnome.desktop.lockdown disable-lock-screen false 
    

Check whether the lock screen (screen lock) works now.

Had a similar problem and this helped me solve my issue.

Solution 2:

Here's one thing you can try.

  1. First of all, make sure gnome-screensaver is installed

    sudo apt install gnome-screensaver
    
  2. Try to issue lock command in the terminal:

    gnome-screensaver-command -l
    

    then see if there's any text output in the terminal, such as "Screensaver is not running!"

    If it's the case, run the daemon:

    gnome-screensaver &
    

    then retry the previous lock command. Let's hope it will work now.