How to set up a new computer

Last Updated 2025-05-22.


Table of Contents
List of Tables
$ iw wlan0 get power_save Power save: on As you see, it is power_save on; it is enabled. One may wonder what sort of thinking led to a default setting of power save enabled on a device that is plugged into a mains outlet, but it is a mind fart that should probably be disabled on the Raspberry Pi. One way to accomplish this is to build a systemd unit file which can execute the necessary command at boot. I will give you here a bit more comfortable example for switching off or on power_save. Create a Unit file with: 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