WiFi connection issues

When I boot my laptop, connecting to wifi fails with “authentication timeout” in dmesg. It successfully connects after the laptop has been booted for a minute or so.

  • OS: Gentoo (Linux)
  • Kernel: 6.6.21-gentoo-x86_64
  • WiFi Manager: iwd
  • Router: UniFi Dream Router
  • Network name: Shadowfax (no spaces, special characters, etc)
  • Security: WPA3-Personal
  • Rx/Tx mode: 802.11ax

dmesg:

[   14.670700] wlan0: authenticate with d8:b3:70:7b:e7:5a
[   15.188036] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[   15.193189] wlan0: d8:b3:70:7b:e7:5a denied authentication (status 77)
[   15.263083] wlan0: authenticate with d8:b3:70:7b:e7:5a
[   15.289455] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[   15.310085] wlan0: authenticate with d8:b3:70:7b:e7:5a
[   15.317775] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[   15.321158] wlan0: authenticated
[   15.324379] wlan0: associate with d8:b3:70:7b:e7:5a (try 1/3)
[   15.335539] wlan0: RX AssocResp from d8:b3:70:7b:e7:5a (capab=0x1111 status=0 aid=16)
[   15.369821] wlan0: associated
[   15.590070] wlan0: Limiting TX power to 36 (36 - 0) dBm as advertised by d8:b3:70:7b:e7:5a
[ 1189.526223] wlan0: deauthenticating from d8:b3:70:7b:e7:5a by local choice (Reason: 3=DEAUTH_LEAVING)
[ 5720.152375] wlan0: authenticate with d8:b3:70:7b:e7:59
[ 5720.342097] wlan0: send auth to d8:b3:70:7b:e7:59 (try 1/3)
[ 5722.365739] wlan0: send auth to d8:b3:70:7b:e7:59 (try 2/3)
[ 5722.369429] wlan0: d8:b3:70:7b:e7:59 denied authentication (status 77)
[ 5722.442493] wlan0: authenticate with d8:b3:70:7b:e7:59
[ 5722.468138] wlan0: send auth to d8:b3:70:7b:e7:59 (try 1/3)
[ 5722.489308] wlan0: authenticate with d8:b3:70:7b:e7:59
[ 5722.496993] wlan0: send auth to d8:b3:70:7b:e7:59 (try 1/3)
[ 5722.502116] wlan0: authenticated
[ 5722.505365] wlan0: associate with d8:b3:70:7b:e7:59 (try 1/3)
[ 5722.516368] wlan0: deauthenticated from d8:b3:70:7b:e7:59 while associating (Reason: 2=PREV_AUTH_NOT_VALID)
[ 5804.603019] wlan0: authenticate with d8:b3:70:7b:e7:5a
[ 5804.640314] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[ 5804.645927] wlan0: d8:b3:70:7b:e7:5a denied authentication (status 77)
[ 5804.727352] wlan0: authenticate with d8:b3:70:7b:e7:5a
[ 5804.752743] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[ 5804.767891] wlan0: authenticate with d8:b3:70:7b:e7:5a
[ 5804.776640] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[ 5804.780062] wlan0: authenticated
[ 5804.786475] wlan0: associate with d8:b3:70:7b:e7:5a (try 1/3)
[ 5804.794136] wlan0: RX AssocResp from d8:b3:70:7b:e7:5a (capab=0x1111 status=0 aid=18)
[ 5804.825354] wlan0: associated
[ 5804.825446] wlan0: Limiting TX power to 36 (36 - 0) dBm as advertised by d8:b3:70:7b:e7:5a
[ 7940.209036] wlan0: deauthenticating from d8:b3:70:7b:e7:5a by local choice (Reason: 3=DEAUTH_LEAVING)
[17576.589028] wlan0: authenticate with d8:b3:70:7b:e7:59
[17576.633320] wlan0: send auth to d8:b3:70:7b:e7:59 (try 1/3)
[17578.638851] wlan0: send auth to d8:b3:70:7b:e7:59 (try 2/3)
[17580.672033] wlan0: send auth to d8:b3:70:7b:e7:59 (try 3/3)
[17582.695321] wlan0: authentication with d8:b3:70:7b:e7:59 timed out
[17583.055018] wlan0: authenticate with d8:b3:70:7b:e7:59
[17583.097419] wlan0: send auth to d8:b3:70:7b:e7:59 (try 1/3)
[17585.122165] wlan0: send auth to d8:b3:70:7b:e7:59 (try 2/3)
[17587.151644] wlan0: send auth to d8:b3:70:7b:e7:59 (try 3/3)
[17589.175122] wlan0: authentication with d8:b3:70:7b:e7:59 timed out
[17723.658510] wlan0: authenticate with d8:b3:70:7b:e7:5a
[17723.694856] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[17723.700836] wlan0: d8:b3:70:7b:e7:5a denied authentication (status 77)
[17723.765158] wlan0: authenticate with d8:b3:70:7b:e7:5a
[17723.791515] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[17723.830037] wlan0: authenticate with d8:b3:70:7b:e7:5a
[17723.837630] wlan0: send auth to d8:b3:70:7b:e7:5a (try 1/3)
[17723.844279] wlan0: authenticated
[17723.847431] wlan0: associate with d8:b3:70:7b:e7:5a (try 1/3)
[17723.858735] wlan0: RX AssocResp from d8:b3:70:7b:e7:5a (capab=0x1111 status=0 aid=18)
[17723.891375] wlan0: associated
[17723.958236] wlan0: Limiting TX power to 36 (36 - 0) dBm as advertised by d8:b3:70:7b:e7:5a

