Hibernate was hanging during resume - just black screen and then eventually reboot. Got a similar issue running the zoom-client snap when connecting to a meeting or suspend.
But when I plugged in the power cable it was more reliably - 50% black screen!
I got this with both the standard bookworm kernel and the latest backports Debian 6.7.12-1~bpo12+1 (2024-05-06)
Logged a support issue with Framework and they suggested changing BIOS to optimal defaults : -
F2 (Enter BIOS) Set-Up, F9 (Optimal Defaults), F10 (Save and exit)
I also added no_console_suspend to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (and did update-grub to implement it on kernels)
Then I started to get more informative messages not just black screen and reboot.
[ 188.708238] mt7921e 0000:01:00.0: Message 00020007 (seq 1) timeout
[ 188.708431] mt7921e 0000:01:00.0: PM: dpm_run_callback(): pci_pm_restore+0x0/0xe0 returns -110
[ 188.708448] mt7921e 0000:01:00.0: PM: failed to restore async: error -110
[ 188.719217] usb 1-3.2: reset full-speed USB device number 6 using xhci_hcd
[ 188.791472] mt7921e 0000:01:00.0: Failed to get patch semaphore
[ 188.828420] usb 1-3.2: unable to get BOS descriptor set
[ 189.006363] usb 1-5: reset high-speed USB device number 7 using xhci_hcd
[ 189.258820] usb 1-4.2: reset full-speed USB device number 9 using xhci_hcd
[ 189.369400] usb 1-4.2: unable to get BOS descriptor set
[ 192.007457] mt7921e 0000:01:00.0: Message 00000010 (seq 14) timeout
[ 192.007472] mt7921e 0000:01:00.0: Failed to get patch semaphore
[ 195.291143] mt7921e 0000:01:00.0: Message 00000010 (seq 15) timeout
[ 195.291160] mt7921e 0000:01:00.0: Failed to get patch semaphore
[ 198.337161] mt7921e 0000:01:00.0: Message 000046ed (seq 1) timeout
[ 198.337178] ------------[ cut here ]------------
[ 198.337180] Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.
[ 198.337204] WARNING: CPU: 15 PID: 11 at net/mac80211/util.c:2593 ieee80211_reconfig+0x9f/0x14e0 [mac80211]
[ 198.337279] Modules linked in: ctr ccm rfcomm cmac algif_hash algif_skcipher af_alg snd_seq_dummy snd_hrtimer snd_seq snd_seq_device qrtr bnep binfmt_misc nls_ascii nls_cp437 vfat fat mt7921e mt7921_common mt792x_lib btusb mt76_connac_lib btrtl btintel mt76 btbcm btmtk bluetooth mac80211 snd_sof_amd_rembrandt snd_sof_amd_acp snd_sof_pci intel_rapl_msr snd_sof_xtensa_dsp intel_rapl_common edac_mce_amd snd_sof kvm_amd snd_hda_codec_realtek libarc4 sha3_generic snd_sof_utils snd_hda_codec_generic jitterentropy_rng hid_sensor_als ledtrig_audio kvm cfg80211 snd_soc_core snd_hda_codec_hdmi hid_sensor_trigger snd_compress snd_hda_intel snd_pcm_dmaengine hid_sensor_iio_common drbg snd_intel_dspcfg industrialio_triggered_buffer snd_intel_sdw_acpi kfifo_buf snd_hda_codec irqbypass ansi_cprng industrialio snd_pci_ps ecdh_generic snd_rpl_pci_acp6x snd_hda_core rapl wmi_bmof snd_pci_acp6x snd_hwdep ecc pcspkr snd_pcm k10temp snd_pci_acp5x ucsi_acpi snd_rn_pci_acp3x typec_ucsi snd_timer snd_acp_config sp5100_tco snd_soc_acpi snd
[ 198.337374] typec snd_pci_acp3x watchdog rfkill ccp soundcore roles ac joydev amd_pmc hid_multitouch evdev squashfs parport_pc ppdev lp parport loop efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic dm_crypt dm_mod usbhid amdgpu drm_exec amdxcp drm_buddy gpu_sched i2c_algo_bit drm_suballoc_helper drm_display_helper hid_sensor_hub cec rc_core hid_generic drm_ttm_helper nvme
[ 198.337426] mt7921e 0000:01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000d address=0xffc41f80 flags=0x0000]
[ 198.337427] i2c_hid_acpi ttm i2c_hid nvme_core drm_kms_helper hid xhci_pci t10_pi crc32_pclmul xhci_hcd crc32c_intel crc64_rocksoft_generic ghash_clmulni_intel sha512_ssse3 crc64_rocksoft drm thunderbolt sha512_generic crc_t10dif usbcore crct10dif_generic cros_ec_lpcs sha256_ssse3 crct10dif_pclmul cros_ec crc64 sha1_ssse3 i2c_piix4 video usb_common crct10dif_common button battery wmi aesni_intel crypto_simd cryptd
[ 198.337471] CPU: 15 PID: 11 Comm: kworker/u32:0 Not tainted 6.7.12+bpo-amd64 #1 Debian 6.7.12-1~bpo12+1
[ 198.337476] Hardware name: Framework Laptop 16 (AMD Ryzen 7040 Series)/FRANMZCP07, BIOS 03.03 03/27/2024
[ 198.337479] Workqueue: events_unbound async_run_entry_fn
[ 198.337488] RIP: 0010:ieee80211_reconfig+0x9f/0x14e0 [mac80211]
[ 198.337532] Code: 02 00 00 41 c6 86 85 05 00 00 00 4c 89 f7 e8 68 8b fb ff 41 89 c4 85 c0 0f 84 0d 03 00 00 48 c7 c7 e8 2c 19 c2 e8 a1 c5 fe eb <0f> 0b eb 2d 84 c0 0f 85 9d 01 00 00 c6 87 85 05 00 00 00 e8 39 8b
[ 198.337535] RSP: 0018:ffffb1a3400fbcd0 EFLAGS: 00010282
[ 198.337538] RAX: 0000000000000000 RBX: ffff9b3749720538 RCX: 0000000000000027
[ 198.337541] RDX: ffff9b46201e1408 RSI: 0000000000000001 RDI: ffff9b46201e1400
[ 198.337543] RBP: ffff9b37497203c0 R08: 0000000000000000 R09: ffffb1a3400fbaa0
[ 198.337544] R10: ffffb1a3400fba98 R11: 0000000000000003 R12: 00000000ffffff92
[ 198.337546] R13: 0000000000000000 R14: ffff9b3749720900 R15: ffff9b37497205b8
[ 198.337548] FS: 0000000000000000(0000) GS:ffff9b46201c0000(0000) knlGS:0000000000000000
[ 198.337550] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 198.337552] CR2: 0000000000000000 CR3: 0000000c9ca20000 CR4: 0000000000750ef0
[ 198.337555] PKRU: 55555554
[ 198.337556] Call Trace:
[ 198.337561] <TASK>
[ 198.337563] ? ieee80211_reconfig+0x9f/0x14e0 [mac80211]
[ 198.337603] ? __warn+0x81/0x130
[ 198.337611] ? ieee80211_reconfig+0x9f/0x14e0 [mac80211]
[ 198.337652] ? report_bug+0x171/0x1a0
[ 198.337657] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337662] ? console_unlock+0xcb/0x120
[ 198.337668] ? handle_bug+0x41/0x70
[ 198.337674] ? exc_invalid_op+0x17/0x70
[ 198.337678] ? asm_exc_invalid_op+0x1a/0x20
[ 198.337686] ? ieee80211_reconfig+0x9f/0x14e0 [mac80211]
[ 198.337726] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337729] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337732] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337734] ? update_load_avg+0x7e/0x7e0
[ 198.337740] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337743] ? srso_alias_return_thunk+0x5/0xfbef5
[ 198.337745] ? wait_for_completion+0x3b/0x160
[ 198.337752] wiphy_resume+0x82/0x1a0 [cfg80211]
[ 198.337794] ? __pfx_wiphy_resume+0x10/0x10 [cfg80211]
[ 198.337810] dpm_run_callback+0x89/0x1e0
[ 198.337816] __device_resume+0xa5/0x250
[ 198.337818] async_resume+0x1d/0x30
[ 198.337819] async_run_entry_fn+0x31/0x130
[ 198.337822] process_one_work+0x17c/0x350
[ 198.337826] worker_thread+0x27b/0x3a0
[ 198.337829] ? __pfx_worker_thread+0x10/0x10
[ 198.337830] kthread+0xe5/0x120
[ 198.337833] ? __pfx_kthread+0x10/0x10
[ 198.337835] ret_from_fork+0x31/0x50
[ 198.337839] ? __pfx_kthread+0x10/0x10
[ 198.337841] ret_from_fork_asm+0x1b/0x30
[ 198.337847] </TASK>
[ 198.337847] ---[ end trace 0000000000000000 ]---
[ 198.337907] ------------[ cut here ]------------
So I tried unloading this mt7921e and that avoid that complaint.
But I still got queuing ieee80211 work while going to suspend
and then a hang on resuming.
After some tracing I think that line comes from mac80211 but many things depend on that module - but I think I can avoid this by rmmod-ing the mt7921_common as it then seems to be fine.
BUT this is all with the power cable plugged in.
Removing the power cable causes the resume to hang as follows
[ 81.547005] amdgpu 0000:c1:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[ 81.547008] amdgpu 0000:c1:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[ 81.547011] amdgpu 0000:c1:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
[ 81.547014] amdgpu 0000:c1:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[ 81.570551] [drm] ring gfx_32775.1.1 was added
[ 81.571887] [drm] ring compute_32775.2.2 was added
[ 81.573173] [drm] ring sdma_32775.3.3 was added
[ 81.574080] [drm] ring gfx_32775.1.1 ib test pass
[ 81.574657] [drm] ring compute_32775.2.2 ib test pass
[ 81.575352] [drm] ring sdma_32775.3.3 ib test pass
[ 81.868648] usb 1-3: reset high-speed USB device number 3 using xhci_hcd
[ 82.148798] usb 2-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[ 82.432339] usb 1-2.1: reset full-speed USB device number 4 using xhci_hcd
**** following lines never appear and hangs here for ever ****
[ 82.696280] usb 1-4: reset high-speed USB device number 5 using xhci_hcd
[ 83.427875] usb 1-2.2: reset low-speed USB device number 6 using xhci_hcd
[ 83.827724] usb 1-3.2: reset full-speed USB device number 7 using xhci_hcd
[ 83.939744] usb 1-3.2: unable to get BOS descriptor set
[ 84.143368] usb 1-5: reset high-speed USB device number 8 using xhci_hcd
[ 84.427570] usb 1-4.2: reset full-speed USB device number 10 using xhci_hcd
[ 84.539786] usb 1-4.2: unable to get BOS descriptor set
[ 84.575775] PM: hibernation: Basic memory bitmaps freed
[ 84.575932] OOM killer enabled.
[ 84.576396] Restarting tasks ...
[ 84.577262] Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20221227123429
[ 84.577379] done.
[ 84.578183] usb 1-4.1: USB disconnect, device number 9
[ 84.582137] PM: hibernation: hibernation exit
[ 84.662863] usb 1-4.1: new full-speed USB device number 11 using xhci_hcd
[ 84.791898] usb 1-4.1: New USB device found, idVendor=27c6, idProduct=609c, bcdDevice= 1.00
[ 84.791910] usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 84.791914] usb 1-4.1: Product: Goodix USB2.0 MISC
[ 84.791918] usb 1-4.1: Manufacturer: Goodix Technology Co., Ltd.
[ 84.791921] usb 1-4.1: SerialNumber: UIDD89E4D2A_XXXX_MOC_B0
[ 86.822398] Bluetooth: hci0: Device setup in 2194467 usecs
[ 86.822408] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[ 86.877516] Bluetooth: MGMT ver 1.22
[ 90.683175] mt7921e 0000:01:00.0: firmware: direct-loading firmware mediatek/WIFI_RAM_CODE_MT7922_1.bin
[ 90.685345] mt7921e 0000:01:00.0: ASIC revision: 79220010
[ 90.769743] mt7921e 0000:01:00.0: firmware: direct-loading firmware mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin
- I have two systemd services that unload those modules and I show them
/etc/systemd/system/wifi-suspend.service
[Unit]
Description=Disable and reenable mt7921e module on sleep
Before=sleep.target
StopWhenUnneeded=yes
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/rmmod mt7921e
ExecStart=/usr/bin/sleep 5
ExecStop=/usr/bin/sleep 5
ExecStop=/usr/sbin/modprobe mt7921e
[Install]
WantedBy=sleep.target
- Then enable it with:
systemctl enable wifi-suspend.service
- Similarly for the mt7921_common module - /etc/systemd/system/mt7921e-suspend.service
[Unit]
Description=Disable and reenable mt7921_common module on sleep
Before=sleep.target
After=wifi-suspend.service
StopWhenUnneeded=yes
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/rmmod mt7921_common
ExecStart=/usr/bin/sleep 1
ExecStop=/usr/bin/sleep 1
ExecStop=/usr/sbin/modprobe mt7921_common
[Install]
WantedBy=sleep.target
- Enable it similarly :
systemctl enable mt7921e-suspend.service