Disable Wi-Fi power saving during streaming

PR
1d ago
+425-0

What does this change?

Disables Wi-Fi power saving while a cloud session is active and restores the previous setting afterward. Uses nl80211 directly from Zig.

Addresses #11.

How did you test it?

Tested on Miyoo Flip running SpruceOS 4.3.3. Confirmed the radio stops entering low-power mode during sessions and the original setting returns after cancellation, failure and graceful shutdown. Already-disabled power saving stays off.

All 453 tests and the ARM64 build passed. The 11 new tests also passed on the Flip.

Live gameplay remains unverified: both this build and unchanged v0.3.1 hit OfferTimeout before receiving video.


Summary by cubic

Disables Wi-Fi power saving while a cloud session is active and restores the previous setting afterward, so the radio no longer drops into low-power mode during streams. Addresses #11.

  • Talks to nl80211 directly from Zig; no external tools required.
  • Only disables power saving when it was previously enabled; if it was already off, it stays off.
  • Skips restoration if an interface was removed or replaced during the session.
  • Adds 11 tests for rollback, kernel error mapping, and malformed replies; the full test suite and ARM64 build pass.

Summary by CodeRabbit

  • New Features
    • On Linux, Wi-Fi power saving is temporarily disabled on connected wireless interfaces during a session. Previously enabled settings are restored when the session ends. If an interface changes during the session, its replacement is not affected.