From a9c80e954cc41b651e515bc9df8ff11fdd059f1a Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:05:15 -0647 Subject: [PATCH 1/2] tools/power-ab: a systemd suspend mode, and a gauge without charge_counter The s2idle test froze through rtcwake -m freeze, which skips the system-sleep hooks; on the palmtop (Pixel 9a) the NFC hook must run, since polling through s2idle has reset it. --suspend systemd arms the RTC alarm and runs systemctl suspend, waiting for the suspend success count to move. The 9a's gauge has charge_now but no charge_counter, so the test now accepts either; the summary already used charge_now as its cross-check. Tried on the palmtop: one 40 s cycle with the hooks, woken by the RTC, NFC polling again afterwards. --- tools/power-ab | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/power-ab b/tools/power-ab index f317b52b6..4a65e4659 100755 --- a/tools/power-ab +++ b/tools/power-ab @@ -38,6 +38,9 @@ # --user-units "U..." user units for the units test # --user NAME whose user units (default: the first logged-in user) # --detach re-run itself with setsid/nohup and return at once +# --suspend HOW s2idle: "rtcwake" freezes straight through /sys/power/state +# (default); "systemd" arms the RTC and runs systemctl suspend, +# so the system-sleep hooks run (the 9a's NFC hook must) # # Output: /var/lib/omamobile/power/