FW16 Debian bookworm hibernate not reliable

I tried kernel 6.10-rc3 which contains this code and it black screen hung on the way down (systemctl hibernate) - so perhaps worse. :frowning:

I try again from a console window rather than X to see if I get any more info.

It could be another regression; but I don’t know for sure.
It also doesn’t help the wifi issue in any way; so it might be worthwhile to unload the wifi module before going down.

1 Like

As you are AMD based this may be a worthless comment, but I’m on a 12th gen FW 13 with Debian 12.5, and the stock kernel, as you have experienced had serious sleep and hibernate issues. I was able to get a 6.7.12 kernel from backports though that has been working perfectly!

Maybe it is worth giving it a go?

I say this may be worthless because the kit in the FW 16 is super new.

Debian has been working perfectly on my 13 since moving to the backports kernel.

1 Like

Hibernation has been working 100% reliably on my Laptop 16 running Linux 6.6.41-gentoo. I didn’t have to do anything special with modules; in fact my kernel does not even support dynamically loadable modules (by my choice).

Here’s a kernel log excerpt from my most recent hibernate/resume cycle:

[269646.021108] elogind-daemon[1849]: Power key pressed short.
[269646.059692] wlp2s0: deauthenticating from xx:xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING)
[269646.443069] elogind-daemon[1849]: Entering sleep state 'hibernate'...
[269646.443075] PM: hibernation: hibernation entry
[269646.523057] Filesystems sync: 0.079 seconds
[269646.523129] Freezing user space processes
[269646.524351] Freezing user space processes completed (elapsed 0.001 seconds)
[269646.524353] OOM killer disabled.
[269646.525634] PM: hibernation: Preallocating image memory
[269649.925789] PM: hibernation: Allocated 1243581 pages for snapshot
[269649.925792] PM: hibernation: Allocated 4974324 kbytes in 3.40 seconds (1463.03 MB/s)
[269649.925794] Freezing remaining freezable tasks
[269649.927060] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[269649.928647] printk: Suspending console(s) (use no_console_suspend to debug)
[269649.939740] queueing ieee80211 work while going to suspend
[269650.133374] ACPI: EC: interrupt blocked
[269650.171852] ACPI: PM: Preparing to enter system sleep state S4
[269650.481956] ACPI: EC: event blocked
[269650.481959] ACPI: EC: EC stopped
[269650.481959] ACPI: PM: Saving platform NVS memory
[269650.486970] Disabling non-boot CPUs ...
[269650.488968] smpboot: CPU 1 is now offline
[269650.491051] smpboot: CPU 2 is now offline
[269650.492836] smpboot: CPU 3 is now offline
[269650.494624] smpboot: CPU 4 is now offline
[269650.496437] smpboot: CPU 5 is now offline
[269650.498163] smpboot: CPU 6 is now offline
[269650.500133] smpboot: CPU 7 is now offline
[269650.502018] smpboot: CPU 8 is now offline
[269650.503750] smpboot: CPU 9 is now offline
[269650.505481] smpboot: CPU 10 is now offline
[269650.507171] smpboot: CPU 11 is now offline
[269650.509049] smpboot: CPU 12 is now offline
[269650.510745] smpboot: CPU 13 is now offline
[269650.512516] smpboot: CPU 14 is now offline
[269650.514098] smpboot: CPU 15 is now offline
[269650.514940] PM: hibernation: Creating image:
[269650.866033] PM: hibernation: Need to copy 1386842 pages
[269650.516117] ACPI: PM: Restoring platform NVS memory
[269650.517952] ACPI: EC: EC started
[269650.518642] LVT offset 0 assigned for vector 0x400
[269650.519317] Enabling non-boot CPUs ...
[269650.519372] smpboot: Booting Node 0 Processor 1 APIC 0x1
[269650.522481] ACPI: \_SB_.PLTF.C001: Found 3 idle states
[269650.522607] CPU1 is up
[269650.522640] smpboot: Booting Node 0 Processor 2 APIC 0x2
[269650.524999] ACPI: \_SB_.PLTF.C002: Found 3 idle states
[269650.525067] CPU2 is up
[269650.525086] smpboot: Booting Node 0 Processor 3 APIC 0x3
[269650.527514] ACPI: \_SB_.PLTF.C003: Found 3 idle states
[269650.527613] CPU3 is up
[269650.527630] smpboot: Booting Node 0 Processor 4 APIC 0x4
[269650.530047] ACPI: \_SB_.PLTF.C004: Found 3 idle states
[269650.530121] CPU4 is up
[269650.530133] smpboot: Booting Node 0 Processor 5 APIC 0x5
[269650.532549] ACPI: \_SB_.PLTF.C005: Found 3 idle states
[269650.532644] CPU5 is up
[269650.532656] smpboot: Booting Node 0 Processor 6 APIC 0x6
[269650.534967] ACPI: \_SB_.PLTF.C006: Found 3 idle states
[269650.535040] CPU6 is up
[269650.535050] smpboot: Booting Node 0 Processor 7 APIC 0x7
[269650.537513] ACPI: \_SB_.PLTF.C007: Found 3 idle states
[269650.537619] CPU7 is up
[269650.537634] smpboot: Booting Node 0 Processor 8 APIC 0x8
[269650.540037] ACPI: \_SB_.PLTF.C008: Found 3 idle states
[269650.540119] CPU8 is up
[269650.540131] smpboot: Booting Node 0 Processor 9 APIC 0x9
[269650.542538] ACPI: \_SB_.PLTF.C009: Found 3 idle states
[269650.542639] CPU9 is up
[269650.542650] smpboot: Booting Node 0 Processor 10 APIC 0xa
[269650.544966] ACPI: \_SB_.PLTF.C00A: Found 3 idle states
[269650.545053] CPU10 is up
[269650.545077] smpboot: Booting Node 0 Processor 11 APIC 0xb
[269650.547568] ACPI: \_SB_.PLTF.C00B: Found 3 idle states
[269650.547682] CPU11 is up
[269650.547691] smpboot: Booting Node 0 Processor 12 APIC 0xc
[269650.550038] ACPI: \_SB_.PLTF.C00C: Found 3 idle states
[269650.550132] CPU12 is up
[269650.550141] smpboot: Booting Node 0 Processor 13 APIC 0xd
[269650.552550] ACPI: \_SB_.PLTF.C00D: Found 3 idle states
[269650.552661] CPU13 is up
[269650.552671] smpboot: Booting Node 0 Processor 14 APIC 0xe
[269650.555001] ACPI: \_SB_.PLTF.C00E: Found 3 idle states
[269650.555106] CPU14 is up
[269650.555114] smpboot: Booting Node 0 Processor 15 APIC 0xf
[269650.557595] ACPI: \_SB_.PLTF.C00F: Found 3 idle states
[269650.557736] CPU15 is up
[269650.560261] ACPI: PM: Waking up from system sleep state S4
[269650.561816] ACPI: EC: interrupt unblocked
[269650.728102] ACPI: EC: event unblocked
[269650.728854] usb usb3: root hub lost power or was reset
[269650.728855] usb usb1: root hub lost power or was reset
[269650.728857] usb usb2: root hub lost power or was reset
[269650.728858] usb usb4: root hub lost power or was reset
[269650.729461] [drm] PCIE GART of 512M enabled (table at 0x000000807FD00000).
[269650.729509] [drm] PSP is resuming...
[269650.730562] usb usb5: root hub lost power or was reset
[269650.730566] usb usb6: root hub lost power or was reset
[269650.730598] usb usb7: root hub lost power or was reset
[269650.730601] usb usb8: root hub lost power or was reset
[269650.753757] [drm] reserve 0x4000000 from 0x8078000000 for PSP TMR
[269650.760876] nvme nvme0: 16/0/0 default/read/poll queues
[269650.934504] nvme nvme1: 16/0/0 default/read/poll queues
[269651.457052] amdgpu 0000:c2:00.0: amdgpu: RAS: optional ras ta ucode is not available
[269651.464459] amdgpu 0000:c2:00.0: amdgpu: RAP: optional rap ta ucode is not available
[269651.464460] amdgpu 0000:c2:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[269651.464463] amdgpu 0000:c2:00.0: amdgpu: SMU is resuming...
[269651.465291] amdgpu 0000:c2:00.0: amdgpu: SMU is resumed successfully!
[269651.467712] [drm] DMUB hardware initialized: version=0x08003D00
[269651.477353] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:264
[269651.481816] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:272
[269651.486281] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:280
[269651.490742] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:288
[269651.575121] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:264
[269651.577600] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:272
[269651.580076] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:280
[269651.582550] [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:288
[269652.489728] [drm] kiq ring mec 3 pipe 1 q 0
[269652.492840] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[269652.493009] amdgpu 0000:c2:00.0: [drm:jpeg_v4_0_hw_init] JPEG decode initialized successfully.
[269652.493264] amdgpu 0000:c2:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[269652.493266] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[269652.493267] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[269652.493268] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[269652.493269] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[269652.493270] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[269652.493270] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[269652.493271] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[269652.493272] amdgpu 0000:c2:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[269652.493273] amdgpu 0000:c2:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[269652.493274] amdgpu 0000:c2:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[269652.493275] amdgpu 0000:c2:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[269652.493275] amdgpu 0000:c2:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[269652.496110] [drm] ring gfx_32793.1.1 was added
[269652.496679] [drm] ring compute_32793.2.2 was added
[269652.497199] [drm] ring sdma_32793.3.3 was added
[269652.497244] [drm] ring gfx_32793.1.1 ib test pass
[269652.497293] [drm] ring compute_32793.2.2 ib test pass
[269652.497380] [drm] ring sdma_32793.3.3 ib test pass
[269652.755621] usb 3-1: reset high-speed USB device number 2 using xhci_hcd
[269652.763687] usb 1-2: reset high-speed USB device number 2 using xhci_hcd
[269653.038610] usb 1-3: reset high-speed USB device number 3 using xhci_hcd
[269653.281962] usb 2-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[269653.621680] usb 1-4: reset high-speed USB device number 4 using xhci_hcd
[269653.817681] usb 1-3.2: reset full-speed USB device number 5 using xhci_hcd
[269653.907378] usb 1-3.2: unable to get BOS descriptor set
[269654.080848] usb 1-5: reset high-speed USB device number 6 using xhci_hcd
[269654.276670] usb 1-4.2: reset full-speed USB device number 8 using xhci_hcd
[269654.366386] usb 1-4.2: unable to get BOS descriptor set
[269654.406191] OOM killer enabled.
[269654.406194] Restarting tasks ... 
[269654.407507] usb 1-4.1: USB disconnect, device number 26
[269654.410444] done.
[269654.412468] PM: hibernation: hibernation exit
[269654.426830] elogind-daemon[1849]: System returned from sleep state.
[269654.474020] usb 1-4.1: new full-speed USB device number 27 using xhci_hcd
[269654.583877] usb 1-4.1: New USB device found, idVendor=27c6, idProduct=609c, bcdDevice= 1.00
[269654.583885] usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[269654.583888] usb 1-4.1: Product: Goodix USB2.0 MISC
[269654.583889] usb 1-4.1: Manufacturer: Goodix Technology Co., Ltd.
[269654.583891] usb 1-4.1: SerialNumber: UID3598F245_XXXX_MOC_B0
1 Like

Great to hear! Hibernation is something the desktop Linux world needs to embrace at large.

Hibernation is simple, as it’s entirely software-driven. The real holy grail is s0ix/s2idle. It almost works on my Laptop 16, but the CPUs hang for over a minute during resume, such that using it doesn’t make for a great user experience.

Indeed, only my experience is that it isn’t straight forward on many distros and requires some more advanced methods to get working. Not without glitches though. (I’m referring to Ubuntu 24.04 here)

It is just wonky to get properly setup up with encrypted drives, etc.

I can’t speak to whatever the highly pre-fabricated distros like Ubuntu are doing, but it is certainly true that getting hibernation to work with encrypted swap is not so straightforward when you are “rolling your own” setup from scratch, such as I do with Gentoo.

I had to get somewhat creative to get my system down to “only” three passwords/passphrases that I have to type during boot or resume: one into the UEFI firmware to unlock my TCG Opal drive at power on, one into the early boot environment of the initramfs to map my encrypted swap partition via dmcrypt, and one into SDDM/kscreenlocker to login/unlock my Plasma session (depending on whether I’m booting or resuming). The gotcha is that, in addition to encrypted swap, I also use a LUKS-encrypted data partition (on the Opal-encrypted drive), and I don’t want to have to type a separate passphrase for that partition during boot. To that end, my initramfs stashes the volume key for the encrypted swap partition in a kernel keyring, and then my call to cryptsetup during late boot pulls the volume key from the keyring to map my encrypted data partition without prompting for a passphrase.

This forum keeps rejecting my post with a 403 error when I try to include my source code in it, so I posted my initramfs /init script as a gist instead.

In reference to the above-linked gist, the three calls to findfs find my root, data, and swap partitions even if I don’t specify them on the kernel command line, so long as they are labeled Root, Data, and Swap, respectively, in the GPT(s).

The main trick is where I call cryptsetup luksOpen --test-passphrase --link-vk-to-keyring @us::dmcrypt, which prompts for a passphrase that unlocks the volume key of my LUKS-encrypted data partition but does not map that partition. The volume key is stashed in the root user’s session keyring and is then immediately fed into a plain (not LUKS) dmcrypt mapping of my swap partition. (That means my swap partition has no LUKS header; it simply/blindly uses the same volume key as my LUKS-encrypted data partition.)

Once the encrypted swap partition is mapped, resuming from hibernation is achieved simply by writing the mapped device major:minor numbers to /sys/power/resume.

Then the only other piece of the puzzle is: during my main system startup process, I pass the additional option --volume-key-keyring dmcrypt to cryptsetup when mapping my encrypted data partition. That lets me reuse the volume key that the initramfs stashed so I don’t have to type my passphrase again during late boot.

So yeah, there’s nothing particularly finicky about it, but it is not at all pre-fabricated. Then again, hardly anything on Gentoo is, which is what makes using it so Fun℠.

Have you considered to just use a swapfile on your already encrypted main drive?

That ended up being my solution to this problem after I moved from sed to luks encryption, it’s relatively painless to setup these days.

You can’t do that. If you mount a file system that is already mounted (in the hibernated image), you will corrupt it. It’s the same as mounting the same file system twice concurrently.

Hibernate to swap file works perfectly fine and is a supported use case, definitely doesn’t look mounted twice to me.

Oh, indeed. I forgot that you can tell the kernel a device and an offset, and it’ll read the hibernation image blindly from the device without going through the file system. I’m sure that works, but it doesn’t win you anything, as you’d still need to map the encrypted partition that holds the file system that the swap file resides in. If you only meant that it saves you from using the keyring, then sure, but there’s no downside to using the keyring, and there is a downside to routing all your swap activity through a file system driver.

Since that’s the root partition you kind of always have to do that so i don’t really see the problem here.

Saves me from both the keyring and messing with partitions, also a lot easier to change the size of the swapfile later without squishing and moving stuff around.

If I read it right at least in the case of btrfs the fs is not involved in swap activity apart from initially telling it where it can put it’s stuff.

But the main thing is that at least on base arch it is insanely low effort to set up, just create swapfile (btrfs has a command for that), find the offset (also command for that), put offset part uuid and offset (also got from btrfs command) into the kernel command line and add swapfile to fstab. One password, one partition.

1 Like

That is your most compelling point, but all your points are good. I am probably just a dinosaur still doing things the old way.

As long as it works for you, I was doing similar stuff before I figured this out but just hated dealing with the keys and stuff.

Just thought I should update people with a problem that was impacting me on Debian bookworm. Basically the 6.10 kernel was ok but the 6.11-rc4 kernel hung on boot up - see linux amdgpu mailing list bug report

There is a patch that fixes it.

Alternatively there you can just install the most recent nonfree-firmware package containing the amdgpu firmware. You need version 20240709-1 for it to work with v6.11-rc4 kernel.
Note: You need to re-build the initrd with:

update-initramfs -c -k 6.11.0-rc4

as the firmware is loaded from the initrd on boot (confused me for a while :frowning: )

I note there are still plenty of “suspend issue” patches in that mailing list so perhaps the suspend still has a way to go for me.

Yep - still have problems - at the moment it is refusing because btusb fails

This was linux 6.11.0-rc4 with amdgpu patch

[   97.004255] PM: hibernation: hibernation entry
[   97.661545] Filesystems sync: 0.010 seconds
[   97.661638] Freezing user space processes
[   97.663358] Freezing user space processes completed (elapsed 0.001 seconds)
[   97.663372] OOM killer disabled.
[   97.663837] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[   97.663841] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[   97.663843] PM: hibernation: Marking nosave pages: [mem 0x09b00000-0x09dfffff]
[   97.663853] PM: hibernation: Marking nosave pages: [mem 0x09f00000-0x09f3bfff]
[   97.663854] PM: hibernation: Marking nosave pages: [mem 0x49b60000-0x4bd5ffff]
[   97.663954] PM: hibernation: Marking nosave pages: [mem 0x4bd69000-0x4bd6cfff]
[   97.663955] PM: hibernation: Marking nosave pages: [mem 0x4bd6f000-0x4bd6ffff]
[   97.663956] PM: hibernation: Marking nosave pages: [mem 0x52ddd000-0x52e2bfff]
[   97.663958] PM: hibernation: Marking nosave pages: [mem 0x548b7000-0x548b7fff]
[   97.663958] PM: hibernation: Marking nosave pages: [mem 0x57f7f000-0x5affefff]
[   97.664104] PM: hibernation: Marking nosave pages: [mem 0x5b000000-0xffffffff]
[   97.668265] PM: hibernation: Basic memory bitmaps created
[   97.670490] PM: hibernation: Preallocating image memory
[   99.365333] PM: hibernation: Allocated 1342293 pages for snapshot
[   99.365354] PM: hibernation: Allocated 5369172 kbytes in 1.69 seconds (3177.02 MB/s)
[   99.365366] Freezing remaining freezable tasks
[   99.368002] Freezing remaining freezable tasks completed (elapsed 0.002 seconds)
[   99.369822] btusb 1-5:1.2: suspend error -16
[   99.369842] btusb 1-5:1.1: suspend error -16
[   99.369856] btusb 1-5:1.0: suspend error -16
[   99.370083] Bluetooth: hci0: urb 00000000a266a7e0 failed to resubmit (113)
[  100.044421] ACPI: EC: interrupt blocked
[  100.044984] ACPI: PM: Preparing to enter system sleep state S4
[  100.383340] ACPI: EC: event blocked
[  100.383351] ACPI: EC: EC stopped
[  100.383354] ACPI: PM: Saving platform NVS memory
[  100.388618] Disabling non-boot CPUs ...
[  100.390949] smpboot: CPU 15 is now offline
[  100.393328] smpboot: CPU 14 is now offline
[  100.395541] smpboot: CPU 13 is now offline
[  100.397693] smpboot: CPU 12 is now offline
[  100.399816] smpboot: CPU 11 is now offline
[  100.401804] smpboot: CPU 10 is now offline
[  100.403895] smpboot: CPU 9 is now offline
[  100.405937] smpboot: CPU 8 is now offline
[  100.407932] smpboot: CPU 7 is now offline
[  100.410024] smpboot: CPU 6 is now offline
[  100.412040] smpboot: CPU 5 is now offline
[  100.414011] smpboot: CPU 4 is now offline
[  100.416160] smpboot: CPU 3 is now offline
[  100.418642] smpboot: CPU 2 is now offline
[  100.421140] smpboot: CPU 1 is now offline
[  100.421781] Spectre V2 : Update user space SMT mitigation: STIBP off
[  100.422249] PM: hibernation: Creating image:
[  101.754504] PM: hibernation: Need to copy 1475825 pages
[  101.754513] PM: hibernation: Normal pages needed: 1475825 + 1024, available pages: 14725498
[  111.063086] PM: hibernation: Image created (1289933 pages copied, 185892 zero pages)
[  100.422490] ACPI: PM: Restoring platform NVS memory
[  100.423370] ACPI: EC: EC started
[  100.424196] LVT offset 0 assigned for vector 0x400
[  100.424766] Enabling non-boot CPUs ...
[  100.424795] smpboot: Booting Node 0 Processor 1 APIC 0x1
[  100.427345] ACPI: \_SB_.PLTF.C001: Found 3 idle states
[  100.427584] Spectre V2 : Update user space SMT mitigation: STIBP always-on
[  100.427595] CPU1 is up
[  100.427615] smpboot: Booting Node 0 Processor 2 APIC 0x2
[  100.430029] ACPI: \_SB_.PLTF.C002: Found 3 idle states
[  100.430199] CPU2 is up
[  100.430213] smpboot: Booting Node 0 Processor 3 APIC 0x3
[  100.432895] ACPI: \_SB_.PLTF.C003: Found 3 idle states
[  100.433086] CPU3 is up
[  100.433100] smpboot: Booting Node 0 Processor 4 APIC 0x4
[  100.435516] ACPI: \_SB_.PLTF.C004: Found 3 idle states
[  100.435693] CPU4 is up
[  100.435706] smpboot: Booting Node 0 Processor 5 APIC 0x5
[  100.438101] ACPI: \_SB_.PLTF.C005: Found 3 idle states
[  100.438323] CPU5 is up
[  100.438335] smpboot: Booting Node 0 Processor 6 APIC 0x6
[  100.440732] ACPI: \_SB_.PLTF.C006: Found 3 idle states
[  100.440933] CPU6 is up
[  100.440946] smpboot: Booting Node 0 Processor 7 APIC 0x7
[  100.443349] ACPI: \_SB_.PLTF.C007: Found 3 idle states
[  100.443602] CPU7 is up
[  100.443614] smpboot: Booting Node 0 Processor 8 APIC 0x8
[  100.446042] ACPI: \_SB_.PLTF.C008: Found 3 idle states
[  100.446265] CPU8 is up
[  100.446278] smpboot: Booting Node 0 Processor 9 APIC 0x9
[  100.448674] ACPI: \_SB_.PLTF.C009: Found 3 idle states
[  100.448964] CPU9 is up
[  100.448976] smpboot: Booting Node 0 Processor 10 APIC 0xa
[  100.451419] ACPI: \_SB_.PLTF.C00A: Found 3 idle states
[  100.451667] CPU10 is up
[  100.451682] smpboot: Booting Node 0 Processor 11 APIC 0xb
[  100.454179] ACPI: \_SB_.PLTF.C00B: Found 3 idle states
[  100.454489] CPU11 is up
[  100.454502] smpboot: Booting Node 0 Processor 12 APIC 0xc
[  100.456924] ACPI: \_SB_.PLTF.C00C: Found 3 idle states
[  100.457195] CPU12 is up
[  100.457208] smpboot: Booting Node 0 Processor 13 APIC 0xd
[  100.459621] ACPI: \_SB_.PLTF.C00D: Found 3 idle states
[  100.459951] CPU13 is up
[  100.459964] smpboot: Booting Node 0 Processor 14 APIC 0xe
[  100.462402] ACPI: \_SB_.PLTF.C00E: Found 3 idle states
[  100.462700] CPU14 is up
[  100.462715] smpboot: Booting Node 0 Processor 15 APIC 0xf
[  100.465129] ACPI: \_SB_.PLTF.C00F: Found 3 idle states
[  100.465493] CPU15 is up
[  100.468564] ACPI: PM: Waking up from system sleep state S4
[  100.472068] ACPI: EC: interrupt unblocked
[  100.476344] ACPI: EC: event unblocked
[  100.476766] [drm] PCIE GART of 512M enabled (table at 0x000000807FD00000).
[  100.476812] amdgpu 0000:c1:00.0: amdgpu: PSP is resuming...
[  100.484988] nvme nvme0: 16/0/0 default/read/poll queues
[  100.500873] amdgpu 0000:c1:00.0: amdgpu: reserve 0x4000000 from 0x8078000000 for PSP TMR
[  101.218730] amdgpu 0000:c1:00.0: amdgpu: RAS: optional ras ta ucode is not available
[  101.226121] amdgpu 0000:c1:00.0: amdgpu: RAP: optional rap ta ucode is not available
[  101.226129] amdgpu 0000:c1:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[  101.226138] amdgpu 0000:c1:00.0: amdgpu: SMU is resuming...
[  101.252330] amdgpu 0000:c1:00.0: amdgpu: SMU is resumed successfully!
[  101.254902] [drm] DMUB hardware initialized: version=0x08003D00
[  102.234125] amdgpu 0000:c1:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[  102.234139] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[  102.234143] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[  102.234146] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[  102.234149] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[  102.234152] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[  102.234155] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[  102.234158] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[  102.234161] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[  102.234164] amdgpu 0000:c1:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[  102.234168] amdgpu 0000:c1:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[  102.234171] amdgpu 0000:c1:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[  102.234174] amdgpu 0000:c1:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[  102.246901] [drm] ring gfx_32776.1.1 was added
[  102.248119] [drm] ring compute_32776.2.2 was added
[  102.249128] [drm] ring sdma_32776.3.3 was added
[  102.249609] [drm] ring gfx_32776.1.1 ib test pass
[  102.250502] [drm] ring compute_32776.2.2 ib test pass
[  102.251093] [drm] ring sdma_32776.3.3 ib test pass
[  102.268407] PM: Using 3 thread(s) for lzo compression
[  102.269208] PM: Compressing and saving image data (1292816 pages)...
[  102.269636] PM: Image saving progress:   0%
[  102.612217] PM: Image saving progress:  10%
[  102.919742] PM: Image saving progress:  20%
[  103.223724] PM: Image saving progress:  30%
[  103.521423] PM: Image saving progress:  40%
[  103.830906] PM: Image saving progress:  50%
[  104.128791] PM: Image saving progress:  60%
[  104.421781] PM: Image saving progress:  70%
[  104.701087] PM: Image saving progress:  80%
[  104.963681] PM: Image saving progress:  90%
[  105.224756] PM: Image saving progress: 100%
[  105.225387] PM: Image saving done
[  105.226136] PM: hibernation: Wrote 5171264 kbytes in 2.95 seconds (1752.97 MB/s)
[  105.226534] PM: Image size after compression: 1840394 kbytes
[  105.227004] PM: S|
[  105.531923] btusb 1-5:1.2: suspend error -16
[  105.532775] btusb 1-5:1.1: suspend error -16
[  105.533178] btusb 1-5:1.0: suspend error -16
[  105.603391] xhci_hcd 0000:c1:00.3: PM: pci_pm_poweroff(): hcd_pci_suspend [usbcore] returns -16
[  105.603447] xhci_hcd 0000:c1:00.3: PM: dpm_run_callback(): pci_pm_poweroff returns -16
[  105.603470] xhci_hcd 0000:c1:00.3: PM: failed to hibernate async: error -16
[  106.030627] usb usb3: root hub lost power or was reset
[  106.030636] usb usb5: root hub lost power or was reset
[  106.030650] usb usb4: root hub lost power or was reset
[  106.030651] usb usb6: root hub lost power or was reset
[  106.030675] usb usb7: root hub lost power or was reset
[  106.030688] usb usb8: root hub lost power or was reset
[  106.031247] [drm] PCIE GART of 512M enabled (table at 0x000000807FD00000).
[  106.031345] amdgpu 0000:c1:00.0: amdgpu: PSP is resuming...
[  106.039162] nvme nvme0: 16/0/0 default/read/poll queues
[  106.055540] amdgpu 0000:c1:00.0: amdgpu: reserve 0x4000000 from 0x8078000000 for PSP TMR
[  106.323488] usb 3-1: reset high-speed USB device number 2 using xhci_hcd
[  106.770535] amdgpu 0000:c1:00.0: amdgpu: RAS: optional ras ta ucode is not available
[  106.778015] amdgpu 0000:c1:00.0: amdgpu: RAP: optional rap ta ucode is not available
[  106.778024] amdgpu 0000:c1:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[  106.778033] amdgpu 0000:c1:00.0: amdgpu: SMU is resuming...
[  106.803552] amdgpu 0000:c1:00.0: amdgpu: SMU is resumed successfully!
[  106.806251] [drm] DMUB hardware initialized: version=0x08003D00
[  107.030617] amdgpu 0000:c1:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[  107.030631] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[  107.030635] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[  107.030639] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[  107.030642] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[  107.030645] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[  107.030648] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[  107.030651] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[  107.030654] amdgpu 0000:c1:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[  107.030658] amdgpu 0000:c1:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[  107.030661] amdgpu 0000:c1:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[  107.030664] amdgpu 0000:c1:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[  107.030667] amdgpu 0000:c1:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[  107.050467] [drm] ring gfx_32776.1.1 was added
[  107.052405] [drm] ring compute_32776.2.2 was added
[  107.053488] [drm] ring sdma_32776.3.3 was added
[  107.053974] [drm] ring gfx_32776.1.1 ib test pass
[  107.054451] [drm] ring compute_32776.2.2 ib test pass
[  107.055080] [drm] ring sdma_32776.3.3 ib test pass
[  107.148612] PM: hibernation: Wakeup event detected during hibernation, rolling back.
[  107.149231] PM: hibernation: Basic memory bitmaps freed
[  107.149523] OOM killer enabled.
[  107.150360] Restarting tasks ... done.
[  107.156246] PM: hibernation: hibernation exit
[  109.187334] Bluetooth: hci0: Opcode 0x0c24 failed: -110
[  109.187338] Bluetooth: hci0: command 0x0c24 tx timeout
[  111.391344] Bluetooth: hci0: Opcode 0x0c24 failed: -110
[  111.644919] usb 1-5: reset high-speed USB device number 7 using xhci_hcd
[  111.917817] Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20221227123429
[  113.292614] mt7921e 0000:01:00.0: ASIC revision: 79220010
[  113.375093] mt7921e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20221227123154a

[  113.390133] mt7921e 0000:01:00.0: WM Firmware Version: ____000000, Build Time: 20221227123243
[  114.205593] Bluetooth: hci0: Device setup in 2343424 usecs
[  114.205610] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[  114.263672] Bluetooth: MGMT ver 1.23
[  114.303272] Bluetooth: hci0: Bad flag given (0x1) vs supported (0x0)
[  114.479732] mt7921e 0000:01:00.0 wlp1s0: renamed from wlan0

Same problem in v6.10.0. Sigh! :unamused:

....
[   91.405262] PM: Image saving done
[   91.405854] PM: hibernation: Wrote 5059648 kbytes in 2.95 seconds (1715.13 MB/s)
[   91.406289] PM: Image size after compression: 1686276 kbytes
[   91.406949] PM: S|
[   91.707591] btusb 1-5:1.1: suspend error -16
[   91.708503] btusb 1-5:1.0: suspend error -16
[   91.777714] xhci_hcd 0000:c1:00.3: PM: pci_pm_poweroff(): hcd_pci_suspend [usbcore] returns -16
[   91.777769] xhci_hcd 0000:c1:00.3: PM: dpm_run_callback(): pci_pm_poweroff returns -16
[   91.777792] xhci_hcd 0000:c1:00.3: PM: failed to hibernate async: error -16
[   92.202444] usb usb3: root hub lost power or was reset
[   92.202459] usb usb5: root hub lost power or was reset
[   92.202466] usb usb6: root hub lost power or was reset
[   92.202475] usb usb4: root hub lost power or was reset
[   92.202492] usb usb7: root hub lost power or was reset
[   92.202505] usb usb8: root hub lost power or was reset
[   92.203034] [drm] PCIE GART of 512M enabled (table at 0x000000807FD00000).
[   92.203126] amdgpu 0000:c1:00.0: amdgpu: PSP is resuming...
[   92.211036] nvme nvme0: 16/0/0 default/read/poll queues
....

OK - found that unloading btusb allows hibernate/resume to work
Found this very old stack exchange link that describes how to do this on Debian

Basically install the pm-utils package

apt install pm-utils

which has very vague documentation but basically look in /usr/lib/pm-utils/defaults and create configuration settings /etc/pm/config.d/modules

e.g. to unload btusb before hibernate and reload after resume (so blue tooth restored)

# If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES="btusb"

Now hibernate/resume is working on my Debian Bookworm FW16 using v6.10 kernel… :grinning:

Would have thought there was a more modern way to do this with systemd-hibernate.service but can’t find anything about modules to unload/reload
that’s recent. It seems strange you have to roll your own or use such an old (but working) package…

@Andrew_Worsley I’m experiencing a very similar issue, see [Regression]: instant wakeup from hibernate with linux 6.10 when bluetooth is turned on/when XHC0 listens to wakeup events. I also provide a pretty simple workaround in that thread.

I’m really curious if disabling wake-up triggers from XHC0 also works for you (provided the framework 16 has the exact same device, that is)