NetworkManager supports WiFi powersaving but the function is rather undocumented.
From the source code: wifi.powersave can have the following value:
- NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
- NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
- NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
- NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave
Then I propose 2 files, only one of them needs to be put under /etc/NetworkManager/conf.d/.
One is forcing to disable powersaving, while the other one enable it.
Once you have put the file in the right folder, simply restart NetworkManager:
sudo systemctl restart NetworkManager
Ubuntu wifi power signal hygene:
Does it work?
Yes, as long as your private hotspot is nearby otherwise not, but it is the inteded behaviour.
Side effect: your Android hotspot tends to increase the TX power by +20dB which is not good.
Equilibrium can be found testing different tx powers:
sudo iw dev $wifiname set txpower limit 500In my case this setting (500 mdB) is equivalent to 1500 in terms of TX power by the Android hotspot.
Considering that dB is a logaritmic scale the sweet post (least EM pollution) is obtained when the sum of all wifi networks nodes tx dB are at its minimum. Usually, compared with the standard TX power value that in my case was 1500 mdB.
Note: value provided by the script under the "SIGNAL" are RSSI expressed in % (higher better) and it is about signal noise ration not about the power. However, for a quick evaluation can be also used as an indirect evaluation of the hotspot TX power.