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.
4 hours ago
Workaround: try adding the command to /etc/rc.local so that it automatically gets executed at boot:
# 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
# By default this script does nothing.
iwconfig wlan0 power off ### this line added
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