I don’t have the authentication timeout, but what I have is the wifi constantly disconnecting and reconnecting to my AP. It doesn’t seem to affect network reliability, just performance, where the network latency will spike for a few seconds as it’s doing a network scan and migrating from/to the same AP.
It will do this every ~5 minutes.

OS: Fedora 40 (but I don’t think it matters much as I’ve witnessed this behaviour on other OS’es)

I have this exact issue as well. It is pretty guaranteed to happen on resume from a longer suspend (>3 hrs), rebooting once is my current workaround. My connection is rock solid outside of this.

The router doesn’t seem matter, every AP at my school, my portable router, and network at home all exhibit this issue.

Kernel 6.8.9 on NixOS 24.05 (flake - c5824ee)
I’m using NetworkManager. The issue has persisted throughout a few kernel patch versions, although was not there when I first set up this machine.

I’m guessing these dumps might be related. @firelizzard have you seen this?

May 08 10:42:24 NOlaptop kernel: Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.
May 08 10:42:24 NOlaptop kernel: WARNING: CPU: 3 PID: 22923 at net/mac80211/util.c:2593 ieee80211_reconfig+0xa1/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel: Modules linked in: xt_MASQUERADE xt_mark nft_chain_nat nf_nat ccm qrtr rfcomm snd_seq_dummy snd_hrtimer snd_seq cmac algif_hash algif_skcipher af_alg af_packet bnep msr typec_displayport nls_iso8859_1 n>
May 08 10:42:24 NOlaptop kernel:  snd_hda_intel snd_acp_legacy_common nf_defrag_ipv4 cros_ec_sysfs snd_intel_dspcfg edac_mce_amd cfg80211 snd_intel_sdw_acpi intel_rapl_msr snd_pci_acp6x snd_hda_codec ip6t_rpfilter snd_pci_acp5x edac_co>
May 08 10:42:24 NOlaptop kernel:  kvm irqbypass fuse efi_pstore configfs nfnetlink zstd zram efivarfs tpm rng_core dmi_sysfs ip_tables x_tables autofs4 nvme xhci_pci xhci_pci_renesas thunderbolt nvme_core xhci_hcd nvme_auth t10_pi crc6>
May 08 10:42:24 NOlaptop kernel: CPU: 3 PID: 22923 Comm: kworker/u32:80 Tainted: G        W  O       6.8.9 #1-NixOS
May 08 10:42:24 NOlaptop kernel: mt7921e 0000:04:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0012 address=0xff115280 flags=0x0000]
May 08 10:42:24 NOlaptop kernel: Hardware name: Framework Laptop 16 (AMD Ryzen 7040 Series)/FRANMZCP07, BIOS 03.03 03/27/2024
May 08 10:42:24 NOlaptop kernel: Workqueue: events_unbound async_run_entry_fn
May 08 10:42:24 NOlaptop kernel: RIP: 0010:ieee80211_reconfig+0xa1/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel: Code: 00 41 c6 86 85 05 00 00 00 4c 89 f7 e8 a8 81 fb ff 41 89 c4 85 c0 0f 84 15 03 00 00 90 48 c7 c7 28 88 71 c2 e8 f0 90 28 e4 90 <0f> 0b 90 90 eb 31 84 c0 0f 85 a1 01 00 00 c6 87 85 05 00 00 00 e8
May 08 10:42:24 NOlaptop kernel: RSP: 0018:ffff8e9d244b3cd8 EFLAGS: 00010282
May 08 10:42:24 NOlaptop kernel: RAX: 0000000000000000 RBX: ffff8970fae10538 RCX: 0000000000000027
May 08 10:42:24 NOlaptop kernel: RDX: ffff89781e3a1848 RSI: 0000000000000001 RDI: ffff89781e3a1840
May 08 10:42:24 NOlaptop kernel: RBP: ffff8970fae103c0 R08: 0000000000000000 R09: ffff8e9d244b3ac0
May 08 10:42:24 NOlaptop kernel: R10: ffff8e9d244b3ab8 R11: 0000000000000003 R12: 00000000ffffff92
May 08 10:42:24 NOlaptop kernel: R13: 0000000000000000 R14: ffff8970fae10900 R15: ffff8970f076c688
May 08 10:42:24 NOlaptop kernel: FS:  0000000000000000(0000) GS:ffff89781e380000(0000) knlGS:0000000000000000
May 08 10:42:24 NOlaptop kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 08 10:42:24 NOlaptop kernel: CR2: 0000000000000000 CR3: 00000004ff220000 CR4: 0000000000f50ef0
May 08 10:42:24 NOlaptop kernel: PKRU: 55555554
May 08 10:42:24 NOlaptop kernel: Call Trace:
May 08 10:42:24 NOlaptop kernel:  <TASK>
May 08 10:42:24 NOlaptop kernel:  ? ieee80211_reconfig+0xa1/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? __warn+0x81/0x130
May 08 10:42:24 NOlaptop kernel:  ? ieee80211_reconfig+0xa1/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? report_bug+0x171/0x1a0
May 08 10:42:24 NOlaptop kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
May 08 10:42:24 NOlaptop kernel:  ? handle_bug+0x3d/0x80
May 08 10:42:24 NOlaptop kernel:  ? exc_invalid_op+0x17/0x70
May 08 10:42:24 NOlaptop kernel:  ? asm_exc_invalid_op+0x1a/0x20
May 08 10:42:24 NOlaptop kernel:  ? ieee80211_reconfig+0xa1/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? ieee80211_reconfig+0xa0/0x1510 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
May 08 10:42:24 NOlaptop kernel:  ? schedule+0x32/0xd0
May 08 10:42:24 NOlaptop kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
May 08 10:42:24 NOlaptop kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
May 08 10:42:24 NOlaptop kernel:  ? schedule_timeout+0x151/0x160
May 08 10:42:24 NOlaptop kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
May 08 10:42:24 NOlaptop kernel:  ? wait_for_completion+0x95/0x160
May 08 10:42:24 NOlaptop kernel:  wiphy_resume+0x82/0x1b0 [cfg80211]
May 08 10:42:24 NOlaptop kernel:  ? __pfx_wiphy_resume+0x10/0x10 [cfg80211]
May 08 10:42:24 NOlaptop kernel:  dpm_run_callback+0x89/0x1b0
May 08 10:42:24 NOlaptop kernel:  device_resume+0xb0/0x2d0
May 08 10:42:24 NOlaptop kernel:  async_resume+0x1d/0x30
May 08 10:42:24 NOlaptop kernel:  async_run_entry_fn+0x31/0x130
May 08 10:42:24 NOlaptop kernel:  process_one_work+0x173/0x340
May 08 10:42:24 NOlaptop kernel:  worker_thread+0x27b/0x3a0
May 08 10:42:24 NOlaptop kernel:  ? __pfx_worker_thread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  kthread+0xd4/0x100
May 08 10:42:24 NOlaptop kernel:  ? __pfx_kthread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  ret_from_fork+0x31/0x50
May 08 10:42:24 NOlaptop kernel:  ? __pfx_kthread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  ret_from_fork_asm+0x1b/0x30
May 08 10:42:24 NOlaptop kernel:  </TASK>
May 08 10:42:24 NOlaptop kernel: ---[ end trace 0000000000000000 ]---

