WiFi debugging/configuration

Before I switched to nixOS, I used Arch, I had a lot of trouble on it with my WiFi, it regularly dropped connection with the laptops builtin WiFi card and I could not get it up again without rebooting the system.

Therefore I plugged in an USB WiFi that I had lying around. That worked well and without any problems with Arch.

Today in nixOS none of the devices has dropped the connection as the builtin did in Arch, though connection is slow most of the time.

The NICs connect to the AP with 50 or 100 MBit/s respectively corresponding with their nominal speeds.

Though real transfer is a lot less than that. most of the time, even when downloading large files, actual transfer is a sawtooth from 150 to 250 KiB/s (per KSysMon).

Every once in a while transfer will linearly increase until ~9MiB/s is reached (takes about 10 to 15 seconds), keep that speed for another 20 to 30 seconds and then instadrop back to the old saw tooth. Staying there for 30 seconds or many hours…

Uploads seem to be always at ~7MiB/s, which corresponds to my my ISPs connection cap.

USB NIC: Bus 003 Device 006: ID 07d1:3c0a D-Link System DWA-140 RangeBooster N Adapter(rev.B2) [Ralink RT3072]
builtin: 04:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)

Can someone of you provide some tips how to get steady speeds?

I was able to temporary organize a 20m ethernet cable, using that, speeds are very close to what my ISP delivers nominally.

I do remember, that I had to install a linux-firmware package in Arch Linux to get access to WiFi at all, but even though I can not find any explicit mention of it or similar, in the nixpkgs… Also I can not find other suggested projects in nixpkgs.

This problem occured on 19.09 channel and still does on 20.03. Though it seems full speed periods are longer now and more frequent, still the system can stuck in a “low speed phase” for many minutes.

Its usually fine for surfing the web, though really annyoing in usage of the system, as I use nix run for “one off” installations quite heavily…

I don’t have any experience with your problems but if you are worried about firmware have you tried this option?

  hardware.enableRedistributableFirmware = true;

It looks like it includes these currently:

        firmwareLinuxNonfree
        intel2200BGFirmware
        rtl8192su-firmware
        rt5677-firmware
        rtl8723bs-firmware
        rtlwifi_new-firmware
        zd1211fw
        alsa-firmware
        openelec-dvb-firmware
        rtl8723bs-firmware

Thanks, have activated that one, I will keep my eyes open.

1 Like

10 minutes later speeds are back to “normal”, seem to be unrelated :frowning:

I changed the network settings to enforce 2.4 GHz instead of picking “randomly”. WiFi went away for a couple of seconds, the external WiFi even handshaked with 300/100 now with my AP.

I see rates of 250/50 consistently when browsing the web.

So it seems as if there is some problem with 5GHz, either in the drivers or in something else used by the stack…

Just as a heads up…

Even with forced 2.4 GHz connection the problem came back after a couple of hours. I just lived with the problem, waiting for a possibility that a cable arrives that I can properly correctly put from laptop to router in a way that the kids won’t play around with it…

With that cable the problem also occured, so when I tested with my neighbors cable I was just lucky it seems…

By accident I realised that all devices in my home network have been affected (the other participants aren’t even using a fraction of the available bandwith)

Calling my ISP, they affirmed that measuring the line is fine and also a technician came to measure the line the other way round. He did check my router and found that it is affected by a known bug that randomly rate limits devices.

Additionally the device was unable to update itself as it was provisioned with a wrong update server.

The technician manually did a software update and since then it seems to be stable. I haven’t had any drops in the last 5 hours (I couldn’t explain otherwise).