pop-os / gnome-shell

Pop!_OS fork of https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-shell
GNU General Public License v2.0
25 stars 4 forks source link

Lock-screen can fail to present on resume from suspend periodically. #126

Open XV-02 opened 1 year ago

XV-02 commented 1 year ago

While testing the suspend/resume behaviour on a 12th gen laptop, I noticed that I would occasionally get dumped straight back into the user session without the unlock/login prompt.

After discussing with other QA members, it seems similar behaviour has been seen infrequently on 12th gen laptops in the past few weeks to a month, thought it was attributed to other failure- to-suspend related issues being tested at the time. So far from my observations it appears that this only happens

However, I cannot conclusively say these are hard and fast parameters of the failure state. In particular, I'm not 100% certain of the s0ix factor, though it seems to at the very least strongly correlate.

Below is the log for one of the sessions on which this was first observed by me. It has a number of suspend cycles, most of which are successful, though two or three weren't. However, the last suspend cycle specifically exhibited the noted behaviour, and the system reported reaching the suspend state of that test cycle at line 6862.

bad_resume_forward_01.log

I'd seen reports of gnome-shell reporting Can't update stage views related messages, which I noticed in the logs, when using tiling mode, so I also ensured that I could reproduce the issue with floating window mode. I can, and the log for that is below, again with bad resume behaviour on the last suspend/resume cycle:

bad_resume_forward_02.log

XV-02 commented 1 year ago

Saw this again recently. In the logs, the following is presented:

pop-os gnome-shell[pid]: error: Unable to lock: Lock was blocked by an application

The message is somewhere between lines 4760 and 4770 in this log: BlockedLock.log

n3m0-22 commented 1 year ago

@XV-02 I found a way to fairly reliably reproduce this. I was able to get it to happen on gaze15, Dev One, and lemp11. This also works in both tiling and floating window modes. Messages in my logs seem to match yours as well. This is on a fresh install of 22.04 and works with both the 6.0.6 and 6.0.12 kernels.

Steps:

  1. Open Nautilus
  2. Right click on any file or folder
  3. Leave the context menu open
  4. Shut the lid and wait till the lights indicate suspend
  5. Open the lid and you should see the following example

lock-block

The one condition is that if it is left alone for a while i.e., at least 30 minutes it seems to finally lock.