6

I've just installed Ubuntu 22.04 yesterday.

After locking the desktop, then entering my password and pressing Enter, I have to wait for a couple seconds until the desktop unlocks.

The UI is responsive and there's an animated spinner. I don't know what I am waiting for though. It was always instant on older Ubuntu versions and its derivatives. It's actually behaving as if the password was incorrect, except it is correct and the timeout is varied between 7-15 seconds.

This computer is quite powerful (i7-11850H, 32 GB RAM, NVMe SSD). I've previously had Pop!_OS 22.04 (Ubuntu derivative) and Fedora 36 (also GNOME-based) installed and neither had this issue.

I've customized the OS slightly before noticing this, but nothing extreme - a couple GNOME Shell extensions that I've used for years etc. The only unusual thing about this installation is that it's installed on btrfs on LUKS, but without LVM. I've done this by creating and opening the LUKS volume, then installing Ubuntu on it and correcting /etc/crypttab (it was empty) followed by update-initramfs -u and update-grub. I've used this setup numerous times with older Ubuntu versions without such issues.

How do I debug and/or fix this?

Edit: I've noticed that on tty2 (Ctrl+Alt+F2) I can unlock the desktop without the timeout. Also I'm on Xorg, not Wayland.

gronostaj
  • 720
  • 6
  • 18
  • had variants of this scenario: sometimes it takes a while to load desktop, like even 10 15 sec - and sometimes after that loads only primary desktop without second and third monitors (you can lock screen and unlock again, it can be fixed). And the worst scenario - after lock screen you enter the pass for account and get Ubuntu complete freeze, must reset the computer – Green Joffer Jun 30 '22 at 09:00
  • Maybe it has something to do with unlocking your encrypted LUKS disk? – jrw32982 Jul 01 '22 at 12:57
  • @jrw32982 Maybe, but why and how to check this? The disk is already unlocked and LUKS is transparent, it theoretically shouldn't affect anything at this point. Also identical setup worked perfectly on Ubuntu 20.04, Pop 20.04, Pop 22.04 and Fedora 36. – gronostaj Jul 01 '22 at 12:59
  • So you manually unlock the disk, then boot the OS? Normally the OS boots from /boot (unencrypted) which then unlocks the disk and switches to that image. Sorry, I have no idea how to debug this - maybe look in /var/log/syslog? – jrw32982 Jul 02 '22 at 17:18
  • @jrw32982 `/boot` is on a separate unencrypted partition. First GRUB starts from ESP (also unencrypted) and boots the kernel. I'm prompted for the password before the root disk is mounted. This is pretty standard, same as Ubuntu's default encrypted install. Then GDM starts, I log in, everything is fine so far, no waiting on original login. At some point I lock the desktop, then enter the password, press Enter and I have to look at the spinner animation for a couple seconds. Last time I checked it was ~15 seconds. – gronostaj Jul 02 '22 at 18:06
  • Same issue here (after fresh install) - noteworthily delay is similar to that when entering the wrong password + after the wrong password if entering correct one there's no delay. See the below SO: https://askubuntu.com/questions/1409748/how-to-shorten-unlock-time-in-22-04 – Shay Nov 17 '22 at 07:29
  • Edit and share a screenshot of htop. – Rishon_JR Dec 11 '22 at 14:53

1 Answers1

-1

The problem seems to be related to NVIDIA graphics hardware (https://www.youtube.com/watch?v=_36yNWw_07g)

Solved the slow unlock time on my laptop by time by switching to the proprietary nvidia driver (search for "Additional Drivers" in Ubuntu): Additional Drivers in Ubuntu 22.04

user144437
  • 99
  • 1