Lockscreen doesn't work when using lightdm

Bug #1880785 reported by Patrick Golden
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am trying to make my laptop lock the screen upon unsuspending. I have made sure that the setting is enabled in 'Settings > Privacy > Screen lock > Lock screen on suspend', but my laptop opens without a lock screen when I open it or press a key. This only started since upgrading to Ubuntu 20.04. Previously, I would have a locked screen and be prompted for a password upon unsuspending.

$ gsettings get org.gnome.desktop.screensaver ubuntu-lock-on-suspend
true

$ lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04

$ apt-cache policy gnome-shell
gnome-shell:
  Installed: 3.36.2-1ubuntu1~20.04.1
  Candidate: 3.36.2-1ubuntu1~20.04.1
  Version table:
 *** 3.36.2-1ubuntu1~20.04.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.36.1-5ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.2-1ubuntu1~20.04.1
ProcVersionSignature: Ubuntu 5.4.0-31.35-generic 5.4.34
Uname: Linux 5.4.0-31-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Tue May 26 21:28:39 2020
DisplayManager: lightdm
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-xenial-amd64-20160624-2
InstallationDate: Installed on 2018-07-16 (680 days ago)
InstallationMedia: Ubuntu 16.04 "Xenial" - Build amd64 LIVE Binary 20160624-10:47
RelatedPackageVersions: mutter-common 3.36.2-1ubuntu1~20.04.1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to focal on 2020-04-23 (33 days ago)

Revision history for this message
Patrick Golden (ptgolden0) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please run this command and tell us what you get:

  gsettings get org.gnome.desktop.lockdown disable-lock-screen

Also your lock delay is set to 1800 (30 minutes?) so please try:

  gsettings set org.gnome.desktop.screensaver lock-delay 0
  gsettings set org.gnome.desktop.screensaver lock-enabled true

and then log out and in again to be sure.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Patrick Golden (ptgolden0) wrote :

Here are the settings I had before running those commands:

$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
false

$ gsettings get org.gnome.desktop.screensaver lock-delay
uint32 1800

$ gsettings get org.gnome.desktop.screensaver lock-enabled
true

After setting the lock delay to 0, the problem persists- the screen is not locked upon unsuspending.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. I am out of ideas but maybe subscribe to bug 1877746 too.

Changed in gnome-shell (Ubuntu):
status: Incomplete → New
tags: added: lock lock-screen
Revision history for this message
Patrick Golden (ptgolden0) wrote :

Possibly worth noting--

I have the default keyboard shortcut set to lock the screen (Super + L). Using that keyboard shortcut does nothing. However, I am able to lock the screen by selecting 'Lock' from the gnome-shell menu on the top navigation bar.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
pmelix (pmelix) wrote :

Solved the problem by following the accepted comment on this post:
https://askubuntu.com/questions/1242110/after-upgrading-to-ubuntu-20-04-lockscreen-not-working
`$ sudo dpkg-reconfigure gdm3`
-> Choose gdm3
Don't forget to reboot. Also, it seems the error message that the gdm service cannot be started after the reconfigure is normal.

Using lightdm instead of gdm3 is the cause of the problem here as it seems. Of course not a real fix, but a nice workaround.

Hope this helps somebody.

summary: - Cannot enable 'Lock screen on suspend'
+ Lockscreen doesn't work when using lightdm
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.