Hibernate unreliable on Framework 13 AMD (Ryzen AI 9 HX 370), Fedora 44: devices fail restore with -110, then GPU hang

Summary

Hibernate on my Framework 13 AMD is unreliable on Fedora 44. The image is written and loaded, but on some resumes both amdgpu and the Wi-Fi device fail to restore with -110 (timeout), and shortly after that the GPU hangs and I get a black screen. Looking for ideas, or for confirmation that this is a known issue.

Setup

  • Framework 13, AMD Ryzen AI 9 HX 370 (Radeon 890M, RDNA3.5)
  • Fedora 44, kernel 7.2.11-200.fc44.x86_64
  • RAM: 30 GB. Swap: 35.8 GiB plain (unencrypted) partition used for hibernation, plus 8 GiB zram
  • resume=UUID=2e5a8940-67b2-443c-8296-6e970bc30759 set in GRUB and matches the swap partition, initramfs rebuilt with dracut
  • Kernel lockdown is [none], and S4 is supported (ACPI: PM: (supports S0 S4 S5))
  • Suspend to RAM (s2idle) is reliable

What happens

Hibernate gives me three different outcomes:

  1. It works and my session is restored.
  2. Sometimes it doesn’t hibernate at all.
  3. Sometimes the screen goes black and the machine never powers off. I can’t wake it, so I hold the power button, and the next boot is fresh (session lost). This seems more likely when a lot of RAM is in use.

Logs (pm_debug_messages enabled)

Cycle 1: hibernated 05:12:05, resumed 05:16:38. No errors.

Cycle 2: hibernated 05:17:15 (37 s after the previous resume), resumed 05:19:55:

PM: hibernation: Normal pages needed: 3999370 + 1024, available pages: 4201894
ACPI: PM: Waking up from system sleep state S4
amdgpu 0000:c1:00.0: PM: dpm_run_callback(): pci_pm_restore returns -110
amdgpu 0000:c1:00.0: PM: failed to restore async: error -110
ieee80211 phy0: PM: dpm_run_callback(): wiphy_resume [cfg80211] returns -110
ieee80211 phy0: PM: failed to restore async: error -110
PM: hibernation: hibernation exit

About 68 s later, gnome-shell hits a GPU hang, followed by a GPU reset and a black screen:

amdgpu 0000:c1:00.0: ring gfx_0.0.0 timeout, signaled seq=56966, emitted seq=56967
amdgpu 0000:c1:00.0: MES failed to respond to msg=RESET
amdgpu 0000:c1:00.0: The CPFW hasn't support pipe reset yet.
amdgpu 0000:c1:00.0: MODE2 reset
amdgpu 0000:c1:00.0: GPU reset(3) succeeded!

Memory headroom was tighter on the failing cycle: cycle 1 needed 3841013 pages with 4360211 available, cycle 2 needed 3999370 with 4201894 available. That’s only two samples, so it’s not conclusive.

More notes on my setup: GitHub - Blu3-Sky-Max/Linux-Hibernate-Resume: Documenting and automating hibernation (suspend-to-disk) setup on Fedora — swap sizing, GRUB resume config, dracut rebuild · GitHub

Currently testing

amdgpu and the Wi-Fi device both failing restore with the same error at the same moment made me suspect parallel (async) device resume, so I just changed /sys/power/pm_async from 1 to 0. I’ll report back with results.

Questions

  1. Is this gfx_v11_0 / MES timeout on Strix Point tracked upstream (drm/amd)? Is there a fix or a kernel version where it’s resolved?
  2. Could async device resume be the cause? Has pm_async=0 helped anyone else?
  3. Could memory pressure or the high-priority zram swap affect hibernate image creation on this hardware?
  4. Has anyone else on a Framework 13 with Ryzen AI 300 seen this?
  5. I’m on GNOME (the later hang was in gnome-shell). Is hibernate more reliable on KDE Plasma or another desktop? And does it work reliably on any AMD Strix Point machine, whatever the desktop?

