Saturday, February 22, 2025

Crappy Debbie WiFi

Bad luck, I've got unreliable WiFi with the new distro: every now and then a web page will get stuck while loading. When they're not, they're taking age to complete. If I ping, I don't see "network unreachable", but I see the pings struggling, the resovled name changing, sometimes even switching from IPv6 to IPv4. So I went for a monitoring of dmesg -w and I spot events like

[13390.293505] wlp2s0: disconnect from AP e4:bf:xx:xx:xx:50 for new auth to e4:bf:xx:xx:xx:48
[13390.332410] wlp2s0: authenticate with e4:bf:xx:xx:xx:48
[13390.332455] wlp2s0: 80 MHz not supported, disabling VHT
[13390.379300] wlp2s0: send auth to e4:bf:xx:xx:xx:48 (try 1/3)
[13390.382294] wlp2s0: authenticated
[13390.385211] wlp2s0: associate with e4:bf:xx:xx:xx:48 (try 1/3)
[13390.396102] wlp2s0: RX ReassocResp from e4:bf:xx:xx:xx:48 (capab=0x1411 status=0 aid=3)
[13390.400601] wlp2s0: associated
[13390.414136] wlp2s0: Limiting TX power to 20 (20 - 0) dBm as advertised by e4:bf:xx:xx:xx:48
[13411.113702] wlp2s0: disconnect from AP e4:bf:xx:xx:xx:48 for new auth to e4:bf:xx:xx:xx:50
Every 20-30 seconds. They match the struggles of ping.

Now, there are posts about how to handle frequent disconnections, and I wish they weren't so often behind cookie walls, so I could scan through them more easily. The link mentioned would offer little to no help. "Have you tried switching to networkd+resolved instead of NetworkManager ?" ... eh ... I'd rather leave that untouched if I can. See, it's not a whole new system: a decade-old ubuntu was able to use that same WiFi chip reliably.

if I watch iwconfig, I can see Bit Rate ramping up after a disconnect, then reach a certain point (around 100Mb/s) and then we disconnect and are back to a few Mb/s again. Yet, sudo iw dev wlp2s0 set bitrates legacy-2.4 48 36 24 18 12 9 6 does not seem to help ... Of course: ramping up bit rate is not the cause of the issue, it's a consequence of network being disconnected: it has to slowly re-establish connection every 30 seconds.

I'd like to say that I've found a blog post that proposed me to check nm-connection-editor and change "band auto" into "band B/G (2.4GHz). I'd like to say I've got a colleague explaining that pointed out it would have no effect until I manually systemctl restart NetworkManager.service, no matter whether I clicked "save" button on that settings window. Truth is this has been suggested (among many other useless things) by the rubber duck, again.

Now that it's fixed and that I read those dmesg lines again, I spot how there were *2* MAC addresses competing, and my computer would hop from one to another. Likely I could have saved myself trouble by disabling either band on the access point settings, but that may have affected phones of my relatives.

No comments: