Score:1

Extremely slow wifi on Ubuntu 20.04 after standard solutions, 18.04 is fine

ph flag

I have a clean Ubuntu 20.04 install on a Thinkpad X1 Carbon. I am running the kernel 5.13.0-28-generic. The wifi is extremely slow, making e.g. Zoom impossible, dropped calls, total loss of connectivity. With a speed test I get values of 7 Mbps Download, 5 Mbps Upload (and often much worse) while a different Thinkpad (X390) running Ubuntu 18.04 and sitting next to the X1 gets 52 Mbps Download, 44 Mbps Upload from the same home Wifi and the same speedtest. I even booted the computer with a USB stick under 18.04 (kernel 5.4.0-84-generic) and got 53 Mbps download, 37 Mbps Upload on the same computer!!

I read through similar questions and tried all solutions I could find.

  1. I have disabled the 802.11n protocol adding options iwlwifi 11n_disable=1 to /etc/modprobe.d/iwlwifi.conf -- No effect.

  2. I have disabled power management by editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and changing the value from 3 to 2. I confirm by iwconfig that power management is off. No effect.

  3. I have edited /etc/nsswitch.conf and changed hosts to hosts: files dns -- No effect.

  4. In desperation I have edited etc/gai.conf and uncommented the line Precedence ::ffff:0:0/96 100 -- No Effect.

  5. Also, backport_iwlwifi_dkmsis not installed.

Help would be greatly appreciated. Any ideas?

EDIT: Output of lspci -nnk | grep 0280 -A3

00:14.3 Network controller [0280]: Intel Corporation Device [8086:a0f0] (rev 20)
    Subsystem: Intel Corporation Device [8086:0070]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi
chili555 avatar
cn flag
Please edit your question to show the result of the terminal command: `lspci -nnk | grep 0280 -A3` Welcome to Ask Ubuntu.
C1701 avatar
ph flag
Updated, thanks.
chili555 avatar
cn flag
Have you tried my troubleshooting steps here? https://askubuntu.com/questions/1364239/tp-link-usb-wireless-adapter-keep-losing-data-every-several-minutes-without-disc/1364295#1364295
C1701 avatar
ph flag
Yes, I have, thanks. It's not power management, and it's not the router. 18.04, no problem, in this or other Thinkpad computers. 20.04, massive loss of speed, in this and other Thinkpad computers. I am about to delete 20.04 and "upgrade" to 18.04.
Score:0
it flag

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".

C1701 avatar
ph flag
Thanks. Did that -- minimal or no effect. It was indeed set at 1500, I set it at 1492. No noticeable difference. Meanwhile I booted the computer up with a USB stick 20.04, same problem with low speed. I installed 20.04 in an older Thinkpad, same problem with low speed. But 18.04 has no problem, high speed reached.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.