Ubuntu – Ubuntu 20.04 – Unable to lock screen

20.04lock-screen

Whenever I try to lock screen, display momentarily blinks and then is back to screen. This just started 3 days back. dmesg output when I try to lock is similar to.

"[49734.537932] traps: gnome-shell[16706] general protection fault ip:7fd71ff59252 sp:7ffcdf19b1a0 error:0 in libst-1.0.so[7fd71ff39000+4c000]
[49865.726242] gnome-shell[16827]: segfault at 20 ip 00007f2c20ba2252 sp 00007fff0993fd00 error 4 in libst-1.0.so[7f2c20b82000+4c000]
[49865.726250] Code: 48 83 c3 01 41 39 9f 30 01 00 00 0f 8e 27 01 00 00 49 8b 87 28 01 00 00 48 8d 35 ee 07 03 00 48 8b 2c d8 48 8b 45 00 48 8b 00 <4c> 8b 20 4c 89 e7 e8 63 31 fe ff 85 c0 74 c7 41 80 7c 24 0a 00"

Things I have tried based on different threads in this site.

  1. I have checked privacy settings, Screen lock is on.
  2. sudo dpkg-reconfigure gdm3 and clean reboot tried as well.
  3. gsettings get org.gnome.desktop.lockdown disable-lock-screen` is also false.
  4. gnome-screensaver is installed
  5. /etc/group does not have a nopasswdlogin entry.

Locking commands tried.

  1. Super+L as well as any other options all result in the momentary blinking of screen and then back to same screen.
  2. Made sure no apps are running and tried to lock, doesn't work either.

Responding to questions asked.

  1. Display card RTX 2080. Driver Version: 440.64
  2. Checked the apt log. There have only been unattended updates in June.
  3. Just an apt get upgrade on 5/25/2020. I did remove ubuntu-system-service:amd64 (0.7), ruby-did-you-mean:amd64 (1.2.1-1) as part of autoremove. Installed ubuntu-system-service yesterday to see if this was the cause. But did not help either.
  4. There was an unattended kernel update around 5/29.

Best Answer

You can try using a different display manager like lightdm or sddm by using sudo apt install lightdm or sudo apt install sddm. They will look different, but at least you will be able to lock your screen (hopefully). If that does not work, try gnome-screensaver-command -l.

Related Question