105

I just upgraded from Ubuntu 18.04 to 20.04 on one of the Dell XPS 13 machines, and the network performance is abhorrent. Internet speed is very fast from a google speed test (>300Mb/s for both upload and download).

However, whenever I try to browse a website or even run sudo apt update the connection will often time out. My internet is very fast on all other devices and I really don't know how to debug this problem.

sudo lshw -class network -short && nmcli device status 

shows

H/W path           Device           Class          Description
==============================================================
/0/100/1c.6/0      wlp2s0           network        Wi-Fi 6 AX200
/3                 br-96f5b790e29e  network        Ethernet interface
/4                 br-15e76fb81c05  network        Ethernet interface
/5                 docker0          network        Ethernet interface

DEVICE           TYPE      STATE         CONNECTION      
wlp2s0           wifi      connected     CSA HQ          
br-15e76fb81c05  bridge    connected     br-15e76fb81c05 
br-96f5b790e29e  bridge    connected     br-96f5b790e29e 
docker0          bridge    connected     docker0         
p2p-dev-wlp2s0   wifi-p2p  disconnected  --              
lo               loopback  unmanaged     --              
gpd0             tun       unmanaged     --             

Solution:

It seems like this is a pretty common problem, and one without a definitive cause. For me, it was because Ubuntu resets the TLP configuration, and the power management went back to "on". I disabled Wi-Fi power management directly by editing:

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Then changed the value from 3 to 2, saved changes and rebooted.

I actually got this solution from Reddit and this worked for my case specifically but it seems like it could be caused by a bunch of other things. Read all the proposed solutions below!

