One of the most common problem faced after installing Ubuntu is network problem. Some times you will have no wireless network in Ubuntu and some times very slow wireless connection and some time it will fluctuate between fast and slow. If you are lucky, it could be fixed by installing propriety drivers in Ubuntu but generally you will be left fuming, cursing over slow or no WiFi connection.
In this post I’ll only focus to fix slow WiFi problem in Ubuntu 14.04, Linux Mint and other similar OS. This actually consists of several small tricks that you can try to get faster WiFi. So lets see how to fix slow WiFi in Ubuntu:
Solution 1: For Slow WiFi in Atheros Wireless Network Adaptors
First you need to find your wirless network adaptor. You can do so by using lshw -C network command in terminal. If your adaptor manufacturer is Atheros, this solution should work for you.
Open a terminal (Ctrl+Alt+T in Ubuntu) and use the following commands one by one:
echo "options ath9k nohwcrypt=1" >> /etc/modprobe.d/ath9k.conf
This will add the additional line to configuration file. Restart your computer and you should be good to go. If it does not fix or if you don’t have Atheros WiFi adaptor, try other solutions.
Solution 2: Disable 802.11n
The next trick is to force disable the 802.11n protocol. Even after so many years, most of the world runs 802.11a,b and g. While 802.11n provides better data rate, not all the routers support it, especially the older ones. It has been observed that disabling the 802.11 n helps speed up the wireless connection in Ubuntu and other OS.
Open the terminal and use the following command:
sudo rmmod iwlwif
sudo modprobe iwlwifi 11n_disable=1
If you find no significance increase in the wireless connection speed, restart the computer to revert the changes and forget about this solution. BUT if it worked for you and you have a faster WiFi now, you should make the changes permanent by using these commands:
iwlwifi 11n_disable=1" >> /etc/modprobe.d/
Restart your computer and live your life at full speed.
If you are using version older than Ubuntu 12.04, use the previous steps with
iwlwifi replaced by
Solution 3: Fix the bug in Debian Avahi-daemon
The slow WiFi in Ubuntu problem could also be related to a bug in Avahi-daemon of Debian. Ubuntu and many other Linux distribution are based on Ubuntu so this bug propagates to several Linux distributions. To fix this bug, you have to edit the nsswitch configuration file. Open a terminal and use the following command:
sudo gedit /etc/nsswitch.conf
This will open the configuration file in gedit so that you could edit it easily in GUI. In here, look for the following line:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
If you find this file, replace it with the following line:
hosts: files dns
Save it, close it, restart your computer. It should fix the slow wireless connection problem for you. If it doesn’t check the other solution.
Solution 4: Disable IPv6 support
Yes, you heard it right. Lets go back to the previous century and care about IPv4 only by ditching IPv6 support. It is perfectly fine because IPv6 is still in deployment mode and a significant number of ISPs don’t even support it. Moreover, if it improves the WiFi speed, why not, I say. To disable IPv6 support, use the following commands one by one:
echo "#disable ipv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
Restart your computer and it should do the magic. If not try the next one.
Solution 5: Ditch default network manager and embrace Wicd
Slow or inconsistent wireless connection, in some cases, are also due to Ubuntu’s very own default network manager. I am not sure what causes this but I have seen people in Ubuntu Forums talking about this problem in especially in Ubuntu 12.04. You can install Wicd, an alternate and a better network manager from Ubuntu Software Centre or from terminal. For details on how to use Wicd, you can read my other article which I used to find SSID of wireless networks in Ubuntu.
Solution 6: More power to wireless adaptor
This trick could be obsolete and this is why I mentioned it in the end. At the time of Ubuntu 11.04, Linux Kernel had a power management system. This troubled some users with their wireless connection speed as it sent less power to wireless adaptor and thus affecting its performance. As a result wireless connection would be some times fast and some times dead slow. While this is probably fixed in later Kernels, systems running older Linux Kernel may still face it.
Open a terminal and use the following command:
It will give you the name of your wireless device. Normally it should be wlan0. Now use the following command:
sudo iwconfig wlan0 power off
This will switch off the special power management system for the wireless adaptor and thus it will get more power and will work more (lame attempt at even lamer humour).
Did it work for you?
Okay, six ways to fix slow WiFi in Ubuntu. You should find “the one” for you (damn! even lamer attempt at humour). Anyways, do let me know if it worked for you and if it worked, which solution was it. Also, if you come across a newer solution, please share it with us so that all of us could be benefited from your experience. Feel free to drop your suggestion, thanks or even to point out spelling or grammatical mistakes. And if the article helped you to speed up WiFi in Ubuntu, you might want to read how to speed up Ubuntu overall.