You are not logged in.

#1 2024-03-04 01:29:58

v47
Member
Registered: 2024-03-04
Posts: 10

[SOLVED] iwlwifi crashloop resuming from suspend

Background

Hi. Long time user, first time poster.
I have MSI Prestige 16 AI Evo with wifi7 onboard.

❯ lspci
0000:00:00.0 Host bridge: Intel Corporation Device 7d01 (rev 04)
0000:00:02.0 VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08)
0000:00:04.0 Signal processing controller: Intel Corporation Device 7d03 (rev 04)
0000:00:07.0 PCI bridge: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 10)
0000:00:07.1 PCI bridge: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #1 (rev 10)
0000:00:08.0 System peripheral: Intel Corporation Device 7e4c (rev 20)
0000:00:0a.0 Signal processing controller: Intel Corporation Device 7d0d (rev 01)
0000:00:0b.0 Processing accelerators: Intel Corporation Meteor Lake NPU (rev 04)
0000:00:0d.0 USB controller: Intel Corporation Meteor Lake-P Thunderbolt 4 USB Controller (rev 10)
0000:00:0d.2 USB controller: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #0 (rev 10)
0000:00:0e.0 RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller Intel Corporation
0000:00:12.0 Serial controller: Intel Corporation Device 7e45 (rev 20)
0000:00:14.0 USB controller: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
0000:00:14.2 RAM memory: Intel Corporation Device 7e7f (rev 20)
0000:00:15.0 Serial bus controller: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 (rev 20)
0000:00:15.1 Serial bus controller: Intel Corporation Meteor Lake-P Serial IO I2C Controller #1 (rev 20)
0000:00:16.0 Communication controller: Intel Corporation Device 7e70 (rev 20)
0000:00:1c.0 PCI bridge: Intel Corporation Device 7e38 (rev 20)
0000:00:1c.2 PCI bridge: Intel Corporation Device 7e3a (rev 20)
0000:00:1f.0 ISA bridge: Intel Corporation Device 7e02 (rev 20)
0000:00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20)
0000:00:1f.4 SMBus: Intel Corporation Meteor Lake-P SMBus Controller (rev 20)
0000:00:1f.5 Serial bus controller: Intel Corporation Meteor Lake-P SPI Controller (rev 20)
0000:00:1f.6 Ethernet controller: Intel Corporation Device 550b (rev 20)
0000:55:00.0 Network controller: Intel Corporation Wi-Fi 7(802.11be) AX1775*/AX1790*/BE20*/BE401/BE1750* 2x2 (rev 1a)
0000:56:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
10000:e0:06.0 System peripheral: Intel Corporation RST VMD Managed Controller
10000:e0:06.2 PCI bridge: Intel Corporation Device 7ecb (rev 10)
10000:e1:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN770 / PC SN740 256GB / PC SN560 (DRAM-less) NVMe SSD (rev 01)

Wifi works fine until trying to wake up after suspend. Once resumed, iwlwifi goes into crashloop and internet connection is lost.
Before the crashloop starts iwlwifi reports the following:

 iwlwifi 0000:55:00.0: Unable to change power state from D3cold to D0, device inaccessible 

There's also seems to be a problem in `mac80211`, but not sure if that's just caused by dead iwlwifi.

