Google Ads

December 16, 2017

Ubuntu improve WIFI performance and reliability

If you need a stable internet connection through WIFI then it is important that WIFI performance remains consistent and WIFI connection is reliable at any given time. This is vital if you are running any kind of server or using torrents. Unfortunately, the power management feature exists for different devices within Ubuntu promotes unstable and slow WIFI connection which is enabled by default for WIFI devices. This creates problems such as automatic turning of WIFI and loosing of WIFI connectivity randomly while the system stays idle for a while or there is no inbound packets coming to your system. To check whether you have power management active for your WIFI device execute the following command into the terminal:

iwconfig | grep -w "Power Management"

Now if it is active then you can easily turn it off by executing following command:

sudo iwconfig wlan0 power off

where you have to replace wlan0 word with your WIFI device name which can be found by executing following command:

ifconfig -a

The above command will list all the network devices present in the system including WIFI devices. If the terminal says that command not found then install the program by installing the package net-tools. To do that, execute the following in the terminal:

sudo apt-get install net-tools

Now to make this setting persistent between the boots you can do several things. First, make changes to the /etc/pm/config.d/blacklist file. To do that, in the terminal execute the following to open the file:

sudo gedit /etc/pm/config.d/blacklist

Add the following line in the /etc/pm/config.d/blacklist file:

HOOK_BLACKLIST="wireless"

Second, make changes to the /etc/pm/power.d/wifi_pwr_off file. To do that, in the terminal execute the following to open the file:

sudo gedit /etc/pm/power.d/wifi_pwr_off

Now add the following lines in the /etc/pm/power.d/wifi_pwr_off file:

#!/bin/sh 
/sbin/iwconfig wlan0 power off

Do not forget to replace the word wlan0 with your WIFI device name and save the file. Now, execute the following command it make the file executable upon every boot:

sudo chmod +x /etc/pm/power.d/wifi_pwr_off

Third, make changes to the /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf file. To do that, in the terminal execute the following to open the file:

sudo gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Now in the /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf file, replace wifi.powersave = 3 with wifi.powersave = 2 and save the file.


That is it!

Cheers!
Imam

No comments:

Post a Comment