Wifi stops working after sleep, after F41 upgrade

Immediately after upgrading to F41, this issue started. I’ve never encountered it before.
Whenever my laptop wakes from sleep, wifi doesn’t work. It shows the icon for connecting, but nothing happens and shortly after it gives up.
Rebooting always solves it.

I suck at looking through logs, but this seems like the relevant portion:

Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.
WARNING: CPU: 0 PID: 4983 at net/mac80211/util.c:1828 ieee80211_reconfig+0xa1/0x1660 [mac80211]
Modules linked in: ib_core uinput rfcomm snd_seq_dummy snd_hrtimer nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reje>
 mei_hdcp mei_pxp kvm snd_hda_ext_core spi_nor iTCO_wdt mac80211 intel_pmc_bxt ee1004 mtd iTCO_vendor_support rapl snd_soc_core intel_rapl_msr intel_cstate snd_compress >
 sparse_keymap acpi_thermal_rel pmt_telemetry pmt_class acpi_pad acpi_tad joydev loop nfnetlink zram xe drm_ttm_helper gpu_sched drm_suballoc_helper drm_gpuvm drm_exec i>
CPU: 0 UID: 0 PID: 4983 Comm: kworker/u48:47 Not tainted 6.11.5-300.fc41.x86_64 #1
Hardware name: LENOVO 21BVCTO1WW/21BVCTO1WW, BIOS N3MET12W (1.11 ) 02/09/2023
Workqueue: async async_run_entry_fn
RIP: 0010:ieee80211_reconfig+0xa1/0x1660 [mac80211]
Code: 03 00 00 41 c6 87 ad 05 00 00 00 4c 89 ff e8 b6 02 fb ff 41 89 c4 85 c0 0f 84 25 03 00 00 48 c7 c7 e8 63 aa c1 e8 ff 75 75 d7 <0f> 0b eb 31 84 c0 0f 85 b9 01 00 00>
RSP: 0018:ffffae220531bce0 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff9fd0f1a08538 RCX: 0000000000000027
RDX: ffff9fdbef221908 RSI: 0000000000000001 RDI: ffff9fdbef221900
RBP: ffff9fd0f1a083c0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000005e2 R11: 0000000000000000 R12: 00000000ffffff92
R13: 0000000000000010 R14: 0000000000000000 R15: ffff9fd0f1a08900
FS:  0000000000000000(0000) GS:ffff9fdbef200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564ae9372536 CR3: 000000015642a000 CR4: 0000000000f50ef0
PKRU: 55555554
Call Trace:
 <TASK>
 ? ieee80211_reconfig+0xa1/0x1660 [mac80211]
 ? __warn.cold+0x8e/0xe8
 ? ieee80211_reconfig+0xa1/0x1660 [mac80211]
 ? report_bug+0xff/0x140
 ? handle_bug+0x3c/0x80
 ? exc_invalid_op+0x17/0x70
 ? asm_exc_invalid_op+0x1a/0x20
 ? ieee80211_reconfig+0xa1/0x1660 [mac80211]
 ? sched_clock_cpu+0xf/0x1f0
 ? __slab_free+0xdf/0x2e0
 ? wait_for_completion+0x3a/0x160
 wiphy_resume+0x82/0x1b0 [cfg80211]
 ? __pfx_wiphy_resume+0x10/0x10 [cfg80211]
 dpm_run_callback+0x47/0x150
 device_resume+0xb0/0x280
 async_resume+0x1d/0x30
 async_run_entry_fn+0x31/0x130
 process_one_work+0x176/0x330
 worker_thread+0x252/0x390
 ? __pfx_worker_thread+0x10/0x10
 kthread+0xcf/0x100
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0x31/0x50
 ? __pfx_kthread+0x10/0x10
 ret_from_fork_asm+0x1a/0x30
 </TASK>
---[ end trace 0000000000000000 ]---

System info

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i5-1235U
Memory: 46.7 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: LENOVO
Product Name: 21BVCTO1WW
System Version: ThinkPad T16 Gen 1


00:14.3 Network controller: Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01)
	Subsystem: Intel Corporation Device 0090
	Flags: bus master, fast devsel, latency 0, IRQ 16, IOMMU group 9
	Memory at 603d1cc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

Network before sleep

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether e8:80:88:87:81:6b brd ff:ff:ff:ff:ff:ff
3: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether e6:ac:c7:bd:d5:35 brd ff:ff:ff:ff:ff:ff permaddr 58:1c:f8:06:10:8f
    inet 192.168.1.96/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp0s20f3
       valid_lft 85804sec preferred_lft 85804sec
    inet6 fe80::4b6c:d9ab:b018:9056/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Network after sleep

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether e8:80:88:87:81:6b brd ff:ff:ff:ff:ff:ff
3: wlp0s20f3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether e6:ac:c7:bd:d5:35 brd ff:ff:ff:ff:ff:ff permaddr 58:1c:f8:06:10:8f

Since it seems to come back upon reboot, I’m wondering if removing and re-adding the kernel module might be enough to bring the interface back?

sudo modprobe -r iwlmvm iwlwifi && sudo modprobe iwlmvm iwlwifi

It sounds like it’s a possible kernel driver regression/bug in the newer versions of the kernel.

1 Like

Yes it works :+1:

1 Like

Interestingly this solution is persistent - until I reboot again.

Interesting indeed! I kind of wonder if it has to do with the kernel driver interaction with power management in some manner, be it PCIe power management or the controller itself.

I’m not well versed in either of those to know where to dig further.

1 Like

seems to be the same issue as Kernel 6.11.3-200.fc40: network/wifi KO after wakeup from standby - #16 by rahul123

1 Like

I had this issue for the past two and a half weeks, after upgrading to Fedora 40, then to F41, then doing a clean install of F41.

Finally resolved tonight after upgrading to kernel 6.11.7-300.fc41.x86_64.

2 Likes

Confirmed, upgrading to 6.11.7-300.fc41.x86_64 resolves the issue with wifi.

Hi All, first time here and all time newbie, beginner. I’m on Kernel 6.11.10-300.fc41.x86_64 (64-bit) - Fedora 41 KDE-Plasma clean install. For me the bug persists.

The solution / workaround that worked for me is to create a script in:

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

Blockquote

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

and don’t forget to sudo chmod +x

This is not my solution, I found it at the Arch forums:

https://bbs.archlinux.org/viewtopic.php?pid=2212131#p2212131

From what I understand in the script, it unloads the module before going to sleep, then reloads it at wake up.

Strangely, for me - unloading/reloading the module without the script after resume would simply not work.

Blockquote
Dec 03 17:51:04 SwisscomFedora NetworkManager[1848]: [1733244664.4443] device (wlo1): Couldn’t initialize supplicant interface: Timeout was reached
Dec 03 17:51:04 SwisscomFedora NetworkManager[1848]: [1733244664.4444] device (wlo1): supplicant interface keeps failing, giving up

Wifi driver pre sleep:

Blockquote
DeviceName: Intel Wi-Fi 7 BE200 + BT
Subsystem: Intel Corporation BE200 320MHz [Gale Peak]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

Wifi driver after reloading the modules post-resume

Blockquote
DeviceName: Intel Wi-Fi 7 BE200 + BT
Subsystem: Intel Corporation BE200 320MHz [Gale Peak]
Kernel modules: iwlwifi

Notice the driver is gone…