Mar 03 17:00:30 titania kernel: ------------[ cut here ]------------
Mar 03 17:00:30 titania kernel: Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.
Mar 03 17:00:30 titania kernel: WARNING: CPU: 2 PID: 2586 at net/mac80211/util.c:2593 ieee80211_reconfig+0x9f/0x14f0 [mac80211]
Mar 03 17:00:30 titania kernel: Modules linked in: ccm hid_sensor_als hid_sensor_prox hid_sensor_trigger industrialio_triggered_buffer kfifo_buf >
Mar 03 17:00:30 titania kernel:  irqbypass hid_multitouch mei_gsc_proxy intel_pmc_bxt processor_thermal_wt_hint ecdh_generic videobuf2_v4l2 vfat >
Mar 03 17:00:30 titania kernel:  drm_buddy crc32_pclmul rtsx_pci_sdmmc crc32c_intel ttm polyval_clmulni mmc_core serio_raw polyval_generic gf128m>
Mar 03 17:00:30 titania kernel: CPU: 2 PID: 2586 Comm: kworker/u45:20 Tainted: G        W          6.8.0-rc7-dirty #1 719bc640fe4fcb77507e4e09085>
Mar 03 17:00:30 titania kernel: Hardware name: Micro-Star International Co., Ltd. Prestige 16 AI Evo B1MG/MS-15A1, BIOS E15A1IMS.10A 01/29/2024
Mar 03 17:00:30 titania kernel: Workqueue: events_unbound async_run_entry_fn
Mar 03 17:00:30 titania kernel: RIP: 0010:ieee80211_reconfig+0x9f/0x14f0 [mac80211]
Mar 03 17:00:30 titania kernel: Code: 02 00 00 41 c6 86 85 05 00 00 00 4c 89 f7 e8 98 87 fb ff 41 89 c4 85 c0 0f 84 0d 03 00 00 48 c7 c7 28 f8 e2>
Mar 03 17:00:30 titania kernel: RSP: 0018:ffffa9f7c307bcd8 EFLAGS: 00010282
Mar 03 17:00:30 titania kernel: RAX: 0000000000000000 RBX: ffff956bc5518538 RCX: 0000000000000027
Mar 03 17:00:30 titania kernel: RDX: ffff9573210a19c8 RSI: 0000000000000001 RDI: ffff9573210a19c0
Mar 03 17:00:30 titania kernel: RBP: ffff956bc55183c0 R08: 0000000000000000 R09: ffffa9f7c307bc60
Mar 03 17:00:30 titania kernel: R10: 3fffffffffffffff R11: 0000000000000100 R12: 00000000ffffff92
Mar 03 17:00:30 titania kernel: R13: 0000000000000000 R14: ffff956bc5518900 R15: ffff956bdd302c28
Mar 03 17:00:30 titania kernel: FS:  0000000000000000(0000) GS:ffff957321080000(0000) knlGS:0000000000000000
Mar 03 17:00:30 titania kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 03 17:00:30 titania kernel: CR2: 00007f60300050b8 CR3: 0000000809e20004 CR4: 0000000000f70ef0
Mar 03 17:00:30 titania kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 03 17:00:30 titania kernel: DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
Mar 03 17:00:30 titania kernel: PKRU: 55555554
Mar 03 17:00:30 titania kernel: Call Trace:
Mar 03 17:00:30 titania kernel:  <TASK>
Mar 03 17:00:30 titania kernel:  ? ieee80211_reconfig+0x9f/0x14f0 [mac80211 39797889bd9c10ce89474bbc9d5216f382d75da7]
Mar 03 17:00:30 titania kernel:  ? __warn+0x81/0x130
Mar 03 17:00:30 titania kernel:  ? ieee80211_reconfig+0x9f/0x14f0 [mac80211 39797889bd9c10ce89474bbc9d5216f382d75da7]
Mar 03 17:00:30 titania kernel:  ? report_bug+0x171/0x1a0
Mar 03 17:00:30 titania kernel:  ? handle_bug+0x3c/0x80
Mar 03 17:00:30 titania kernel:  ? exc_invalid_op+0x17/0x70
Mar 03 17:00:30 titania kernel:  ? asm_exc_invalid_op+0x1a/0x20
Mar 03 17:00:30 titania kernel:  ? ieee80211_reconfig+0x9f/0x14f0 [mac80211 39797889bd9c10ce89474bbc9d5216f382d75da7]
Mar 03 17:00:30 titania kernel:  ? ieee80211_reconfig+0x9f/0x14f0 [mac80211 39797889bd9c10ce89474bbc9d5216f382d75da7]
Mar 03 17:00:30 titania kernel:  ? psi_group_change+0x213/0x3c0
Mar 03 17:00:30 titania kernel:  ? wait_for_completion+0x3b/0x160
Mar 03 17:00:30 titania kernel:  wiphy_resume+0x82/0x1b0 [cfg80211 94c299565e6a79468bd2add387df8246ffb6bc08]
Mar 03 17:00:30 titania kernel:  ? __pfx_wiphy_resume+0x10/0x10 [cfg80211 94c299565e6a79468bd2add387df8246ffb6bc08]
Mar 03 17:00:30 titania kernel:  dpm_run_callback+0x89/0x1e0
Mar 03 17:00:30 titania kernel:  device_resume+0xb0/0x2d0
Mar 03 17:00:30 titania kernel:  async_resume+0x1d/0x30
Mar 03 17:00:30 titania kernel:  async_run_entry_fn+0x31/0x130
Mar 03 17:00:30 titania kernel:  process_one_work+0x171/0x340
Mar 03 17:00:30 titania kernel:  worker_thread+0x27b/0x3a0
Mar 03 17:00:30 titania kernel:  ? __pfx_worker_thread+0x10/0x10
Mar 03 17:00:30 titania kernel:  kthread+0xe5/0x120
Mar 03 17:00:30 titania kernel:  ? __pfx_kthread+0x10/0x10
Mar 03 17:00:30 titania kernel:  ret_from_fork+0x31/0x50
Mar 03 17:00:30 titania kernel:  ? __pfx_kthread+0x10/0x10
Mar 03 17:00:30 titania kernel:  ret_from_fork_asm+0x1b/0x30
Mar 03 17:00:30 titania kernel:  </TASK>
Mar 03 17:00:30 titania kernel: ---[ end trace 0000000000000000 ]---

