0

I recently switched from Windows to Void Linux, and ever since, my internet connection has been extremely unreliable.

Symptoms:

  • In a live environment / after a fresh install of Void Linux, browsing internet is smooth and internet speeds are around 100 Mbps download and upload.
  • After a few hours, browsing internet is inconsistent, and while download speed stays around 100 Mbps (slightly lower (?), and also inconsistent, between 50-300 Mbps), upload speeds take a big hit: between 0 and 50 Mbps (tested on speedtest.net and testmy.net).
  • This happens on all browsers I have tried (Firefox and Chromium).
  • This did not happen when my laptop had Windows.
  • This only happens on my Void Linux laptop, no other device on my home network has this issue.
  • This does not happen on my university's eduroam WiFi.
  • pinging and diging websites while they are taking forever to load get instant and correct replies; doing a CLI speed test indicates (mostly) normal download speeds (see above).
  • Wireshark shows a very large number of TCP retransmissions and dup ACK's with several seconds passing between each one, though I am not 100% sure what is a normal amount. (I am fairly certain this amount is not normal from what little I can gather though.)
  • Internet sometimes randomly drops.
  • All of these symptoms are extremely random and I seem to get new problems all the time.

Things I have tried:

  • Since internet starting dipping around the time I ran a system upgrade, I thought switching to an older kernel version might work, but it does not (tested on version 5.14, 5.15, and 5.16).
  • I have blacklisted my laptop vendor's acer_wmi driver, but it does not seem to affect anything.
  • I have tried setting my MTU to a wide range of values (1000 - 1492) to no avail.
  • I have tried using several public DNS servers (Cloudflare, Google, OpenDNS).
  • I have checked power management for my WiFi card, power management is turned off.

What I think:

  • I don't think it could be a hardware problem since my laptop connects to my university's wifi with no problems and other devices on my home network connect to the router and have good download and upload speeds.
  • I think this might be a driver problem, but I can't find any good resources to troubleshoot WiFi driver problems + this unreliable internet doesn't help when I need to troubleshoot something.

Info:

  • No errors in log files or dmesg.
  • Network card: Intel Corporation Wi-Fi 6 AX200
  • Firewall is turned off.
  • Though I am not the only one using my home network, it is definitely not congested (I am pretty much the only one generating traffic on it).

iwconfig output:

lo        no wireless extensions.

wlp1s0    IEEE 802.11  ESSID:"energifyn-70209695"
          Mode:Managed  Frequency:5.24 GHz  Access Point: 00:0F:94:C5:7E:D8
          Bit Rate=40.5 Mb/s   Tx-Power=22 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=43/70  Signal level=-67 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:12  Invalid misc:7   Missed beacon:0

ip address output:

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
       valid_lft forever preferred_lft forever
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 18:26:49:43:cd:99 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.251/24 brd 192.168.20.255 scope global dynamic noprefixroute wlp1s0
       valid_lft 85264sec preferred_lft 85264sec
    inet6 fe80::3d37:94bc:a28a:60c5/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

ip route output:

default via 192.168.20.254 dev wlp1s0 proto dhcp src 192.168.20.252 metric 3002
192.168.20.0/24 dev wlp1s0 proto dhcp scope link src 192.168.20.252 metric 3002

ip -s -s link show dev wlp1s0 output:

2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 18:26:49:43:cd:99 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped missed  mcast
    2497582    3439     0       0       0       0
    RX errors: length   crc     frame   fifo    overrun
               0        0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    615263     2579     0       0       0       0
    TX errors: aborted  fifo   window heartbeat transns
               0        0       0       0       2

resolv.conf contents:

# Generated by resolvconf
domain fibernetcpe
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 192.168.20.254
8
  • WiFi or wired? What's your MTU? ip link or sudo ifconfig. Have you looked at the logs (in /var/log/) for entries around the time of failure?
    – waltinator
    Feb 10, 2022 at 2:27
  • @waltinator I have added the requested information. I would also add dig and nslookup and friends command output for the misbehaving websites, but the issue is so random that it is very difficult.
    – user513705
    Feb 10, 2022 at 10:31
  • So much more info required. Firewall? Routing? /etc/resolv.vonf contents? Try dig +trace. Counter details from the interface. When slow, do you mean to resolv or do you mean the actual page comes through slowly?
    – Bib
    Feb 10, 2022 at 10:46
  • @Bib I have updated the post. For the dig + tracepath commands, I chose a random destination, but for any destination I try it does the same thing, whether I can load the web page in the browser or not. By "slow", I mean it takes forever to resolv, and once it gets there the web page loads normally.
    – user513705
    Feb 10, 2022 at 12:05
  • Seems like your router is providing DNS. Disable it and run a caching only local setup. It would be nice to know what the DNS setting are on the router. You also need to post dig +trace, not dig and trace. +trace is part of the dig command. And to pick a random host, I alway do search for something weird, then pick a random host from the returned results.
    – Bib
    Feb 10, 2022 at 13:11

