FW16 Debian bookworm hibernate not reliable

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)