From 87627a928e2daa68151e2fbb32e56520afd18ef0 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Sun, 1 Nov 2026 12:30:19 -0647 Subject: [PATCH] omamobile-shell 0.2.68: a wake by the Pixel 9a's power key lights the lock screen sleepd recognised a power-key wake only by the gpio-keys label KEY_POWER, the 7 Pro's. The 9a's device tree labels the key Power, so its wake was taken for a dark resume and the palmtop went back to sleep 5 s later with the screen off. --- packages/omamobile-shell/bin/omamobile-sleepd | 4 +++- packages/omamobile-shell/test/sleepd.sh | 4 ++++ packages/omamobile-shell/version | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/omamobile-shell/bin/omamobile-sleepd b/packages/omamobile-shell/bin/omamobile-sleepd index 41b29831d..491f476c9 100755 --- a/packages/omamobile-shell/bin/omamobile-sleepd +++ b/packages/omamobile-shell/bin/omamobile-sleepd @@ -156,7 +156,9 @@ watch() { # session is frozen while the kernel takes it. Light the PIN pad here, # as that press would have (omamobile-keys ignores the press itself if # it does arrive, so the screen doesn't go straight back off). - if [[ $woke == *KEY_POWER* ]] && command -v omamobile-keys >/dev/null; then + # The key's gpio-keys label names the line: KEY_POWER on the Pixel 7 + # Pro's device tree, "Power" on the Pixel 9a's. + if [[ $woke =~ [[:space:]](KEY_POWER|Power)$ ]] && command -v omamobile-keys >/dev/null; then log "a power-key wake: lighting the lock screen" omamobile-keys wake >/dev/null 2>&1 & fi diff --git a/packages/omamobile-shell/test/sleepd.sh b/packages/omamobile-shell/test/sleepd.sh index 6369fddb2..e79ac494f 100755 --- a/packages/omamobile-shell/test/sleepd.sh +++ b/packages/omamobile-shell/test/sleepd.sh @@ -47,6 +47,7 @@ reset() { echo 0 >"$t/sys/power/suspend_stats/success"; echo 0 >"$t/sys/power/suspend_stats/fail" printf ' 145: 3 0 s2mpg12-pmic 0 Edge rtc-alarm0\n' >"$t/proc/interrupts" printf ' 111: 76 1 gpa10 0 Edge KEY_POWER\n' >>"$t/proc/interrupts" + printf ' 59: 12 0 gpa4 0 Edge Power\n' >>"$t/proc/interrupts" rm -f "$t/wake_irq" "$t/sys/power/pm_wakeup_irq" "$t/on_resume" "$t/now_at" "$t/off_at" "$t/active" "$t/home/.local/state/omarchy/indicators/stay-awake" } # Watch until the fake clock reaches 1000 + $1. @@ -124,6 +125,9 @@ grep -c '^omamobile-keys' "$t/log" >/dev/null && fail "an RTC wake doesn't light reset; echo 111 >"$t/wake_irq"; printf 'echo 0 >"%s"; echo true >"%s"\n' "$t/sys/class/backlight/panel/bl_power" "$t/dpms" >"$t/on_resume"; watch 700 grep -c '^omamobile-keys wake' "$t/log" >/dev/null || fail "a power-key wake asks omamobile-keys to light the PIN pad" grep -c 'a power-key wake: lighting the lock screen' "$t/out" >/dev/null || fail "the power-key wake is logged" +# The Pixel 9a's device tree labels the key "Power", not KEY_POWER. +reset; echo 59 >"$t/wake_irq"; printf 'echo 0 >"%s"; echo true >"%s"\n' "$t/sys/class/backlight/panel/bl_power" "$t/dpms" >"$t/on_resume"; watch 700 +grep -c '^omamobile-keys wake' "$t/log" >/dev/null || fail "a power-key wake labelled Power (the 9a) lights the PIN pad" # A failed suspend is logged and retried no sooner than 30 s later. reset fake systemctl 'echo "systemctl $* at $(cat "$T/clock")" >>"$T/log" diff --git a/packages/omamobile-shell/version b/packages/omamobile-shell/version index 00c8f41d5..8d671b69b 100644 --- a/packages/omamobile-shell/version +++ b/packages/omamobile-shell/version @@ -1 +1 @@ -0.2.65 +0.2.68