Permanently disable WiFi power management in Ubuntu Server 18.04

Tags:

Answer: 1

25 hours ago

I have a small server set up that is connected to the network over wireless. I was able to configure wireless by installing wpa_supplicant and adding the required lines to netplan. I've been having issues with the server not responding right away to pings/ connection attempts after it has sat idle for a while. After installing wireless-tools I could see that iwconfig was reporting that power management was turned on.

As I understand it, I can disable it until the next reboot with

sudo iwconfig wlan0 power off

How do I disable this permanently? I have tried creating an empty file called "wireless" in /etc/pm/sleep.d which didn't work. Other fixes I have seen for 16.04 reference /etc/NetworkManager which is not present on 18.04.2.

Added by: Elvie Watsica

Answer: 2

4 hours ago

Workaround: try adding the command to /etc/rc.local so that it automatically gets executed at boot:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

iwconfig wlan0 power off   ### this line added

exit 0

Have tested this on 16.04. If you face any issue on 18.04 let us know.

Another way reported is to install TLP and disable wifi power management there: https://unix.stackexchange.com/a/473753/45945

Added by: Thurman Blanda

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9