Pi Zero 2 W drops off wifi after a few hours until I power cycle it Headless Setup
It runs a camera timelapse script and I only reach it over SSH. It stays reachable for three to six hours, then vanishes: ping fails, the mDNS name is gone, nothing. The script keeps writing image files the entire time, so the Pi itself is clearly alive and happy. Pulling power brings it straight back. Router is a stock ISP box on 2.4GHz and signal at the shelf is around -62dBm.
@headless_hugo · 3mo ago · 3 replies
Power save on the wifi chip. Check it with
iw dev wlan0 get power_saveand I would bet money it says on.Turning it off with
iw dev wlan0 set power_save offwill confirm the diagnosis within an evening, but that does not survive a reboot. Make it stick with a tiny systemd unit that runs the same command after the network is up, or if you are on NetworkManager setwifi.powersave = 2in a file under/etc/NetworkManager/conf.d/.The reason it looks like the Pi died is that the chip goes into a deep sleep and then fails to wake for beacons, so the router quietly ages it out of the association table. Nothing on the Pi notices because nothing on the Pi was trying to talk.
Reply
Report
@refresh_rhea · 3mo ago
This was exactly my problem, with one addition: I put the command in
/etc/rc.localand it silently stopped working after a distribution upgrade. The systemd unit version has survived two upgrades since.Reply
Report
@trace_tilly · 3mo ago
If it still drops after that, look at roaming. If you have a mesh or an extender using the same SSID, the Zero 2 clings to a weak radio rather than moving, and -62dBm at the shelf could be the far access point.
Reply
Report