Drop Wi-Fi power save toggling in favor of keeping it off

The on-battery toggle bought a fraction of a watt while the radio
idled -- twenty-some minutes across a full discharge in the best case
-- and paid for it with 20-300ms latency spikes on idle links and
outright link drops on Intel BE200/BE211 firmware. NetworkManager can
keep power save off natively with one conf.d line, which replaces the
udev rule, the setter script, and any per-card deny-listing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Fable 5 committed 2026-07-24 10:34:19 -07:00
1 parent 1d4077287b
commit da157fb9c0
4 files changed
+24 -12

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
echo "Keep Wi-Fi power save off for lower latency"
as_root() {
if (( EUID == 0 )); then
"$@"
else
sudo "$@"
fi
}
as_root nmcli general reload conf >/dev/null 2>&1 || true
# NetworkManager only applies wifi.powersave when a connection activates, so
# also switch it off directly for the running session.
shopt -s nullglob
for wireless in /sys/class/net/*/wireless; do
iface=$(basename "$(dirname "$wireless")")
as_root iw dev "$iface" set power_save off 2>/dev/null || true
done