May 08 10:42:24 NOlaptop kernel: WARNING: CPU: 3 PID: 22923 at net/mac80211/driver-ops.c:41 drv_stop+0xf6/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel: Modules linked in: xt_MASQUERADE xt_mark nft_chain_nat nf_nat ccm qrtr rfcomm snd_seq_dummy snd_hrtimer snd_seq cmac algif_hash algif_skcipher af_alg af_packet bnep msr typec_displayport nls_iso8859_1>
May 08 10:42:24 NOlaptop kernel:  snd_hda_intel snd_acp_legacy_common nf_defrag_ipv4 cros_ec_sysfs snd_intel_dspcfg edac_mce_amd cfg80211 snd_intel_sdw_acpi intel_rapl_msr snd_pci_acp6x snd_hda_codec ip6t_rpfilter snd_pci_acp5x edac_>
May 08 10:42:24 NOlaptop kernel:  kvm irqbypass fuse efi_pstore configfs nfnetlink zstd zram efivarfs tpm rng_core dmi_sysfs ip_tables x_tables autofs4 nvme xhci_pci xhci_pci_renesas thunderbolt nvme_core xhci_hcd nvme_auth t10_pi cr>
May 08 10:42:24 NOlaptop kernel: CPU: 3 PID: 22923 Comm: kworker/u32:80 Tainted: G        W  O       6.8.9 #1-NixOS
May 08 10:42:24 NOlaptop kernel: Hardware name: Framework Laptop 16 (AMD Ryzen 7040 Series)/FRANMZCP07, BIOS 03.03 03/27/2024
May 08 10:42:24 NOlaptop kernel: Workqueue: events_unbound async_run_entry_fn
May 08 10:42:24 NOlaptop kernel: RIP: 0010:drv_stop+0xf6/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel: Code: 00 48 85 c0 74 0c 48 8b 78 08 48 89 de e8 82 0e 05 00 65 ff 0d 23 f6 a4 3d 0f 85 39 ff ff ff 0f 1f 44 00 00 e9 2f ff ff ff 90 <0f> 0b 90 5b e9 0c 09 12 e5 90 90 90 90 90 90 90 90 90 90 90 90 90
May 08 10:42:24 NOlaptop kernel: RSP: 0018:ffff8e9d244b3c28 EFLAGS: 00010246
May 08 10:42:24 NOlaptop kernel: RAX: 0000000000000000 RBX: ffff8970fae10900 RCX: ffff8970e4994268
May 08 10:42:24 NOlaptop kernel: RDX: 0000000080000000 RSI: 0000000000000282 RDI: ffff8970fae10900
May 08 10:42:24 NOlaptop kernel: RBP: ffff8970fae10900 R08: 0000000000000000 R09: 0000000000000000
May 08 10:42:24 NOlaptop kernel: R10: 0000000000000001 R11: 0000000000000100 R12: ffff8970fae111d0
May 08 10:42:24 NOlaptop kernel: R13: ffff8970fae10e10 R14: 0000000000000000 R15: ffff897112cddc18
May 08 10:42:24 NOlaptop kernel: FS:  0000000000000000(0000) GS:ffff89781e380000(0000) knlGS:0000000000000000
May 08 10:42:24 NOlaptop kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 08 10:42:24 NOlaptop kernel: CR2: 0000000000000000 CR3: 00000004ff220000 CR4: 0000000000f50ef0
May 08 10:42:24 NOlaptop kernel: PKRU: 55555554
May 08 10:42:24 NOlaptop kernel: Call Trace:
May 08 10:42:24 NOlaptop kernel:  <TASK>
May 08 10:42:24 NOlaptop kernel:  ? drv_stop+0xf6/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? __warn+0x81/0x130
May 08 10:42:24 NOlaptop kernel:  ? drv_stop+0xf6/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? report_bug+0x171/0x1a0
May 08 10:42:24 NOlaptop kernel:  ? handle_bug+0x3d/0x80
May 08 10:42:24 NOlaptop kernel:  ? exc_invalid_op+0x17/0x70
May 08 10:42:24 NOlaptop kernel:  ? asm_exc_invalid_op+0x1a/0x20
May 08 10:42:24 NOlaptop kernel:  ? drv_stop+0xf6/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ? drv_stop+0x12/0x100 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ieee80211_do_stop+0x56c/0x810 [mac80211]
May 08 10:42:24 NOlaptop kernel:  ieee80211_stop+0x58/0x180 [mac80211]
May 08 10:42:24 NOlaptop kernel:  __dev_close_many+0xa7/0x130
May 08 10:42:24 NOlaptop kernel:  dev_close_many+0xa9/0x180
May 08 10:42:24 NOlaptop kernel:  dev_close+0x8c/0xc0
May 08 10:42:24 NOlaptop kernel:  cfg80211_shutdown_all_interfaces+0x4d/0xf0 [cfg80211]
May 08 10:42:24 NOlaptop kernel:  wiphy_resume+0xc1/0x1b0 [cfg80211]
May 08 10:42:24 NOlaptop kernel:  ? __pfx_wiphy_resume+0x10/0x10 [cfg80211]
May 08 10:42:24 NOlaptop kernel:  dpm_run_callback+0x89/0x1b0
May 08 10:42:24 NOlaptop kernel:  device_resume+0xb0/0x2d0
May 08 10:42:24 NOlaptop kernel:  async_resume+0x1d/0x30
May 08 10:42:24 NOlaptop kernel:  async_run_entry_fn+0x31/0x130
May 08 10:42:24 NOlaptop kernel:  process_one_work+0x173/0x340
May 08 10:42:24 NOlaptop kernel:  worker_thread+0x27b/0x3a0
May 08 10:42:24 NOlaptop kernel:  ? __pfx_worker_thread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  kthread+0xd4/0x100
May 08 10:42:24 NOlaptop kernel:  ? __pfx_kthread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  ret_from_fork+0x31/0x50
May 08 10:42:24 NOlaptop kernel:  ? __pfx_kthread+0x10/0x10
May 08 10:42:24 NOlaptop kernel:  ret_from_fork_asm+0x1b/0x30
May 08 10:42:24 NOlaptop kernel:  </TASK>

Does unloading and reloading the module work? If so, it would save you a reboot.

e.g.

sudo modprobe -r mt7921e
sudo modprobe mt7921e
2 Likes

this worked! tyty

1 Like