Wifi stops working requiring a reboot

Hi everyone,

I’m running NixOS 24.11.20240701.00d80d1 (Vicuna) on my Framework Laptop 13 with an AMD Ryzen 7840H and keep having an issue were the Wifi suddenly stops working. I have tried to restart network.target, network-setup.service and wpa_supplicant.service, but nothing seems to have any effect. I have also been having this problem for a long time and have updated my Nix installation multiple times. I’m currently running Linux wks-jb03-nix 6.9.7 #1-NixOS SMP PREEMPT_DYNAMIC Thu Jun 27 11:52:32 UTC 2024 x86_64 GNU/Linux

Here are the some hopefully relevant logs.

$ journalctl -o short-iso -k
2024-07-12T10:37:16+02:00 wks-jb03-nix kernel: wlp1s0: disconnect from AP 40:ed:00:0d:91:bd for new auth to 1c:61:b4:87:01:49
2024-07-12T10:37:16+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T10:37:16+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T10:37:17+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 2/3)
2024-07-12T10:37:17+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 3/3)
2024-07-12T10:37:17+02:00 wks-jb04-nix kernel: wlp1s0: authenticated
2024-07-12T10:37:17+02:00 wks-jb03-nix kernel: wlp1s0: associate with 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T10:37:17+02:00 wks-jb03-nix kernel: wlp1s0: RX ReassocResp from 1c:61:b4:87:01:49 (capab=0x931 status=0 aid=40)
2024-07-12T10:37:17+02:00 wks-jb03-nix kernel: wlp1s0: associated
2024-07-12T10:56:00+02:00 wks-jb03-nix kernel: NET: Registered PF_QIPCRTR protocol family
2024-07-12T11:13:33+02:00 wks-jb03-nix kernel: wlp1s0: disconnect from AP 1c:61:b4:87:01:49 for new auth to 40:ed:00:0d:91:bd
2024-07-12T11:13:33+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 40:ed:00:0d:91:bd (local address=14:ac:60:29:7e:23)
2024-07-12T11:13:33+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T11:13:33+02:00 wks-jb03-nix kernel: wlp1s0: authenticated
2024-07-12T11:13:34+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T11:13:34+02:00 wks-jb03-nix kernel: wlp1s0: RX ReassocResp from 40:ed:00:0d:91:bd (capab=0x511 status=0 aid=2)
2024-07-12T11:13:34+02:00 wks-jb03-nix kernel: wlp1s0: associated
2024-07-12T11:13:34+02:00 wks-jb03-nix kernel: wlp1s0: Limiting TX power to 20 (23 - 3) dBm as advertised by 40:ed:00:0d:91:bd
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: disconnect from AP 40:ed:00:0d:91:bd for new auth to 1c:61:b4:87:01:49
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 2/3)
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 3/3)
2024-07-12T11:23:56+02:00 wks-jb03-nix kernel: wlp1s0: authentication with 1c:61:b4:87:01:49 timed out
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 40:ed:00:0d:91:bd (local address=14:ac:60:29:7e:23)
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: authenticated
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: RX AssocResp from 40:ed:00:0d:91:bd (capab=0x511 status=30 aid=0)
2024-07-12T11:23:57+02:00 wks-jb03-nix kernel: wlp1s0: 40:ed:00:0d:91:bd rejected association temporarily; comeback duration 1000 TU (1024 ms)
2024-07-12T11:23:58+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 2/3)
2024-07-12T11:23:59+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 3/3)
2024-07-12T11:24:00+02:00 wks-jb03-nix kernel: wlp1s0: association with 40:ed:00:0d:91:bd timed out
2024-07-12T11:24:01+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 40:ed:00:0d:91:bc (local address=14:ac:60:29:7e:23)
2024-07-12T11:24:01+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bc (try 1/3)
2024-07-12T11:24:03+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bc (try 2/3)
2024-07-12T11:24:05+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bc (try 3/3)
2024-07-12T11:24:06+02:00 wks-jb03-nix kernel: wlp1s0: aborting authentication with 40:ed:00:0d:91:bc by local choice (Reason: 3=DEAUTH_LEAVING)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: authenticated
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: associate with 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: RX AssocResp from 1c:61:b4:87:01:49 (capab=0x931 status=0 aid=40)
2024-07-12T11:24:08+02:00 wks-jb03-nix kernel: wlp1s0: associated
2024-07-12T11:36:18+02:00 wks-jb03-nix kernel: i2c_hid_acpi i2c-FRMW0005:00: i2c_hid_get_input: incomplete report (7/65535)
2024-07-12T14:43:22+02:00 wks-jb03-nix kernel: wlp1s0: disconnect from AP 1c:61:b4:87:01:49 for new auth to 40:ed:00:0d:91:bd
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 40:ed:00:0d:91:bd (local address=14:ac:60:29:7e:23)
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: authenticated
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: RX ReassocResp from 40:ed:00:0d:91:bd (capab=0x511 status=0 aid=2)
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: associated
2024-07-12T14:43:23+02:00 wks-jb03-nix kernel: wlp1s0: Limiting TX power to 20 (23 - 3) dBm as advertised by 40:ed:00:0d:91:bd
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: disconnect from AP 40:ed:00:0d:91:bd for new auth to 1c:61:b4:87:01:49
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 2/3)
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 3/3)
2024-07-12T14:48:34+02:00 wks-jb03-nix kernel: wlp1s0: authentication with 1c:61:b4:87:01:49 timed out
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 40:ed:00:0d:91:bd (local address=14:ac:60:29:7e:23)
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: authenticated
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 1/3)
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: RX AssocResp from 40:ed:00:0d:91:bd (capab=0x511 status=30 aid=0)
2024-07-12T14:48:35+02:00 wks-jb03-nix kernel: wlp1s0: 40:ed:00:0d:91:bd rejected association temporarily; comeback duration 1000 TU (1024 ms)
2024-07-12T14:48:36+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 2/3)
2024-07-12T14:48:37+02:00 wks-jb03-nix kernel: wlp1s0: associate with 40:ed:00:0d:91:bd (try 3/3)
2024-07-12T14:48:38+02:00 wks-jb03-nix kernel: wlp1s0: association with 40:ed:00:0d:91:bd timed out
2024-07-12T14:48:39+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:48 (local address=14:ac:60:29:7e:23)
2024-07-12T14:48:39+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:48 (try 1/3)
2024-07-12T14:48:42+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:48 (try 2/3)
2024-07-12T14:48:44+02:00 wks-jb03-nix kernel: wlp1s0: aborting authentication with 1c:61:b4:87:01:48 by local choice (Reason: 3=DEAUTH_LEAVING)
2024-07-12T14:49:00+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:49 (local address=14:ac:60:29:7e:23)
2024-07-12T14:49:01+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 1/3)
2024-07-12T14:49:02+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 2/3)
2024-07-12T14:49:03+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:49 (try 3/3)
2024-07-12T14:49:03+02:00 wks-jb03-nix kernel: wlp1s0: authentication with 1c:61:b4:87:01:49 timed out
2024-07-12T14:49:21+02:00 wks-jb03-nix kernel: wlp1s0: authenticate with 1c:61:b4:87:01:48 (local address=14:ac:60:29:7e:23)
2024-07-12T14:49:22+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:48 (try 1/3)
2024-07-12T14:49:25+02:00 wks-jb03-nix kernel: wlp1s0: send auth to 1c:61:b4:87:01:48 (try 2/3)
2024-07-12T14:49:25+02:00 wks-jb03-nix kernel: wlp1s0: aborting authentication with 1c:61:b4:87:01:48 by local choice (Reason: 3=DEAUTH_LEAVING)
$ systemctl status wpa_supplicant
● wpa_supplicant.service - WPA supplicant
     Loaded: loaded (/etc/systemd/system/wpa_supplicant.service; linked; preset: enabled)
     Active: active (running) since Fri 2024-07-12 10:06:06 CEST; 5h 17min ago
   Main PID: 1698 (wpa_supplicant)
         IP: 0B in, 0B out
         IO: 8.1M read, 0B written
      Tasks: 1 (limit: 37625)
     Memory: 5.8M (peak: 6.5M)
        CPU: 432ms
     CGroup: /system.slice/wpa_supplicant.service
             └─1698 /nix/store/pzdwj7j12i44x14q2i6hl6kr6brb8q5c-wpa_supplicant-2.10/sbin/wpa_supplicant -u

