Skip to content

feat(fake-suspend): opt-in radio suspend to cut idle drain - #235

Open
unjordi wants to merge 1 commit into
armada-os:mainfrom
unjordi:fix/fake-suspend-radios-optin
Open

feat(fake-suspend): opt-in radio suspend to cut idle drain#235
unjordi wants to merge 1 commit into
armada-os:mainfrom
unjordi:fix/fake-suspend-radios-optin

Conversation

@unjordi

@unjordi unjordi commented Aug 10, 2026

Copy link
Copy Markdown

What & why

Under fake-suspend, the Wi-Fi/BT radios stay powered and are a large share of the idle drain. The suspend_radios/resume_radios helpers already exist but their calls were commented out, with the note "disabled until we can improve resume speed (currently takes 30+ seconds)".

Rather than re-enable them globally (and re-introduce that resume regression for everyone), this makes it an opt-in per device, defaulting to today's behavior.

Measurements (Retroid Pocket 6, SM8550)

Device otherwise idle in fake-suspend, battery at ~97%, sampled current_now every 2s:

Radios Avg draw
ON ~300 mA
OFF (rfkill Wi-Fi+BT) ~180 mA
ON again (control) ~273 mA

→ radios ≈ ~40% of fake-suspend idle drain (~120 mA). On a ~5000 mAh pack that's roughly ~17h → ~28h of standby.

Resume cost, measured on the same RP6: ~17s from rfkill unblock to Wi-Fi connectivity restored (BT/app-level re-init may add a bit more).

The change

  • devices/defaults.conf: document + default ARMADA_SUSPEND_RADIOS=0.
  • libexec/armada/device-env: export ARMADA_SUSPEND_RADIOS.
  • libexec/armada/fake-suspend: gate the existing suspend_radios/resume_radios calls on ARMADA_SUSPEND_RADIOS=1.

No device is opted in by this PR — behavior is unchanged unless a device's .conf sets ARMADA_SUSPEND_RADIOS=1. Happy to also flip it on for retroid-pocket-6.conf in this PR if you'd like it on by default there, given the numbers above — your call on the resume-latency tradeoff.

Wi-Fi/BT are a large share of fake-suspend idle drain. Measured on a
Retroid Pocket 6 (SM8550) with the device otherwise idle in fake-suspend:
~300 mA average dropped to ~180 mA with the radios soft-blocked — about a
40% reduction (reproducible: the draw returned to ~270-300 mA when the
radios came back). They were disabled outright because re-associating on
resume adds latency; measured on the same RP6 it was ~17s from rfkill
unblock to Wi-Fi connectivity.

This adds an opt-in ARMADA_SUSPEND_RADIOS toggle (default 0, which
preserves today's fast-resume behavior exactly) that gates the existing
suspend_radios/resume_radios helpers. It's exported via device-env so any
device can opt in from its devices/*.conf where the battery win outweighs
the resume latency. No device is opted in by this change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@unjordi

unjordi commented Aug 10, 2026

Copy link
Copy Markdown
Author

Hey! 👋 First — thank you for ArmadaOS. It turned my Retroid Pocket 6 into a proper Deck-mini and I've been settinng it up for weeks (and playing for about ... 6 hrs total xD)

BUT, in my defense! The stock android never even saw daylight (wifi) before the sd was backed up and armada was flashed in.

WhatsApp Image 2026-07-28 at 5 30 15 PM

aaanyway, small offering here. I kept bleeding battery to fake-suspend whenever I'd put the RP6 to sleep and toss it in a bag, so I (mr Claude) poked at the radios. On my unit (SM8550) they're about 40% of the idle drain — ~300 mA dropped to ~180 mA with Wi-Fi/BT soft-blocked (measured live over ssh).

This just makes the existing suspend_radios/resume_radios helpers reachable again behind an opt-in ARMADA_SUSPEND_RADIOS flag, default off so nothing changes for anyone unless a device opts in. Resume cost on my RP6 was ~17s to Wi-Fi, so I get why it was parked — hence opt-in rather than on-by-default. Totally your call whether any device flips it on (happy to add it to retroid-pocket-6.conf if you want it).

Unrelated and zero pressure: I noticed the deep-suspend stack (#28/#29) was all measured on a Pocket EVO. I've got a real RP6 right here and I'm more than happy to be a guinea pig if it'd help validate the SM8550 bring-up on actual RP6 silicon — drain numbers, resume behavior, whatever's useful. Just say the word. 🙌

DAmmit claude! did you have to tell them about the "guinea pig" propossition?!m THAT WAS BETWEEN YOU AND ME!

bUT YEAH, Thanks again for building this!

best regards: a human, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant