06-16-2020, 05:09 PM
One of the most common problems you face after installing Ubuntu is the network problem. Sometimes you won't have a wireless network in Ubuntu and sometimes a very slow wireless connection and sometimes it will fluctuate between fast and slow. If you're lucky, it could be fixed by installing proprietary drivers on Ubuntu, but overall, you'll be furious, cursing for a slow or no WiFi connection.
Speed up WiFi on Ubuntu Linux
This article was originally written for Ubuntu 13.04, but is also applicable for troubleshooting slow network issues in Ubuntu 14.04, Ubuntu 14.10, and Linux Mint 17.
In this post, I will only focus on fixing slow WiFi problem in Ubuntu 14.04, Linux Mint and other similar operating systems. This actually consists of several little tricks you can try to get WiFi faster. So, let's see how to fix slow WiFi in Ubuntu:
Solution 1: For slow WiFi on Atheros wireless network adapters
First, you need to find your wireless network adapter. You can do this using the lshw -C network command in the terminal. If your adapter's 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:
I sweat his
echo "options ath9k nohwcrypt = 1" >> /etc/modprobe.d/ath9k.conf
This will add the additional line to the configuration file. Restart your computer and you should be ready to go. If it doesn't fix or if you don't have the Atheros WiFi adapter, 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 is running 802.11a, b and g. While 802.11n provides better data rates, not all routers support it, especially older ones. Disabling 802.11n has been observed to help speed up the wireless connection in Ubuntu and other operating systems.
Open terminal and use the following command:
sudo rmmod iwlwif
sudo modprobe iwlwifi 11n_disable = 1
If you don't find a significant increase in wireless connection speed, restart your computer to reverse the changes and forget about this solution. BUT if it worked for you and you now have faster WiFi, you should make the permanent changes using these commands:
I sweat his
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 a version earlier than Ubuntu 12.04, use the above steps with iwlwifire replaced by iwlagn.
Solution 3: fix the bug in Debian Avahi-daemon
The slow WiFi problem in Ubuntu could also be related to a bug in Debian's Avahi-daemon. Ubuntu and many other Linux distributions are based on Debian, so this bug also spreads to these Linux distributions. To correct this error, you must 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 you can easily edit it in the GUI. Here, look for the following line:
hosts: mdns4_minimal files [NOTFOUND = return] dns mdns4
If you find this file, replace it with the following line:
hosts: dns files
Save it, close it, restart your computer. It should fix the slow wireless connection problem for you. If you don't check the other solution.
Solution 4: disable IPv6 support
Yes, you heard correctly. Let's go back to the previous century and worry about IPv4 just abandoning IPv6 support. It's perfectly fine because IPv6 is still in deployment mode and a significant number of ISPs don't even support it. Also, if it improves WiFi speed, why not, I say. To disable IPv6 support, use the following commands one by one:
I sweat his
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 following.
Solution 5: leave the default network manager and adopt Wicd
The slow or inconsistent wireless connection, in some cases, is also due to Ubuntu's own default network manager. I'm not sure what causes this, but I've seen people on the Ubuntu forums talking about this issue, especially on Ubuntu 12.04. You can install Wicd, a better alternative network administrator from the Ubuntu Software Center or from the terminal. For details on how to use Wicd, you can read my other article I used to find SSID of wireless networks in Ubuntu.
Solution 6: more power for the wireless adapter
This trick might be outdated and that's why I mentioned it at the end. At the time of Ubuntu 11.04, the Linux Kernel had a power management system. This annoyed some users with its wireless connection speed, as it sent less power to the wireless adapter and therefore affected its performance. As a result, the wireless connection would sometimes be fast and sometimes very slow. While this is likely to be fixed in later Kernels, systems running older Linux Kernel may still face it.
Speed up WiFi on Ubuntu Linux
This article was originally written for Ubuntu 13.04, but is also applicable for troubleshooting slow network issues in Ubuntu 14.04, Ubuntu 14.10, and Linux Mint 17.
In this post, I will only focus on fixing slow WiFi problem in Ubuntu 14.04, Linux Mint and other similar operating systems. This actually consists of several little tricks you can try to get WiFi faster. So, let's see how to fix slow WiFi in Ubuntu:
Solution 1: For slow WiFi on Atheros wireless network adapters
First, you need to find your wireless network adapter. You can do this using the lshw -C network command in the terminal. If your adapter's 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:
I sweat his
echo "options ath9k nohwcrypt = 1" >> /etc/modprobe.d/ath9k.conf
This will add the additional line to the configuration file. Restart your computer and you should be ready to go. If it doesn't fix or if you don't have the Atheros WiFi adapter, 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 is running 802.11a, b and g. While 802.11n provides better data rates, not all routers support it, especially older ones. Disabling 802.11n has been observed to help speed up the wireless connection in Ubuntu and other operating systems.
Open terminal and use the following command:
sudo rmmod iwlwif
sudo modprobe iwlwifi 11n_disable = 1
If you don't find a significant increase in wireless connection speed, restart your computer to reverse the changes and forget about this solution. BUT if it worked for you and you now have faster WiFi, you should make the permanent changes using these commands:
I sweat his
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 a version earlier than Ubuntu 12.04, use the above steps with iwlwifire replaced by iwlagn.
Solution 3: fix the bug in Debian Avahi-daemon
The slow WiFi problem in Ubuntu could also be related to a bug in Debian's Avahi-daemon. Ubuntu and many other Linux distributions are based on Debian, so this bug also spreads to these Linux distributions. To correct this error, you must 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 you can easily edit it in the GUI. Here, look for the following line:
hosts: mdns4_minimal files [NOTFOUND = return] dns mdns4
If you find this file, replace it with the following line:
hosts: dns files
Save it, close it, restart your computer. It should fix the slow wireless connection problem for you. If you don't check the other solution.
Solution 4: disable IPv6 support
Yes, you heard correctly. Let's go back to the previous century and worry about IPv4 just abandoning IPv6 support. It's perfectly fine because IPv6 is still in deployment mode and a significant number of ISPs don't even support it. Also, if it improves WiFi speed, why not, I say. To disable IPv6 support, use the following commands one by one:
I sweat his
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 following.
Solution 5: leave the default network manager and adopt Wicd
The slow or inconsistent wireless connection, in some cases, is also due to Ubuntu's own default network manager. I'm not sure what causes this, but I've seen people on the Ubuntu forums talking about this issue, especially on Ubuntu 12.04. You can install Wicd, a better alternative network administrator from the Ubuntu Software Center or from the terminal. For details on how to use Wicd, you can read my other article I used to find SSID of wireless networks in Ubuntu.
Solution 6: more power for the wireless adapter
This trick might be outdated and that's why I mentioned it at the end. At the time of Ubuntu 11.04, the Linux Kernel had a power management system. This annoyed some users with its wireless connection speed, as it sent less power to the wireless adapter and therefore affected its performance. As a result, the wireless connection would sometimes be fast and sometimes very slow. While this is likely to be fixed in later Kernels, systems running older Linux Kernel may still face it.