Context: https://askubuntu.com/questions/1371055/ubuntu-21-10-resume-produces-blank-screen How to debug: https://wiki.ubuntu.com/DebuggingKernelSuspend Did this 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 contained:
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
Search for "smbus 82801ji" and found https://www.kernel.org/doc/html/latest/i2c/busses/i2c-i801.html.
https://github.com/torvalds/linux/commits/master/drivers/i2c/busses/i2c-i801.c showed a fix https://github.com/torvalds/linux/commit/66d402e2e9455cf0213c42b97f22a0493372d7cc#diff-01a5264749592aac766b5629b1173ef11e849245ded6a3e1b6c59a8fa5519a7c for a resume bug. Latest kernel with fix is 5.15-rc7.
Installed 5.15-rc7 kernel using https://itsfoss.com/upgrade-linux-kernel-ubuntu/. Suspend still fails.
However sudo pm-suspend
can be resumed (whereas systemctl suspend
cannot). On 5.13, sudo pm-suspend
cannot be resumed.
https://unix.stackexchange.com/questions/484550/pm-suspend-vs-systemctl-suspend
Tried editing /etc/systemd/sleep.conf to no avail.
Workaround: https://askubuntu.com/questions/623090/changing-the-command-executed-using-suspend-standby-in-14-04-lts
Bound /bin/sh -c "sudo pm-suspend"
to the Pause key (Shift+Break) and added the following to the end of /etc/sudoers
:
%yourusername ALL = NOPASSWD: /usr/sbin/pm-suspend
E.g.
%glyn ALL = NOPASSWD: /usr/sbin/pm-suspend