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.
Best Answer
Workaround: try adding the command to /etc/rc.local so that it automatically gets executed at boot:
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