Slow WiFi in Ubuntu 14.04

I upgraded my internet recently and noticed that my WiFi speed wasn’t anywhere near what it should be. Stranger still, it was the speed I expected when I booted into Windows, but not in Ubuntu, which was a sign that it was a software issue.

I googled around and found all sorts of suggestions for how to fix this, such as upgrading the kernel or disabling IPv6. The only solution that worked for me was to change an option in the iwlwifi kernel driver, which is used to interface with Intel wireless chips. You can determine what chip you have with:

sudo lshw -C network

And look for a wireless interface. For me this was the Intel Centrino Wireless-N 2230. You’ll also want a tool to actually check your connection speed, such as speedtest-cli.

Speeding up my WiFi

The trick that worked for me was:

sudo rmmod iwldvm   # the next step didn't work for me if I didn't do this first
sudo rmmod iwlwifi  # temporarily remove the iwlwifi module from the kernel
sudo modprobe iwlwifi 11n_disable=8     # reenable the iwlwifi, with the 11n channel disabled

You can see valid values for 11n_disable and other options by running modinfo iwlwifi. Note that the commands above will not remain if you reboot. If you find that this helped and want to make this permanent, append the following line to /etc/modprobe.d/iwlwifi.conf:

options iwlwifi 11n_disable=8