kwsp
  • 2,079
  • 1
    @K7AAY I updated the question – kwsp Apr 24 '20 at 23:02
  • Same issue with the Dell Precision 5540 with the AX200 wifi (Device wlp59s0) after upgrading from Ubuntu 18.04. Using backport-iwlwifi-dkms did not work. Uninstalling backport-iwlwifi-dkms did not work. Also, power consumption was very high (minimum >22W, and often >60W). – Gorka Apr 25 '20 at 12:21
  • 3
    I am on XPS 15 (2019) and it did not solve the problem for me. But thank you anyway sharing your findings. – Erik Kubica May 15 '20 at 13:02
  • So far (XPS 13 / 2020) this seems to have solved it. It might be worth adding as nswer and accepting (the top voted answer doesn't fix it for me) – Andy Smith May 16 '20 at 08:03
  • @ErikKubica I have the same laptop Dell XPS 15 and the same problem. try the most popular solution here – naXa stands with Ukraine Jun 08 '20 at 09:35
  • @naXa Already fixed by upgrading the kernel, – Erik Kubica Jun 08 '20 at 13:05
  • I had the same problem using the 5 GHz channel of my router, switching to the 2.4 GHz channel gave me full-speed wifi. I consider this more of a workaround than a solution. – kodu Jun 24 '20 at 10:58
  • Had a 2.4 Ghz connection. Also had tried every other solution from the answers but the solution in the post itself. Finally the post's original solution fixed the problem for me. On a Inspiron 5567 running Zorin OS 16 (kernel 5.11.0-41-generic) – Shourya Shikhar Dec 18 '21 at 09:58

10 Answers10

90

The top voted answer didn't solve it for me and I got this solution from a different source.

This was because Ubuntu resets the TLP configuration when I upgraded from 18.04 to 20.04, and the power management went back to "on". I disabled wifi power management directly by editing /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf and changed the value from 3 to 2, saved changes and rebooted.

Instead of rebooting, you can also try running

sudo iwconfig INTERFACE_NAME power off 

where INTERFACE_NAME is the name of your wifi interface. You can find that out by running ip a.

Zoltán
  • 776
kwsp
  • 2,079
  • 2
    This is what worked for me on ubuntu 20.04 on a Dell 5540 – choy Jul 16 '20 at 17:22
  • 1
    That seems working for me too. Can you explain what is actually doing? – heracho Aug 24 '20 at 18:32
  • 11
    To test if disabling power management helps in your case without reboot do this: sudo iwconfig INTERFACE_NAME power off – and Oct 22 '20 at 13:57
  • 2
    Thanks. This was helpful for me. Note that sudo reboot can reboot the Ubuntu machine from the command line. https://askubuntu.com/a/397505/48214 (But if disk encryption is enabled, you'll need to go type the password on the machine.) Also, if you're already plugged into wired ethernet and want to disable the wireless radio: nmcli radio wifi off https://askubuntu.com/a/834194/48214 – Ryan Jun 22 '21 at 15:01
  • I don't have that file, but apt upgrade fixed the slowness – Maris B. Jul 27 '21 at 13:26
  • My laptop had turned off due to an empty battery and when I turned it on (plugged in) I was having frequent wifi disconnection issues and the Synergy software client was not working properly either. This fix resolved the issue! thanks so much! – Sapnesh Naik Jun 20 '22 at 04:17
  • Thanks a lot!!! After a lot of struggle solved looking at your solution. – Himanshu Patel Mar 19 '23 at 08:07
26

could be the "backport-iwlwifi-dkms" package

I experienced a better performance without this package, so i suggest to remove it

$ sudo apt remove backport-iwlwifi-dkms

this is a known bug

https://bugs.launchpad.net/ubuntu/+source/backport-iwlwifi-dkms/+bug/1869588

  • 2
    I am having the same performance issue... however, when I try to uninstall the "backport-iwlwifi-dkms" package, I receive a message saing "ackage 'backport-iwlwifi-dkms' is not installed, so not removed" from apt – Rafael Apr 27 '20 at 14:30
  • 2
    You've saved my life. I had installed this package while on kernel 4.x with 18.04 because support for wifi/bluetooth for my board only came on kernel 5.x. As Ubuntu 20.04 uses kernel 5.x the package was conflicting with the new kernel and that was the cause! – DallaRosa May 11 '20 at 14:36
  • 3
    After days of multiple changes and tests on DNS over TLS issues, working with systemd-resolved, stubby, and NetworkManager, this was the real issue. Removing this package fixed my stalling network. It wasn't DNS issues I thought it was due to the repeated failures I saw while debugging. Thank you. – m1st0 May 25 '20 at 02:09
  • the linked bug is a duplicate of bug #1869587. the latest comment says that the fixed package will be release soon (after testing). Anyone affected by this issue is welcome to contribute to manual testing. – naXa stands with Ukraine Jun 08 '20 at 09:14
  • This solution worked for me (Dell XPS 15" 7590). Thank you! – naXa stands with Ukraine Jun 08 '20 at 09:38
  • This worked for me on a Dell XPS 7590 running KDE Neon (still in ubuntu 18.04). The problem started after updating to Linux 5.4. Thanks! – ichramm Jun 10 '20 at 19:32
11

I was having the same problem with slow wireless internet speed and what worked for me was to follow the steps proposed in the following post:

Very slow internet connection on ubuntu 16.04

Basically, I edited the file /etc/gai.conf as super user:

sudo nano /etc/gai.conf

Then I looked for the line with precedence ::ffff:0:0/96 100 and removed the # character that preceded it. I had to reboot my system for it to take effect. It worked like a charm.

The funny thing is that when I was using Ubuntu 20.04 Beta, this problem did not happen. Later, when I installed the LTS version, I started having this problem.

Rafael
  • 655
  • 2
  • 6
  • 12
  • I am on XPS 15 (2019) and it did not solve the problem for me. But thank you anyway sharing your findings. – Erik Kubica May 15 '20 at 13:02
  • Unfortunately there seems to be multiple reasons why network performance can be slow on Ubuntu. I recommend you read this article from 2019 that lists many possible solutions to wireless internet issues on Linux: https://itsfoss.com/speed-up-slow-wifi-connection-ubuntu/ – Rafael May 16 '20 at 15:25
  • the final solution that worked was from the guy who wrote that kernel needs to be updated from 5.4 to anything higher. – Erik Kubica May 17 '20 at 08:29
  • not 100% sure it was from this but its fixed! – TiagoLr Aug 23 '21 at 23:58
  • the solution fix also problem on pop os 21.04 – demon101 Nov 09 '21 at 18:59
  • Hmm didn't seem to help my relatively slow WiFi speed on Dell Precision 5560 with Ubuntu 20.04. – Garrett Feb 10 '22 at 19:20
5

Thanks a lot for all information you provided above.

Here I want to tell you about my situation.

I have an XPS-13-9360 (i7-8550U,16G,1T) and manually installed a killer 1650 (aka. intel ax 200). I was facing the same issue, extremely slow wireless connection.

And it seems that the problem has been solved since I installed a linux-5.6.7-generic kernel. (While the last one was 5.4.0-low-latency, I don't know why I installed low latency version, all that I did was do-release-upgrade from Ubuntu 19.10 with 5.3 kernels).

Here I recommend that you install a generic kernel instead of all one (by uname -sr, you can see what kind of kernel you are using), and upgrade to a newer kernel if possible.

BTW, I didn't sacrifice WiFi 6 and it seems OK with Linux 5.6.7

Bests, Leon

Mir Rahed Uddin
  • 619
  • 1
  • 8
  • 20
  • Are you GOD? Boy you rock! :D installed kernel, updated grub and now my WiFi is working at full sleep instead of dialup. Finally after few hours of trying and googling different solutions. – Erik Kubica May 15 '20 at 13:20
5

Also updated from Ubuntu 18.04 to 20.04 on a Dell XPS 7390, had the same problem, and the accepted solution worked well for a bit (see comments):

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

I would just add for any other newbies like me that Ctrl + o and then Enter saves the changes made, and Ctrl + x then exits nano mode (https://wiki.gentoo.org/wiki/Nano/Basics_Guide). While here, Ctrl + Alt + t is how you open the terminal where you'd enter all these commands.

My current download speed (compared to a Win10 machine on the same desk) is 87 Kbps (vs. 19Mbps), and upload is 6.7 Mbps (vs. 8.5Mbps).

zulu
  • 101
  • Scratch that. It seemed to help a little bit, but then the Tor Browser would hang for minutes, and Firefox tabs to anything non-Google took the same. I reverted the change back to the original "3" and this way at least Tor loads, if still slowly. – zulu May 05 '20 at 19:24
  • I also tried deleting the package as Giovanni Rodríguez said, $ sudo apt remove backport-iwlwifi-dkms, which seemed to make matters worse (luckily I could still wirelessly reinstall it via $ sudo apt install backport-iwlwifi-dkms). I also looked for "Additional Drivers" but didn't have any that Pale Blue Dot had. – zulu May 05 '20 at 19:37
  • Still troubleshooting. Updating the DNS to 8.8.8.8 from 127.0.0.53 (https://securitronlinux.com/debian-testing/fix-very-slow-internet-on-ubuntu-18-easily), following these instructions (https://askubuntu.com/questions/249203/what-does-sudo-echo-nameserver-8-8-8-8-etc-resolv-conf-do) did not make a difference. – zulu May 06 '20 at 15:34
  • Tried reinstalling Ubuntu; couldn't find much information on how to do it via terminal but tried https://www.ostechnix.com/how-to-fix-broken-ubuntu-os-without-reinstalling-it. After restarting it seems a bit faster, or at least not hanging up mid-load on websites. This could be because of the updated DNS from above though.

    It's noticeably faster on sites I've already visited, even with cache clearing. YouTube videos load after just an initial pause, with no breaks afterwards. https://fast.com shows downloads (v. Win10) are 72Kbps (v. 21Mbps) and uploads are 7.4Mbps (v. 7.5Mbps).

    – zulu May 06 '20 at 16:14
  • I am facing the same issue. Removing backport-iwlwifi-dkms worked for a while but then I am having 23bps. It is horrible. – Leo May 07 '20 at 02:13
  • Looks like it may just be something with the Killer wireless card. When I installed 18.04 over Win10 on it the card was missing a driver that needed to be installed via ethernet. Now I'm reading that this wireless card has been problematic in previous versions too: https://reddit.com/r/Dell/comments/apbeot/dell_xps_13_9380_slow_internet_speedlow_volume. My approach is now to wait for maybe some automatic updates to fix things as they roll out. Lesson learned: don't manually upgrade to the newest distro version; wait for your computer to prompt you. Then these bugs should be ironed out. – zulu May 14 '20 at 18:10
  • You forgot to say what to put in that file.... – rustyx Oct 09 '21 at 21:54
  • It's been a while so I can't remember the details but I believe this was changing the value from 3 to 2 in that file, as the accepted solution says above. – zulu Oct 25 '21 at 08:10
3

I had the same problem with an Intel AX200 and Ubuntu 20.04 - extremely slow. Sort of working, but dialup speeds at best.

I updated to the latest Ubuntu mainline kernel build, and now it performs well. This script can make it easy to manage mainline kernel installation and updates.

If you go down this path, consider that it will be up to you to stay on top of security vulnerabilities.

  • 1
    This appears to have worked for me, although it should only really be considered a temporary fix, hopefully I can revert back to a stable kernel soon – Rumbles Apr 25 '20 at 12:00
3

My problem is related to my kernel version. I upgraded with apt (just your usual maintenance) and afterwards my network speeds were incredibly slow.

kernel 5.4 is not supported by killer.

Linux Kernel 5.1 or Linux Kernel 5.3

Use the Intel Wi-Fi 6 AX200 160MHz Firmware while running Linux Kernel 5.1 or 5.3. This will require you to install and use the newer Linux Kernel and copy the Firmware files into your ‘/lib/firmware/‘ folder. You might be able to install a newer Release of your chosen Linux also. For example, Ubuntu 19.10 should work immediately as it installs with Linux Kernel 5.3 and the necessary Firmware.

Newer Linux Kernels like 5.4+ might have bugs and compatibility issues, so if you see issues using them, try downgrading to 5.3

So booting into your older kernel might help. This is a great troubleshooting step and should probably be tried before messing with settings as this doesn't require changing your system.

Tarick Welling
  • 183
  • 1
  • 1
  • 11
3

Deleting the connection, then re-connecting worked for me.

nmcli connection delete <CONNECTION-NAME>
sudo systemctl restart network-manager.service

nmcli supports tab completion. You can list all the available connections by pressing the tab

Then simply re-connect from the UI as you normally would.

Gayan Weerakutti
  • 3,770
  • 26
  • 38
1

Selecting the proprietary wireless driver solved the problem from me.

Steps:

  1. Search and open "Additional Drivers"
  2. Look for the Wireless Network Adapter driver's entry.
  3. Check if the option "Do not use this device" is selected.
  4. If yes, select the driver of your computer's network adapter which mentions "(proprietary)" in the end.

Here's how it looks on my machine (second driver - Broadcom)

enter image description here

0

I've been having nearly the same issue...and across quite a few different linux distributions too. Even with an external USB Wi-Fi adapter on, and my laptop's internal antenna turned off, the signal is basically unusable. I get about 300kbps and a ton of dropped connections. I've tried nearly every online tutorial and terminal command suggestions to fix this, with no luck.

The only solution for me was to download a copy of Windows to do internet browsing. I boot up into Ubuntu for the other stuff. It's not perfect, but Windows doesn't give me any issue whatsoever, even with connection speeds that are good on both my laptop and my USB Wi-Fi. Only real trouble I run into with this solution is updating Ubuntu and being annoyed. Other than that, it works.

bloomp
  • 11