3

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.

1 Answer 1

1

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

1
  • 1
    I had this need on 19.10 ubuntu and this appears to work fine at least over a couple days testing.
    – Linwood
    Sep 6, 2019 at 14:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .