Well, actually I really do not know why and I searched numerous explainations and solutions to this problem. Unfortunately, no one has the satisfactory answer. The bizarre phenominon is that I installed Ubuntu 14.04 in both my laptops respectively using the same LiveCD. One of the two has a pretty fast network and I am writing this blog on this laptop, while the other one suffers from the dead WIFI network. Pinging www.baidu.com is even impossible at all!! Several methods of alleviaating such annoying defect are listed as follows. I tried almost all of them. None of them works except for the last one.
The first six methods are from http://itsfoss.com/speed-up-slow-wifi-connection-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:
sudo su 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:
sudo su echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf
Restart your computer and live your life at full speed.
Important note:
If you are using version older than Ubuntu 12.04, use the previous steps with iwlwifi replaced by iwlagn.
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:
sudo su 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:
sudo iwconfig
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
and the last one is like this:
sudo modprobe -r rt2800pci
sudo modprobe -v rt2800pci nohwcrypt=1
and to make it permanent, we need to:
sudo gedit /etc/modprobe.d/rt2800pci.conf
options rt2800pci nohwcrypt=1