Skip to content

Instantly share code, notes, and snippets.

@PieGuy314
Created December 24, 2020 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PieGuy314/cc438b816073e5589686ac43a3a088d0 to your computer and use it in GitHub Desktop.
Save PieGuy314/cc438b816073e5589686ac43a3a088d0 to your computer and use it in GitHub Desktop.
PiOs wifi power save on/off
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