2 Answers 2

1

Check your WiFi MTU, using

ip link

or

ip l | grep $(ip r | awk '/default/ {print $5}' ) | awk '{print $2, $4, $5}'

also notice your WiFi interface's name.

The MTU (Maximum Transmission Unit) is the size of the largest packet that can be sent in a single network transmission. If a packet exceeds the MTU of a link, the data must be split into multiple packets (fragmented). These multiple packets must be sent over the link, received, acknowledged, and reassembled at the far end. If your link is misconfigured, and you have to fragment every packet you send, your actual data transfer rate drops.

Ethernet (wired) networks use an MTU of 1500 bytes.

Due to additional per packet overhead for WiFi (8 bytes PPPoE header), WiFi uses an MTU of 1492.

Your MTU should be set by your DHCP server, check your router's config.

You can set your own MTU (setting does not persist over restarts) with

sudo ip link set dev name mtu 1492

where "name" is the interface name from above.

Here's an example:

walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff
walt@squid:~(0)$   sudo ip link set dev wlxf46d04b1790f mtu 1492
[sudo] password for walt: 
walt@squid:~(0)$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp63s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:24:21:7f:e5:1c brd ff:ff:ff:ff:ff:ff
3: wlxf46d04b1790f: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether f4:6d:04:b1:79:0f brd ff:ff:ff:ff:ff:ff

My WiFi "interface name" is "wlxf46d04b1790f".

1
  • My MTU was 1500, setting it to 1492 did unfortunately did not help. :( Thank you for the suggestion!
    – user513705
    Feb 10, 2022 at 18:37
0

Some tips.

Not sure if the high number of TCP retransmissions is related to your wifi connection, but there is a possibility of interference if you say it works fine in a different environment. Check if you are connecting in 2.4 Ghz or 5 Ghz and which channel (frequency). You can perhaps configure your router to choose another channel or let it determine a less crowed, more optimal channel if it's sophisticated enough.

Your router might support both 2.4 Ghz and 5 Ghz, but it remains to be seen if your computer wifi is capable of operating on both frequency ranges. Regardless of the hardware capabilities, the OS and the driver have to support those capabilities.

A driver issue is also possible. Try to identify your hardware, in particular the chipset and check on https://wireless.wiki.kernel.org/ to see if it's supported and what the appropriate driver could be. Try lspci -v to get some information on your onboard devices. Verify your Linux kernel version using for example uname -a.

I also suggest running sudo dmesg -wT in a terminal window and watch out for suspicious messages. You can always update your question with additional information.

3
  • Hello and thank you for the tips! At my university, running iwconfig reveals that I am connected to the 5.5 Ghz channel. On my home network, I am connected to the 5.24 Ghz channel. As for the possiblity of a driver issue, you are probably right. Running lspci -v shows that my WiFi card is an Intel Wi-Fi 6 AX200, however, I am using the iwlwifi driver which, according to the linked website, does not support the AX PHY mode...? I have already checked my dmesg output, there is nothing suspicious in there.
    – user513705
    Feb 17, 2022 at 22:39
  • After further reading on wireless chipsets, I can see that AX = WiFi 6 and that it is backwards compatible with the A/B/G/N/AC standards, therefore it might not be a driver problem after all.
    – user513705
    Feb 17, 2022 at 22:51
  • Hello again! It turns out it is a problem with the 5 Ghz channel. I get a stable internet connection when I configure my network interface to only use the 2.4 Ghz channel, albeit at the cost of some speed. It is strange, though, that I have a stable connection on the 5 Ghz channel at my university. I thought one of my peripherals might cause some interference, but disconnecting all peripherals from my laptop does not help when connected to the 5 Ghz channel on my home network. Thank you for the help!
    – user513705
    Mar 5, 2022 at 10:37

You must log in to answer this question.