Here's a full kernel log for the session http://dpaste.com//6FGRDHPV3

What I tried with no luck

- Updating BIOS to latest
- Using 6.8.0-rc7 as well as applying https://lore.kernel.org/linux-pci/20231 … intel.com/
- Using LTS (6.6.19)

-

sudo modprobe -v -r iwldvml; sudo modprobe -v iwlwifi

any attempt to communicate with the driver invokes crashloop again.

-

disable_11be and disable_11ax

- Disabling 'fastboot' in bios

FWIF I have windows 11 pre-installed, not sure if it may be breaking something.

I'd appreciate any help as to how to possibly fix or at least mitigate the issue.

[SOLUTION]
Add the following file and don't forget to chmod +x it.

/usr/lib/systemd/system-sleep/iwlwifi.sh:

#!/bin/sh

case $1/$2 in
	pre/*)
	modprobe -r iwlmvm iwlwifi
	;;
	post/*)
	modprobe iwlmvm iwlwifi
	;;
esac

Last edited by v47 (2024-03-06 07:50:01)

Offline

#2 2024-03-04 08:05:00

seth
Member
Registered: 2012-09-03
Posts: 51,474

Re: [SOLVED] iwlwifi crashloop resuming from suspend

It's not only the wifi

Mar 03 16:48:15 titania kernel: ------------[ cut here ]------------
Mar 03 16:48:15 titania kernel: i915 0000:00:02.0: i915 raw-wakerefs=1 wakelocks=1 on cleanup
Mar 03 16:48:15 titania kernel: WARNING: CPU: 1 PID: 739 at drivers/gpu/drm/i915/intel_runtime_pm.c:444 intel_runtime_pm_driver_release+0x61/0x70 [i915]
Mar 03 16:48:15 titania kernel: Modules linked in: ccm hid_sensor_prox hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_custom hid_sensor_hub intel_ishtp_hid snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic iwlmvm snd_soc_dmic snd_sof_pci_intel_mtl snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda intel_uncore_frequency snd_sof_pci intel_uncore_frequency_common snd_sof_xtensa_dsp snd_sof x86_pkg_temp_thermal intel_powerclamp mac80211 snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_generic_allocation soundwire_bus coretemp snd_soc_core btusb kvm_intel btrtl btintel snd_compress ac97_bus snd_pcm_dmaengine btbcm joydev mousedev snd_hda_intel btmtk kvm snd_intel_dspcfg libarc4 bluetooth snd_intel_sdw_acpi uvcvideo snd_hda_codec iwlwifi snd_hda_core videobuf2_vmalloc uvc videobuf2_memops videobuf2_v4l2 processor_thermal_device_pci snd_hwdep
Mar 03 16:48:15 titania kernel:  processor_thermal_device snd_pcm videodev processor_thermal_wt_hint irqbypass processor_thermal_rfim hid_multitouch snd_timer iTCO_wdt mei_gsc_proxy ucsi_acpi vfat processor_thermal_rapl rapl intel_pmc_bxt videobuf2_common intel_rapl_msr intel_cstate cfg80211 spi_nor mei_me intel_rapl_common iTCO_vendor_support ecdh_generic snd typec_ucsi intel_lpss_pci fat thunderbolt e1000e intel_uncore i2c_i801 intel_ish_ipc intel_vpu mei mc processor_thermal_wt_req intel_lpss mtd typec soundcore rfkill wmi_bmof intel_ishtp pcspkr i2c_smbus msi_wmi processor_thermal_power_floor idma64 i2c_hid_acpi roles igen6_edac processor_thermal_mbox i2c_hid intel_pmc_core int3403_thermal int340x_thermal_zone intel_vsec int3400_thermal gpio_keys intel_hid pmt_telemetry acpi_thermal_rel soc_button_array pmt_class acpi_tad acpi_pad sparse_keymap mac_hid fuse loop nfnetlink ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod i915 nvme nvme_core nvme_auth crct10dif_pclmul
Mar 03 16:48:15 titania kernel:  crc32_pclmul rtsx_pci_sdmmc crc32c_intel i2c_algo_bit mmc_core drm_buddy polyval_clmulni ttm polyval_generic gf128mul ghash_clmulni_intel serio_raw intel_gtt sha512_ssse3 atkbd sha256_ssse3 drm_display_helper libps2 sha1_ssse3 vivaldi_fmap aesni_intel rtsx_pci crypto_simd cec cryptd xhci_pci i8042 spi_intel_pci vmd xhci_pci_renesas video spi_intel serio wmi
Mar 03 16:48:15 titania kernel: CPU: 1 PID: 739 Comm: kworker/u45:12 Not tainted 6.8.0-rc7-dirty #1 719bc640fe4fcb77507e4e09085e874b82803324
Mar 03 16:48:15 titania kernel: Hardware name: Micro-Star International Co., Ltd. Prestige 16 AI Evo B1MG/MS-15A1, BIOS E15A1IMS.10A 01/29/2024
Mar 03 16:48:15 titania kernel: Workqueue: events_unbound async_run_entry_fn
Mar 03 16:48:15 titania kernel: RIP: 0010:intel_runtime_pm_driver_release+0x61/0x70 [i915]
Mar 03 16:48:15 titania kernel: Code: fc 10 48 8b 5f 50 48 85 db 75 03 48 8b 1f e8 06 6a 29 c6 45 89 e0 89 e9 48 89 da 48 89 c6 48 c7 c7 48 aa ba c0 e8 5f 88 a0 c5 <0f> 0b 5b 5d 41 5c c3 cc cc cc cc 0f 1f 40 00 90 90 90 90 90 90 90
Mar 03 16:48:15 titania kernel: RSP: 0000:ffffb657410afd90 EFLAGS: 00010282
Mar 03 16:48:15 titania kernel: RAX: 0000000000000000 RBX: ffff97f042c97db0 RCX: 0000000000000027
Mar 03 16:48:15 titania kernel: RDX: ffff97f7a10619c8 RSI: 0000000000000001 RDI: ffff97f7a10619c0
Mar 03 16:48:15 titania kernel: RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000ffff0a
Mar 03 16:48:15 titania kernel: R10: 0000000000000000 R11: ffffffff86fa5bf0 R12: 0000000000000001
Mar 03 16:48:15 titania kernel: R13: ffff97f0416ea000 R14: ffff97f047a162e0 R15: ffff97f05afa2568
Mar 03 16:48:15 titania kernel: FS:  0000000000000000(0000) GS:ffff97f7a1040000(0000) knlGS:0000000000000000
Mar 03 16:48:15 titania kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 03 16:48:15 titania kernel: CR2: 00005640a3ad4b70 CR3: 00000007e2820006 CR4: 0000000000f70ef0
Mar 03 16:48:15 titania kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 03 16:48:15 titania kernel: DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
Mar 03 16:48:15 titania kernel: PKRU: 55555554
Mar 03 16:48:15 titania kernel: Call Trace:
Mar 03 16:48:15 titania kernel:  <TASK>
Mar 03 16:48:15 titania kernel:  ? intel_runtime_pm_driver_release+0x61/0x70 [i915 50bb3f3b6c19c9a01cc0fc3f2d650e49e8d5b152]
Mar 03 16:48:15 titania kernel:  ? __warn+0x81/0x130
Mar 03 16:48:15 titania kernel:  ? intel_runtime_pm_driver_release+0x61/0x70 [i915 50bb3f3b6c19c9a01cc0fc3f2d650e49e8d5b152]
Mar 03 16:48:15 titania kernel:  ? report_bug+0x171/0x1a0
Mar 03 16:48:15 titania kernel:  ? console_unlock+0xcb/0x120
Mar 03 16:48:15 titania kernel:  ? handle_bug+0x3c/0x80
Mar 03 16:48:15 titania kernel:  ? exc_invalid_op+0x17/0x70
Mar 03 16:48:15 titania kernel:  ? asm_exc_invalid_op+0x1a/0x20
Mar 03 16:48:15 titania kernel:  ? __pfx_pci_conf1_read+0x10/0x10
Mar 03 16:48:15 titania kernel:  ? intel_runtime_pm_driver_release+0x61/0x70 [i915 50bb3f3b6c19c9a01cc0fc3f2d650e49e8d5b152]
Mar 03 16:48:15 titania kernel:  i915_drm_suspend_late+0x11f/0x130 [i915 50bb3f3b6c19c9a01cc0fc3f2d650e49e8d5b152]
Mar 03 16:48:15 titania kernel:  ? __pfx_pci_pm_suspend_late+0x10/0x10
Mar 03 16:48:15 titania kernel:  dpm_run_callback+0x89/0x1e0
Mar 03 16:48:15 titania kernel:  __device_suspend_late+0xb7/0x230
Mar 03 16:48:15 titania kernel:  async_suspend_late+0x1e/0x70
Mar 03 16:48:15 titania kernel:  async_run_entry_fn+0x31/0x130
Mar 03 16:48:15 titania kernel:  process_one_work+0x171/0x340
Mar 03 16:48:15 titania kernel:  worker_thread+0x27b/0x3a0
Mar 03 16:48:15 titania kernel:  ? __pfx_worker_thread+0x10/0x10
Mar 03 16:48:15 titania kernel:  kthread+0xe5/0x120
Mar 03 16:48:15 titania kernel:  ? __pfx_kthread+0x10/0x10
Mar 03 16:48:15 titania kernel:  ret_from_fork+0x31/0x50
Mar 03 16:48:15 titania kernel:  ? __pfx_kthread+0x10/0x10
Mar 03 16:48:15 titania kernel:  ret_from_fork_asm+0x1b/0x30
Mar 03 16:48:15 titania kernel:  </TASK>
Mar 03 16:48:15 titania kernel: ---[ end trace 0000000000000000 ]---
Mar 03 16:48:15 titania kernel: ACPI: EC: interrupt blocked
Mar 03 16:48:15 titania kernel: ACPI: EC: interrupt unblocked
Mar 03 16:48:15 titania kernel: pcieport 0000:00:1c.0: Data Link Layer Link Active not set in 1000 msec
Mar 03 16:48:15 titania kernel: iwlwifi 0000:55:00.0: Unable to change power state from D3cold to D0, device inaccessible

FWIF I have windows 11 pre-installed, not sure if it may be breaking something.

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

(Fwwi, Radio failures are the by far most common collision consequences)

Offline

#3 2024-03-04 08:59:07

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

seth wrote:

It's not only the wifi
3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

I did, although it didn't help.
Also let me clarify we're talking about S3, not S4 (hibernate).

Offline

#4 2024-03-04 09:12:24

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

I just noticed that the device doesn't really ever go to sleep with [s2idle] mode. nvm, I assumed that by the power indicator which apparently is not supposed to start blinking with s2idle
It does with deep sleep mode, but never wakes up.

Mar 04 00:47:27 titania systemd[1]: Reached target Sleep.
Mar 04 00:47:27 titania wpa_supplicant[864]: p2p-dev-wlp85s0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 00:47:27 titania wpa_supplicant[864]: p2p-dev-wlp85s0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 00:47:27 titania wpa_supplicant[864]: nl80211: deinit ifname=p2p-dev-wlp85s0 disabled_11b_rates=0
Mar 04 00:47:27 titania systemd[1]: Starting System Suspend...
Mar 04 00:47:27 titania systemd-sleep[1120]: Performing sleep operation 'suspend'...
Mar 04 00:47:27 titania kernel: PM: suspend entry (s2idle)
Mar 04 00:47:27 titania kernel: Filesystems sync: 0.002 seconds
Mar 04 00:47:27 titania wpa_supplicant[864]: wlp85s0f0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 00:47:27 titania wpa_supplicant[864]: wlp85s0f0: CTRL-EVENT-DSCP-POLICY clear_all
Mar 04 00:47:27 titania wpa_supplicant[864]: nl80211: deinit ifname=wlp85s0f0 disabled_11b_rates=0
Mar 04 00:49:05 titania kernel: Freezing user space processes
Mar 04 00:49:05 titania kernel: Freezing user space processes completed (elapsed 0.001 seconds)
Mar 04 00:49:05 titania kernel: OOM killer disabled.
Mar 04 00:49:05 titania kernel: Freezing remaining freezable tasks
Mar 04 00:49:05 titania kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Mar 04 00:49:05 titania kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Mar 04 00:49:05 titania kernel: e1000e: EEE TX LPI TIMER: 00000011
Mar 04 00:49:05 titania kernel: ACPI: EC: interrupt blocked
Mar 04 00:49:05 titania kernel: ACPI: EC: interrupt unblocked
Mar 04 00:49:05 titania kernel: pcieport 0000:00:1c.0: Data Link Layer Link Active not set in 1000 msec
Mar 04 00:49:05 titania kernel: iwlwifi 0000:55:00.0: Unable to change power state from D3cold to D0, device inaccessible

I'm not sure what's up with the timeline (look at the timestamps).
-> systemd reports sleep
-> wpa_supplicant does "nl80211: deinit ifname=wlp85s0f0 disabled_11b_rates=0"
-> 1.5 minutes lid closed
-> I wake up the laptop
-> "freezing user space processes; freezing remaining tasks; etc."
-> attempting to enable adapter
-> "Unable to change power state from D3cold to D0, device inaccessible"

Do I understand correctly that the system got hung on nl80211: deinit ifname=wlp85s0f0 disabled_11b_rates=0 and then AFTER I opened the lid kernel attempted to continue suspend but never actually reached the suspend state?

Last edited by v47 (2024-03-04 09:25:19)

Offline

#5 2024-03-04 13:37:55

seth
Member
Registered: 2012-09-03
Posts: 51,474

Re: [SOLVED] iwlwifi crashloop resuming from suspend

S4 ./. S resp. S2idle isn't relevant - the main problem is that the HW is under control of two OS at the same time (the voodoo dance was btw. not meant as a joke, it's anecdotally required to unconfuse the firmware…)

The timestamps are ok, you're receiving/logging some of the late messages after the wake.
Are the i915 errors still there?
Do you still get

Mar 03 16:47:14 titania kernel: ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
Mar 03 16:47:14 titania kernel: acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
Mar 03 16:47:14 titania kernel: acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
Mar 03 16:47:14 titania kernel: pci 10000:e1:00.0: can't override BIOS ASPM; OS doesn't have ASPM control

If you
* stop networkmanager
* unload iwlwifi
* suspend & wake
* load iwlwifi
=> do you still fail to get the device to D0?
* start NM again
=> does it work?

Offline

#6 2024-03-04 17:57:32

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

Oh no, I understand the voodoo dance and I absolutely did it smile

seth wrote:

Are the i915 errors still there?

Actually no, I didn't notice this befroe, but those errors are gone now!
now it's only iwlwifi

 Mar 03 16:47:14 titania kernel: pci 10000:e1:00.0: can't override BIOS ASPM; OS doesn't have ASPM control 

is still there

stopping NM and unloading iwlwifi doesn't help.
it still shows message about D3cold -> D0 failure. As soon as I start NM I get the crashloop again.
https://0x0.st/H7M3.txt

Offline

#7 2024-03-04 18:45:39

seth
Member
Registered: 2012-09-03
Posts: 51,474

Re: [SOLVED] iwlwifi crashloop resuming from suspend

Mar 04 09:39:49 titania sudo[1498]:      v47 : TTY=pts/0 ; PWD=/home/v47 ; USER=root ; COMMAND=/usr/bin/modprobe -v -r iwlwifi
Mar 04 09:40:10 titania kernel: iwlwifi 0000:55:00.0: Unable to change power state from D3cold to D0, device inaccessible
Mar 04 09:40:58 titania sudo[1596]:      v47 : TTY=pts/0 ; PWD=/home/v47 ; USER=root ; COMMAND=/usr/bin/modprobe -v iwlwifi

Did "lsmod" confirm that the module was gone?
Seems otherwise autoloaded w/ the resume hmm

systemctl stop NetworkManager
echo 1 | sudo tee /sys/bus/pci/devices/0000:55:00.0/remove
sudo modprobe -r iwldvm iwlwifi
lsmod | grep iwl
# suspend, resume
echo 1 | sudo tee /sys/bus/pci/rescan
lsmod | grep iwl
systemctl start NetworkManager

Offline

#8 2024-03-05 03:51:21

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

My bad for not checking lsmod earlier.
I needed to remove iwl[m]vm not iwl[d]wm as it was the one using iwlwifi.
so simply stopping NM, unloading the modules, suspend/resume, load modules back and start NM worked.

I tried bus remove and rescan, even though the device re-appeared upon rescan, network interface was gone and not restored.

I guess a workaround would be to add a suspend hook to do this for me, but still wonder what's the root cause and if it's possible to fix it properly.
http://0x0.st/H71A.txt

Also my HW clock got reset along some of these operations, not sure what's going on.

And thanks for guiding, really appreciate it!

Last edited by v47 (2024-03-05 04:19:32)

Offline

#9 2024-03-05 04:02:11

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

Also out of curiosity, is there a way to rescan interfaces?
"udevadm control --reload" didn't work

Offline

#10 2024-03-05 06:53:10

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

So this mitigates the issue, I won't need to reboot every time now, yay smile

/usr/lib/systemd/system-sleep/iwlwifi.sh:

#!/bin/sh

case $1/$2 in
	pre/*)
	modprobe -r iwlmvm iwlwifi
	;;
	post/*)
	modprobe iwlmvm iwlwifi
	;;
esac

Still wonder what's wrong? Is it the driver or firmware issue due to super new hardware?

Offline

#11 2024-03-05 07:49:57

seth
Member
Registered: 2012-09-03
Posts: 51,474

Re: [SOLVED] iwlwifi crashloop resuming from suspend

\o/
On a formal note, please don't bump - edit your previous post if nobody has yet replied.
(I sometimes do this weird thing where humans just fall unconscious for a couple of hours. Very irritating wink)

Also my HW clock got reset along some of these operations, not sure what's going on.

https://bbs.archlinux.org/viewtopic.php?id=283620

Anything in your journals about this?
A drastic time skew might be enough to kick the module out of balance hmm

Also out of curiosity, is there a way to rescan interfaces?

echo 1 | sudo tee /sys/bus/pci/rescan

It might have been necessary to explicitly reload iwlwifi to the the nic back.
But the rescan isn't required, stalling the module across the suspend seems to do it.

Offline

#12 2024-03-05 08:23:32

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

Didn't try to bump, just wanted to keep separate things in separate messages, but noted! smile

no, I didn't see anything like that. windows did an update of something, maybe that was it. I'll keep an eye (and most likely will uninstall windows wink)

re: rescan interfaces I mean network interface/device (wlp85s0f0 in my case).

my main concern now if there's a proper fix to the issue and why that actually happens. would it make sense to open a github issue against kernel/iwlwifi ?
from what I understand, it may also be firmware or bios or whatnot.

Offline

#13 2024-03-05 15:49:00

seth
Member
Registered: 2012-09-03
Posts: 51,474

Re: [SOLVED] iwlwifi crashloop resuming from suspend

re: rescan interfaces I mean network interface/device (wlp85s0f0 in my case).

Yes, as mentioned you might still have had to explicitly load iwlwif, but that's now moot.

The firmware resp. iwlwifi should™ not crash, even not on weird time shifts.
https://bugzilla.kernel.org/buglist.cgi … ch=iwlwifi

As for the rtc shift, is this on battery or external power or regardless?
We've not seen this in journals, have we? How exactly did you gage that (hwclock?) and what are the actual times (before and after the suspend and in relation to the system time, resp. a wall clock)?

Offline

#14 2024-03-06 07:44:37

v47
Member
Registered: 2024-03-04
Posts: 10

Re: [SOLVED] iwlwifi crashloop resuming from suspend

re: rtc shift, I tried multiple times to repeat all the processes I did and the shift never happened again. Tried with and w/o power adapter.
I did update BIOS though, I suppose that's when it happened.

All and all I think this is a separate issue and we can close this topic as solved, even though it's just an itermediate solution. I'll be waiting for the driver/firmware update.

Thanks, @seth!

Offline

Board footer

Powered by FluxBB