I recently encountered a frustrating issue where, despite the wireless access point being just five meters away from my digital picture frame, the Wi-Fi connection kept dropping and failed to reconnect automatically.

Initially, I suspected the SD card or the power supply might be at fault. In my experience with Raspberry Pi, these components are often responsible for unusual issues.

After replacing both the SD card and the power supply, the problem persisted, indicating that the issue lay elsewhere.

Understanding Wi-Fi Power Management

Subsequently, I discovered a straightforward solution on the Raspberry Pi forum that resolved this annoyance. It is well-known within this community that power management settings can sometimes lead to Wi-Fi connectivity issues.

So, the fix was very easy: I had to turn the WiFi power management off.

Wi-Fi power management is a feature designed to reduce power consumption by turning off the Wi-Fi module when it’s not actively transmitting data.

This is particularly useful for battery-powered devices. However, in a Raspberry Pi setup, where consistent connectivity is more critical than power saving, this feature can be more of a hindrance than a help.

While this may not be a solution that works for you, I would give it a try.

By default, power management is turned on.

You can check it by entering the following in the Terminal.

iw dev wlan0 get power_save

The answer is a single line, either

Power save: on

or Power save: off.

I originally used iwconfig here, which printed the same information in a much longer block under the heading “Power Management”. That command comes from the old wireless-tools package, which is deprecated and is not installed on Bookworm or Trixie anymore, so on a current Raspberry Pi it simply answers command not found. iw is the replacement and is there by default.

Disabling Wi-Fi Power Management

As with everything else on the Raspberry Pi, there are many ways to skin the cat.

This is where the article needed rewriting. The method I described here originally was to put /sbin/iwconfig wlan0 power off into /etc/rc.local, so that it ran at every boot. That no longer works on a current Raspberry Pi, for two separate reasons: /etc/rc.local is not shipped or enabled anymore, so a file you create there is never executed, and iwconfig is not installed. If you followed the old version of this article on Bookworm or Trixie, the fix was silently doing nothing.

Since Bookworm, the Wi-Fi link belongs to NetworkManager, and the setting belongs on the connection profile, where it survives reboots without any startup script. It is the same place you go to force the 2.4 GHz band.

First find the name of your connection:

nmcli connection show

If you set up WiFi with the Raspberry Pi Imager, it will most likely be called “preconfigured”. Then turn power saving off on it (2 means disabled):

sudo nmcli connection modify "preconfigured" wifi.powersave 2

and apply it:

sudo systemctl restart NetworkManager

Reboot and check with iw dev wlan0 get power_save whether the power management is turned off.

I have not yet re-run this on a Trixie frame over several days the way I did with the original rc.local version, so I cannot tell you yet whether it makes the same difference for me that it did back then. The commands are the current, documented way to set it; the long-term result on my own frame is still to be confirmed.

Does picframe3 make this unnecessary?

No, but it takes the urgency out of it. This is an operating system setting, not a picture frame setting, so picframe3 does not change it either way. What picframe3 does do is watch its own network link: it checks that it can still reach your router, reports an outage, and mends the connection itself — reconnecting first and restarting NetworkManager only if that was not enough. So a frame that drops off the WiFi now comes back on its own instead of sitting there showing a picture while nobody notices.

That makes turning off power management a tuning tip rather than a prerequisite. It is still worth doing if your frame keeps dropping, because not dropping in the first place beats recovering from it.

Conclusion

After disabling Wi-Fi power management, monitor your Raspberry Pi for a few days to see if there’s an improvement in Wi-Fi stability.

I hope there is!