13

I have a laptop with dual boot elementaryOS Loki and Windows 10. Until recently everything was fine, but now suddenly the wifi in elementaryOS is extremely slow (~0.5Mbit download, most speed tests don't even start the upload test). With Ethernet, I get the normal 80 MBit download. I also tried it with Windows where it's still 25 MBit via Wifi.

Edit:

lspci -knn | grep Net -A2
01:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6235 [8086:088e] (rev 24)
    Subsystem: Intel Corporation Centrino Advanced-N 6235 AGN [8086:4060]
    Kernel driver in use: iwlwifi

 uname -a
Linux tobias-530U3BI-530U4BI-530U4BH 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
ghost in a jar
  • 141
  • 1
  • 1
  • 8
  • Welcome to U&L , what is the output of `lspci -knn | grep Net -A2` and `uname -a`? you can [edit here](https://unix.stackexchange.com/posts/404287/edit) – GAD3R Nov 13 '17 at 17:19
  • added the info to the post – ghost in a jar Nov 13 '17 at 18:08
  • the iwlwifi module may be disabling wireless N, as described at: https://askubuntu.com/questions/119578/how-to-fix-slow-wireless-on-machines-with-intel-wireless-cards – Tim Kennedy Nov 13 '17 at 18:11
  • I did that, its a little better now at around 6 mbit but signal strength is alot worse even if i'm sitting 2m from the AP EDIT: I tried `11n_disable=8` and now it's back to 40MBit, the wifi card can't do much more than that. Thank you! – ghost in a jar Nov 13 '17 at 18:29

5 Answers5

13

To ameliorate the connection through the intel wifi card you can:

  • Disable 802.11n
  • Enable software encryption
  • Enable the transmission antenna aggregation
  • Disable bluetooth coexistence

Create a /etc/modprobe.d/iwlwifi.conf with the following content :

options iwlwifi 11n_disable=1
options iwlwifi swcrypto=1
options iwlwifi 11n_disable=8
options iwlwifi bt_coex_active=0

iwlwifi troubleshooting on arch-linux

GAD3R
  • 63,407
  • 31
  • 131
  • 192
  • 2
    kudos to you my friend. I've seen this advise scattered troughout the web, never a clear explanation of what and how. splendid. yet, I still have quite frankly terrible wifi. – Pedro Rodrigues Apr 09 '20 at 21:12
  • 2
    The `swcrypto=1` and `bt_coex_active=0` options *did not work for me*. However, using the `11n_disable` lins did work and it's back to normal speeds. Thank you! –  May 03 '20 at 22:54
  • 1
    @GAD3R setting `11n_disable` twice results in later to be set. So either disabling it fully, or enabling antenna aggregation? Which one should be set? – Michael Hirschler Jul 31 '20 at 12:51
  • Why is `11n_disable` listed 2 times in the config? – Santosh Kumar Dec 22 '21 at 09:10
11

TL;DR: it appears 4.17.x (and higher) kernels achieve high speeds with the iwlwifi driver with stock configurations.

I was also experiencing very slow wifi under Linux (Ubuntu 18.04LTS with it's stock kernel - 4.15.0-30-generic and 4.15.18-041518-generic) with stock configuration. My setup was capable of ~55MB/s in Windows 10, but only ~3MB/s in Linux. The card is an AC9260 in a Dell XPS 15 9570 if that's important.

I tried everything recommended elsewhere (power management, 11n_disable modprobe arguments, etc etc) and nothing worked. I reverted all those changes so my config was stock Ubuntu 18.04LTS post-install config.

I installed UKUU (an ubuntu kernel updater package, if you use a different distribution, you'll need another kernel upgrade mechanism), upgraded to 4.17.x-mainline (currently 4.17.14-041714-generic) and with no other changes I achieve 47MB/s in Linux now. My bandwidth tests are not scientific enough to say I couldn't get equal performance to Win10 now, but even in the absence of a git bisect to see what solved it, I consider this a solved problem now since a simple kernel upgrade works.

[edited 2019/01/30 to report I continue to have success with 4.19.x and 4.20.x series - it appears 4.15.x simply had a performance issue with this driver, fixed sometime on or before 4.17.x, and it has continued to be just fine since.]

Mike Hardy
  • 211
  • 3
  • 7
  • As a side note on this: I had success with 4.17.x but then it started having firmware hangs using current stable linux-firmware - these continued for quite some time but on later 5.10.x and now 5.11.x kernels I no longer have firmware hangs and I'm consistently getting ~35MB/s in linux with no special tuning. – Mike Hardy Mar 02 '21 at 14:00
3

My solution is to force my pc to connect to the 2.4GHz wifi channel instead of 5GHz. My wifi speed jumps to ~90 Mbps from 1 Mbps.

To check which wifi channel your pc is connecting: sudo iwlist channel

You can quickly test if this solution works by connecting to a 2.4GHz channel by connecting your laptop to a hot spot on your phone.

To force your PC to connect to 2.4GHz wifi channel: you can set different names for your different bands on your router. or find other ways on your PC side. I could follow these instructions to force my machine to connect to to the 2.4GHz channel

More information about my case: Dell inspiron, dual boot (ubuntu 18.04.2 LTS, and windows 10) wifi with win works well; wifi with ubuntu is extremely slow; connect ubuntu to the hotpot of my cellphone, wifi speed works well (this gives me a hint to find the solution).

Maku
  • 13
  • 2
0

What worked for me was enabling antenna aggregation. By adding the line options iwlwifi 11n_disable=8 to /etc/modprobe.d/iwlwifi.conf

ghost in a jar
  • 141
  • 1
  • 1
  • 8
  • -1 for not explaining what that options line is doing, this is not how we are supposed to answer – Vlastimil Burián Feb 26 '20 at 13:50
  • @LinuxSecurityFreak There's more info regarding that specific setting (and other `iwlwifi` options) on the [Arch Linux Network Config page](https://wiki.archlinux.org/index.php/Network_configuration/Wireless#iwlwifi). – coderMe Jun 17 '20 at 16:56
0

Switching from using the 5GHz band to the 2.4GHz WiFi band worked for me. You can see which band you are currently connected to by running:

iwlist channel

I could test out by connecting to a 2.4GHz channel by connecting by laptop to a hot spot on my phone. The wifi speed was about x10 faster for my when I tried this.

I could then force my WiFi connection to use the 2.4GHz band by following the instructions here

Maku
  • 13
  • 2
  • Hello! Your experience seems to be the same as in [another answer to this question](https://unix.stackexchange.com/a/502789/423679). You could [edit] your answer and add instructions on how you forced 2.4GHz, so that to make your answer stand out and more helpful for other people having this issue. – Roman Riabenko Nov 16 '20 at 21:55