Ubuntu 22.04 freezes trying to enter suspend mode

Everything was working fine until a day or two ago. Up until now, I’ve been able to close my laptop lid, and it automatically enters suspend mode and the back light turns off.

For some reason (likely after updating apt packages), my laptop now hangs when trying to enter suspend mode, the back light remains on, and the battery drains faster than it should (suggesting it does not enter suspend mode).

The behavior is the same when either closing the laptop lid, or running sudo systemctl suspend. In either case, i3lock comes up, and the system becomes very sluggish for about 10 seconds, barely responding to key presses. After that, the system returns to its usual level of responsiveness. The same behavior persists after multiple restarts.

What could be causing this? Is it running into some problem (or some kind of infinite loop?) while attempting to suspend, and it never ends up successfully suspending?

I’m not sure how to troubleshoot this. Any suggestions would be helpful!

Some additional info:

  • 2021 Lenovo Thinkpad T14s
  • Ubuntu 22.04.04
  • i3, set up to launch i3lock on suspend
Asked By: Dave Yarwood

||

My problem ended up being something related to Keybase, perhaps the same thing as this issue. After restarting the Keybase service (keybase ctl restart followed by run_keybase), the problem went away and my laptop went back to suspending normally when I close the lid.

journalctl and dmesg output was helpful for me in leading me to the problem. After trying and failing to make my laptop suspend, I ran sudo dmesg and saw this in the output:

[376583.075837] Freezing user space processes
[376603.076766] Freezing user space processes failed after 20.000 seconds (7 tasks refusing to freeze, wq_busy=0):
[376603.076877] task:keybase         state:D stack:0     pid:3267  ppid:2482   flags:0x00000006
Answered By: Dave Yarwood