well, there is a reason hibernation is not enabled by default, there is always that hardware that fails to make the contents dump from ram to the hard disk/ssd and then restore that “image” when you turn it on again

that is why suspend to ram or sleep is so popular, it mostly works on most machines, with the few exceptions of waking up without ethernet, or without sound, or without keyboard, random stuff

few of us try to use suspend to disk or hibernate, including on windows, where it also fails with most of my hardware

i assume you made a swap partition properly, i assume you mounted that swap partition and made it active and available for the system, that the swap partition has at least 1.5 times the size of the ram(yours should be 48 gbs in size, not 35) on that system

this is critical, as you mention, the more ram is in use, the more times you say it fails, the zram iirc is not viable for hibernation, even when the system sees it and adds it as virtual memory with the swap

from the people i have seen here mentioning hibernation, i dont remember many reporting success with t, try again making that swap properly mounted and with at least 50 gbs of space available, to avoid problems

That has never been a requirement for hibernation. The physical swap space should be at least as large as physical RAM; which means for 30G ram a 35G swap space seems quite adequate.

Please always verify your facts before posting.

@blu3sky you might find useful info in the link above.

Thanks for the reply. Here’s what I checked.

zram:
you’re right that it can’t be the hibernate target, and it isn’t. The kernel writes the image to the NVMe swap partition that resume=UUID=2e5a8940-67b2-443c-8296-6e970bc30759 points at. zram is a separate swap device at a different priority.

Swap size:
my swap partition is 35.8 GiB. The kernel limits the image to about 40% of RAM by default (image_size). On a successful cycle the log shows it allocating about 12 GiB, so the partition is about three times the image size.

What I tried next:

  • With zram disabled, hibernate still failed on kernel 7.2.13-200.fc44. The log shows hibernation entry and then stops just as the kernel starts building the snapshot, with no amdgpu errors before that.
  • With zram enabled (as it is by default), it still fails.
  • Failures are intermittent. Some cycles work and some don’t. On one failing resume the amdgpu and Wi-Fi devices failed to restore with -110.

So swap size and zram don’t seem to explain it. I’m now bisecting with /sys/power/pm_test, starting at devices since the -110 errors point at amdgpu and Wi-Fi resume, then platform and core if that passes. Since the failures are intermittent, I’ll run each level several times and post what I find.

no machine has just 30 gbs of ram because there are no ram modules to reach that number, not common on amd machines using 8 or 16 gbs modules, the gpu takes ram and that number could be wrong, and the 1.5 times is a old value i remember from my early linux days when i used distros like red hat, mandrake and others that i found and used to learn, in my particular machine i cant use the suspend to ram without the swap at 1.5 times the size of the ram, specially with ust 8 and gpu taking 1.3 gbs of system ram

the wifi you quoted there says

iti is even higher with a 1.5 times the size of your ram, that is where you aim at, at helping yourself as much as possible to reach the goal, if it is possible, of course, with hibernation, rarely people will bother answering, and even more rare will see a post with it working reliably, on any os

Thanks, Jeff. Will read through the link. It matches what I’m seeing: hibernate sometimes succeeds with the current 35.8 GiB swap, so size doesn’t look like the cause. I’ll go through the link first, then start on pm_test , and will get back with what i can find.

Note in section 4.3 of the linked info it says that the swap for hibernation must be made aware to the initramfs image. Thus you must be certain to run sudo dracut -f after the swap space is created and the resume entry is properly in the kernel command line in grub. Dracut will recreate the initramfs image in /boot for the running kernel with that command

To verify the proper UUID is in the resume entry please run lsblk -f to obtain the swap space uuid then run cat /proc/cmdline to confirm the 2 entries exactly match. (I assume they do since you said that hibernation sometimes works, but it is never a bad idea to verify things.)