Jul 12 14:49:52 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Failed to initiate AP scan
Jul 12 14:49:52 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all
Jul 12 14:49:52 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Reject scan trigger since one is already pending
Jul 12 14:50:18 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all
Jul 12 14:50:18 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Reject scan trigger since one is already pending
Jul 12 14:50:19 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Reject scan trigger since one is already pending
Jul 12 14:50:19 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Failed to initiate AP scan
Jul 12 14:50:44 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: CTRL-EVENT-DSCP-POLICY clear_all
Jul 12 14:50:44 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Reject scan trigger since one is already pending
ul 12 14:50:45 wks-jb03-nix wpa_supplicant[1698]: wlp1s0: Reject scan trigger since one is already pending

I’d be thankful for any hints how to troubleshoot the issue.

Given that it’s a recent processor, are you running the latest version of the kernel? I would recommend using NixOS unstable with testing kernel.

Thanks for the hint, I was already using the latest kernel and didn’t know about testing. I just switched to it, which gives me the following. We’ll see if that changes anything.

Linux wks-jb03-nix 6.10.0-rc6 #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980 x86_64 GNU/Linux

Which wi-fi module are you using? I am using 7840U with

❯ lspci  | rg net
01:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
❯ uname -a                        
Linux 6.9.7 #1-NixOS SMP PREEMPT_DYNAMIC Thu Jun 27 11:52:32 UTC 2024 x86_64 GNU/Linux

Wifi disconnected every time a channel switched and kernel logs had “wifi-lan: driver doesn’t support chan-switch with channel contexts”. I ultimately disabled the channel switching on the AP.