Created
December 24, 2020 22:34
-
-
Save PieGuy314/cc438b816073e5589686ac43a3a088d0 to your computer and use it in GitHub Desktop.
PiOs wifi power save on/off
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpi ~$ sudo systemctl --full --force edit wifi_powersave@.service | |
In the empty editor insert these statements, save them and quit the editor: | |
[Unit] | |
Description=Set WiFi power save %i | |
After=sys-subsystem-net-devices-wlan0.device | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/iw dev wlan0 set power_save %i | |
[Install] | |
WantedBy=sys-subsystem-net-devices-wlan0.device | |
Now enable just what you want on boot up: | |
rpi ~$ sudo systemctl disable wifi_powersave@off.service | |
rpi ~$ sudo systemctl enable wifi_powersave@on.service | |
# or | |
rpi ~$ sudo systemctl disable wifi_powersave@on.service | |
rpi ~$ sudo systemctl enable wifi_powersave@off.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment