I'm new to Ubuntu. I installed it alongside Windows and after trying it for a couple of days I loved it and I was pretty excited to keep using it. Everything runs smoothly except the wifi is way slower than it is on Windows and, sadly, that's a deal breaker. I don't know what to do, I've seen every post, every page, everything there is about this topic and nothing seems to work.
I disabled the powersave changing its value to "2":
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.confI know there is something called iwlwifi that tens to give problems to a lot of user so I've done a lot of things to that as well, disabled it, added code lines...
I tried editing this file as well /etc/gai.conf and didn't work either
I tried looking for new drivers and the problem remained.
And even more things I don't even remember now, what do I do? Nothing changes, reinstalling Ubuntu may work?
I'm using a laptop, Lenovo Ideapad S340-14API
I'm sad because I really wanted to keep using Ubuntu :_(, please help.
1 Answer
Check your WiFi MTU, using
ip linkalso 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
ip link set dev name mtu 1492where "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:ffMy WiFi "interface name" is "wlxf46d04b1790f".