Ubuntu 21.10 resume produces blank screen

After upgrading from Ubuntu 20.10 to 21.10 (via 21.04, which I didn't test for suspend/resume behaviour), suspend/resume no longer works properly.

If I use the proprietary NVIDIA driver metapackage from nvidia-driver-470, the system seems to suspend ok -- using the power button (equivalent to systemctl suspend) --, but on resume, the display stays black and I have to power off to escape this.

(If I use the X.Org X Server driver, the system fails to suspend after temporarily turning off the display.)

Previously, on 20.10, suspend/resume worked ok. IIRC, I was using a proprietary NVIDIA driver.

The graphics card is a GK106GL [Quadro K4000] (codename NVE6) and the PC is a Dell Precision T5500. inxi -G output:

Graphics:  Device-1: NVIDIA GK106GL [Quadro K4000] driver: nvidia v: 470.74 
           Device-2: SHENZHEN EMEET HD Webcam eMeet C960 type: USB driver: hid-generic,snd-usb-audio,usbhid,uvcvideo 
           Display: x11 server: X.Org 1.20.13 driver: loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 2560x1440~60Hz 
           OpenGL: renderer: Quadro K4000/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74

I followed some instructions for debugging kernel suspend, noting that pm-suspend (part of pm-utils) recreates the same restore failure as above, and found the following in dmesg output:

[    1.322162] PM:   Magic number: 0:486:890
[    1.322167] PM:   hash matches drivers/base/power/main.c:905
[    1.322237] pci 0000:00:1f.3: hash matches

lspci showed:

00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller

Searching for "smbus 82801ji" led me to Kernel driver i2c-i801. The source code for this driver included a fix for a resume bug. The latest kernel with the fix is 5.15-rc7.

After installing the 5.15-rc7 kernel using these instructions, restore still fails after systemctl suspend. However resume works ok after sudo pm-suspend. On 5.13, resume fails after sudo pm-suspend.

(I also tried editing /etc/systemd/sleep.conf to see if more restricted suspend options helped, but they didn't.)


My two cents...

Using ubuntu 20.04.1, I configured Settings -> Power -> Power Button Action to Hibernate. That didn't work well, producing a blank screen.

So I configured a Settings -> Keyboard Shortcuts -> Custom Shortcuts with a command systemctl hibernate. This works perfectly.

At the time I was having the issue I read quite a few references. I do not recall now all the information I gathered, and how I came to the conclusion my solution would be better (or simply trial and error). Imprecise the information as it may be, you might find it useful, transferring whatever you find here for hibernation to suspension.

Otherwise, simply ignore it.