Skip to content

omamobile-keys: the power key as Android's on the Pixel 7, behind OMAMOBILE_POWER_KEY_ANDROID - #577

Merged
derekross merged 17 commits into
derekross:mainfrom
angelrenefm:power-key-as-android
Nov 16, 2026
Merged

derekross merged 17 commits into
derekross:mainfrom
angelrenefm:power-key-as-android

Conversation

@angelrenefm

@angelrenefm angelrenefm commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What

The power key as Android's, behind a switch: OMAMOBILE_POWER_KEY_ANDROID=1, which only device-panther sets (environment.d, as OMAMOBILE_ROTATION_HOLD). This is shared code, so with the switch off (every other phone) omamobile-keys puts back the three functions it changes, wake_locked, long_press and short_press, word for word from main.

With the switch on, these changes, each with its measurement in its commit message:

  • A short press on an unlocked phone powers the panel off first (DPMS) and locks behind it; the brightness comes back only once bl_power reads 4 (the lock screen lit for a moment before going dark).
  • Where the shell has a screenOff call (a 200 ms fade), it gets it first; without it the panel goes off at once.
  • A locked phone wakes on the key's press, not its release.
  • Presses run one at a time (flock, at most 4 s); a held press wakes once and its release clears the long-press mark.
  • The wake decides by bl_power (a file read, screen_off as the fallback) and asks for the panel first: the wake starts 30 ms after the press and asks for the panel at 44 ms (about 100 ms and 170 ms before).
  • Quick presses count: 3 of 13 were dropped as bounces; timed from the release with a 0.3 s debounce, 33 of 33 act.
  • A press while the phone is turning off (about 2 s) wakes it back at once, locked, instead of being lost.

The last commit adds the switch.

Tested

  • test/all on main (4130e51) with this branch: omamobile-shell 332 ok, 0 not ok; omamobile-device-panther 19 ok.
  • 12 Nov: the 0.2 s omamobile-sleepd poll is dropped (2a3658f). Measured on the Pixel 7, power-key wake from a real s2idle sleep to the lit lock: 0.66 s with it, 0.70 s and 0.76 s without it. logind's resume signal already ends the watcher's pause, so omamobile-sleepd is back to main's.
  • test/keys.sh now runs twice, switch off and on. A new check tells the two apart (the fade to black comes before the lock only with the switch on); forcing the switch the wrong way inside omamobile-keys makes it fail both ways. device-panther's test fails without the file and with the switch at 0.
  • On a Pixel 7 (panther), daily use since 6 Nov: the nine commits, without the switch (the same code as the switch on), from a package built from my branch, with a timing log on the phone for the numbers above. Hyprland and omamobile-sleepd there read environment.d (both have OMAMOBILE_ROTATION_HOLD=1).

Not checked

  • The switch on the phone itself: the Pixel 7 runs the code unconditionally, not this branch's package.
  • Any phone other than the Pixel 7 with the switch on.
  • Nothing tests the power key's timing; the tests check what is called and in what order.

I used AI help (Claude) to work on this.

@derekross

Copy link
Copy Markdown
Owner

Thank you, this is careful work, and the commit messages with the measured timings make each change easy to follow. I checked that the switch really leaves every other phone alone: I sourced main's and your omamobile-keys with the variable unset and compared the function definitions. Apart from the two new helpers (panel_dark, unused when off, and a pass-through serially), everything is identical to main, and each new branch in the key handler is behind android_power == 1. The 4 s bound on the lock is good too.

Three things before merge:

  1. Versions. Neither omamobile-shell nor omamobile-device-panther is bumped, so no phone would pick this up. I'll set them when I merge (shell 0.2.109 and panther 0.1.14 are free today) and name both in the title.
  2. omamobile-shell: serialize overlapping power-key actions #508. That PR serialises short_press for every phone with its own lock, and it conflicts with yours in omamobile-keys. Because your switch-off branch is a copy of today's main, whichever PR lands second has to rebuild that copy from the other. Otherwise the shared default either loses omamobile-shell: serialize overlapping power-key actions #508 or the Pixel 7 ends up with two locks. If omamobile-shell: serialize overlapping power-key actions #508 lands first, please rebase and make the off branch exactly omamobile-shell: serialize overlapping power-key actions #508's functions. I'll tell omamobile-shell: serialize overlapping power-key actions #508's author the same.
  3. One run of this package on your Pixel 7. So far it has run there unconditionally, from your own build, and the new part here is the switch arriving through environment.d. Could you install this branch's packages and post:
    • pacman -Q omamobile-shell omamobile-device-panther;
    • the variable in both systemctl --user show-environment and Hyprland's environment;
    • a few presses: lit, dark, a quick double, and one while it's going off;
    • a tools/phone-smoke report.

Smaller things, none blocking: please note in the environment.d comment that this order (panel off, then lock) is the reverse of what the shared default does on purpose, which is why it stays off on the other phones for now. And a short English paraphrase next to the quoted reports would help later readers.

A short press on an unlocked phone dims the panel to 0, locks behind it,
turns the display off and puts the brightness back for the next wake. On a
Pixel 7 the panel goes off about 0.4 s after the DPMS dispatch (bl_power
then reads 4), and the brightness came back before that, lighting the lock
screen for a moment before the screen went dark. It now waits for bl_power
to read 4 (at most 1.5 s). Measured on the phone every 20 ms: brightness 0
at 0.62 s, panel off at 1.99 s, brightness back at 2.02 s; before, back at
1.61 s with the panel still on until 1.97 s.

I used AI help (Claude) to work on this.
The backlight at 0 only dimmed a Pixel 7's OLED: the screen went dim, the
lock showed through it, and only then did the screen go off. The press now
powers the panel off first (DPMS), with the backlight at 0 for a panel DPMS
doesn't reach, and takes the lock behind it, as Android goes dark at once.

I used AI help (Claude) to work on this.
A shell with omamobile.home's screenOff call (the Pixel layer's 200 ms fade)
gets it before the panel goes off; without it the call fails and the panel
goes off at once, as before.

I used AI help (Claude) to work on this.
Android wakes on the key's press, not its release, so the screen answers
the press itself; the release then does nothing.

I used AI help (Claude) to work on this.
Repeated presses ran over each other (a wake under a going-to-sleep), and a
held press woke the phone on the way down and again at the long-press
mark, then left its mark behind so the next short press within 5 s was
swallowed. Each press's work now waits for the one before (flock, at most
4 s), a long press neither wakes a lit screen nor a phone its press woke,
and its release clears the mark.

I used AI help (Claude) to work on this.
Measured on the phone with a timing log: a press that woke the phone took
about 100 ms to decide (screen_off and locked ask Hyprland and the shell)
and asked for the panel some 170 ms after the press, behind the lock's
wake and the reveal. It now decides by the panel's bl_power (a file read,
with screen_off as the fallback where bl_power stays 0) and asks for the
panel first, the rest happening while it comes on (about 270 ms): the
wake starts 30 ms after the press and asks for the panel at 44 ms.

I used AI help (Claude) to work on this.
The watcher noticed a resume only on its next poll, and the phone freezes it
mid-pause while asleep with the pause's clock not counting the sleep: up to
2 s (5 s idle) between the press that woke the phone and the lit lock
screen (Ángel, 6-nov: the power key's quicker wake didn't show after a
while off). Asked to sleep and not yet seen to wake, it now polls every
0.2 s, until a retry is due. omamobile-keys' wake from sleep uses the quick
bl_power check as the press's own wake does. test/sleepd.sh's fake clock
moves a whole second for a sub-second pause.

I used AI help (Claude) to work on this.
Measured with a timing log on the phone: of 13 quick presses, 3 were thrown
away as bounces. A press that had woken the phone wrote its time once its
wake was done (half a second later), and the next press came within the
0.8 s debounce of that. Presses are now timed from the key's release, and
the debounce is 0.3 s, enough for a bounce now that presses run one at a
time. Measured again: 33 presses, every one acted on.

I used AI help (Claude) to work on this.
Measured with a timing log on the phone: turning an unlocked phone off
takes about 2 s (the reveal, the lock, the panel going off), and a press
in that time was queued behind it and lost (Ángel, 6-nov: slow to light).
As Android's, such a press now wakes the phone back at once, locked: the
press marks it, and each step of the turning off looks and stops, puts
the brightness back, takes the lock if it isn't yet, and wakes.

I used AI help (Claude) to work on this.
…KEY_ANDROID=1

The commits before change shared code every phone runs. Off, the shared
default, omamobile-keys puts back the three functions they changed
(wake_locked, long_press, short_press) word for word from before, a press
doesn't wait for the one before, the press doesn't wake on the way down,
and omamobile-sleepd keeps its poll. device-panther turns it on through
environment.d, as OMAMOBILE_ROTATION_HOLD.

test/keys.sh and test/sleepd.sh run both ways; a new check tells them
apart (the fade to black before the lock), and fails with the switch
forced either way. device-panther's test fails without the file or with
the switch at 0.
@angelrenefm

Copy link
Copy Markdown
Contributor Author

Thanks. #508 landed first, so this is rebased onto it:

  • With the switch off, the release runs omamobile-shell: serialize overlapping power-key actions #508's block exactly (released_at, flock -w 5 on short.lock, ( short_press "$released_at" ) {short_lock}>&-), and the off copy of short_press is omamobile-shell: serialize overlapping power-key actions #508's. Sourcing main's and this branch's omamobile-keys with the variable unset and comparing declare -f, the only differences are still panel_dark and the pass-through serially.
  • With the switch on, the release goes through serially only, so the Pixel 7 has one lock, not two. The time is taken at the release, as omamobile-shell: serialize overlapping power-key actions #508 does.
  • test/power-overlap.sh runs with the variable unset. keys.sh and sleepd.sh run with it unset and with it at 1. All pass, and the panther tests pass too.
  • The environment.d comment now says the order (panel off, then lock) is the reverse of the shared default's on purpose, and that this is why it stays off on the other phones for now.
  • The two quoted reports have an English paraphrase next to them (one new commit).

The run on the Pixel 7 is still to come: the phone is away from me today. I'll post it here with everything you asked for.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel, the rebase is exactly what I asked for. I repeated the comparison on today's main, which now has #508: with the variable unset, the function definitions are identical apart from the unused panel_dark and the pass-through serially, and every difference in the key handler is behind android_power == 1. With the switch on there is one lock, bounded at 4 s. The environment.d comment and the English paraphrases are good too. CI is green.

So the only thing left is the run on your Pixel 7 with this branch's packages, whenever the phone is back with you:

  • pacman -Q omamobile-shell omamobile-device-panther;
  • the variable in systemctl --user show-environment and in Hyprland's environment;
  • a few presses: lit, dark, a quick double, and one while it's going off;
  • a tools/phone-smoke report.

Three small things you could look at in the same run, none of them blocking:

  1. A double tap on the screen during the two seconds it's going off. double-tap and dark-unlocked don't go through serially, so they can still overlap with a press's work. It's the same in the shared default, so I'm only asking what you see.
  2. A press on a phone that is dark but not locked yet: the press wakes with the lock's wake either way. Does it come up as you expect?
  3. test/keys.sh in the second run now reads the test machine's own /sys/class/backlight/*/bl_power through panel_dark (its comment still says it isn't consulted). A root override like OMAMOBILE_SLEEP_SYSFS in omamobile-sleepd would keep the host out of it. A follow-up is fine.

I'll set the versions (omamobile-shell and device-panther 0.1.14) and the title when I merge.

@angelrenefm

Copy link
Copy Markdown
Contributor Author

The run on my Pixel 7 with this branch's packages (head 48ec440), built on the phone with makepkg (the shell's check(): 320 ok, none failed).

$ pacman -Q omamobile-shell omamobile-device-panther
omamobile-shell 0.2.113-1
omamobile-device-panther 0.1.13-1

After restarting the session (18:04 local), the variable is in both places:

  • systemctl --user show-environment: OMAMOBILE_POWER_KEY_ANDROID=1
  • Hyprland's environment (/proc/$(pidof Hyprland)/environ): OMAMOBILE_POWER_KEY_ANDROID=1

Presses, in this order, a few seconds apart: a short press with the screen lit and unlocked, a short press with it dark, a quick double press, a press while it was going off, a double tap on the screen during those two seconds (your point 1), and a press with the screen dark but not locked yet (your point 2). I reported that every one behaved as expected: lit → locked and dark, dark → awake on the lock screen, and no stuck or doubled state in the quick cases. Point 2 comes up as I expect: it wakes to the lock screen.

While I pressed, a recorder on the phone logged the panel state every 150 ms, and the journal has the presses. A short excerpt (local time):

18:08:57  shell: lock-requested → session-locked=true, secure=true
18:08:57.6  bl_power=4 (panel off)
18:09:07  Power key pressed short → wake dark-was=true; 18:09:07.8 bl_power=0
18:09:11  Power key pressed short → dark locked=true
18:09:12  Power key pressed short → wake dark-was=true; bl_power=0 at 18:09:12.5
18:09:15  Power key pressed short → dark; 18:09:16.9 wake
18:09:19  Power key pressed short → dark; 18:09:20.6 wake

Every press has one action in the shell's log, and there are no errors or warnings from the keys or the lock in the journal for the whole run, only Omarchy's existing Service.qml:554/555 binding warnings.

Your point 3 (test/keys.sh reading the host's bl_power): I'll send that as a follow-up with an override like OMAMOBILE_SLEEP_SYSFS, so it doesn't hold this one up.

phone-smoke: panther

Kernel 7.3.0-rc6-omamobile-push1-g44048a9aa795, tools at 48ec440e, 2026-11-11T17:04Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g44048a9aa795, slot b, up 168140s
storage guard (required) ok 55 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 93G free
kernel health (required) ok no oops or BUG; 0 WARN, 0 error lines in dmesg (0 known, 0 new)
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card2-DSI-1 connected, 1080x2400
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked true)
touch ok FocalTech FT3658
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 89% Discharging, 32 °C
sound cards ok googleaocsndcar
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 59 °C

Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.16-1, omamobile-device-panther 0.1.13-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 1:0.1.32-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.113-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

I used AI help (Claude) to work on this.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel. The run is what I asked for: the two package versions, the variable in both environments, the presses with their bl_power times, the two extra cases, and the smoke report. That settles the last open point from my side.

Main moved under this in the meantime: #640 (the brightness comes back only once the panel is off, measured on the Pixel 8 Pro) and #642 (omamobile-sleepd hears the resume from logind) both landed in omamobile-keys and omamobile-sleepd. GitHub shows one conflict, in test/all, but I merged your head onto today's main by hand and there is more to it:

  1. panel_dark now exists twice. Main's takes the backlight device and reads the panel's state from bl_power or the connector's dpms, under an OMAMOBILE_KEYS_SYSFS root for the tests. Yours has the same name and no argument. Git puts main's panel_dark and wait_screen_off inside your switch-off block, because that block is a copy of the old short_press. So with the switch off main's version replaces yours, and with it on yours stays and wait_screen_off doesn't exist. Please keep one, main's, called with the device, and define it and wait_screen_off above the switch so both modes share them.
  2. Your first commit is on main now as wait_screen_off. The Android short_press still has its own loop on /sys/class/backlight/$device/bl_power, and on the merge OMAMOBILE_POWER_KEY_ANDROID=1 test/keys.sh fails main's new check ("flash: the saved brightness goes back only after the panel is off"), because the loop reads the real /sys and not the test's. Calling wait_screen_off "$device" there fixes it, and it also covers the point about the test reading the host's bl_power, so no follow-up is needed for that.
  3. The switch-off block is main's functions again, word for word. Main's short_press now calls wait_screen_off. Git's own merge got this right (with the variable unset, the functions are identical to main's apart from the pass-through serially, and all three tests pass), but please repeat the declare -f comparison on your rebased head.
  4. The 0.2 s poll in omamobile-sleepd. omamobile-sleepd: notice a resume when logind says so, not at the next poll #642 ends the watcher's wait as soon as logind announces the resume, on every phone, which is the same delay your commit measured. Could you check on your Pixel 7 whether the fast poll still makes a difference with omamobile-sleepd: notice a resume when logind says so, not at the next poll #642 in? If it doesn't, please drop that commit and its change to the test's sleep, so there's one mechanism. If it does, keep it and say what you measured.
  5. test/all: keep main's new lines (home-command.sh, reboot-command.sh, Back's surfaces) and your two keys.sh runs.

After the rebase, a short check on the phone is enough, no second smoke report: pacman -Q for the two packages, a press on a lit phone (the lock screen doesn't light before it goes dark), and a power-key wake from a sleep.

I'll set the versions and the title when I merge. Thanks for the patience with a moving base.

…ey-as-android

One panel_dark, main's, with the backlight device, defined with
wait_screen_off above the switch so both modes share them; the Android
short_press waits with wait_screen_off instead of its own loop on the real
/sys, so main's flash check passes with the switch on too. The quick wake
check falls back to screen_off, as the Android press's did. test/all keeps
main's new lines and runs keys.sh with the switch off and on.

I used AI help (Claude) to work on this.
@angelrenefm

Copy link
Copy Markdown
Contributor Author

Thank you for doing the merge by hand and laying it out. Updated (87b444a; a merge of today's main into the branch, since I couldn't force-push from here):

  1. One panel_dark, main's, called with the device. It and wait_screen_off are now defined above the switch, so both modes share them; my copy without an argument is gone. The two quick wake checks call panel_dark "$(omarchy-hw-display)" || screen_off, keeping the Hyprland fallback the Android press had.
  2. The Android short_press calls wait_screen_off "$device" instead of its own loop on the real /sys. With the switch on, main's "flash: the saved brightness goes back only after the panel is off" passes, and the test no longer reads the host's bl_power, so there's no follow-up for that.
  3. The declare -f comparison on this head, with the variable unset, against today's main (4130e51): the only function that differs is the pass-through serially. In the key handler, every difference is behind android_power == 1.
  4. The 0.2 s poll in omamobile-sleepd: not measured yet. It needs power-key wakes from sleep on the Pixel 7, with and without the commit, and the phone isn't in my hands today. I'll measure it and either drop the commit with its test change or say what I measured.
  5. test/all keeps main's new lines (home-command.sh, reboot-command.sh, Back's surfaces) and runs keys.sh with the switch off and on.

On my PC: keys.sh passes with the switch off (8 ok) and on (8 ok), and test/all passes (339 ok). The short phone check you asked for (pacman -Q, a press on a lit phone, a power-key wake from a sleep) comes with point 4.

I used AI help (Claude) to work on this.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel. I went through the merged head (87b444a) against today's main, with the switch off and on:

  • Off, it is main. With the variable unset, the functions the script defines are main's word for word; the only extra is the pass-through serially, and every added line in the key handler is behind android_power == 1. omamobile-sleepd takes main's pause.
  • One panel_dark, main's, defined with wait_screen_off above the switch, and your three call sites pass the device. The Android short_press waits with wait_screen_off "$device".
  • The clock is main's now (date +%s%N) everywhere, so omamobile-shell 0.2.126: the power key's one-second wait is timed with a clock that is right everywhere #688's check passes.
  • Tests: keys.sh and sleepd.sh pass here with the switch off and on, power-overlap.sh with it off, and CI is green. I also ran two presses 0.2 s to 2.5 s apart with the switch on: the screen ends lit at the saved brightness every time.

So what's left is what you already named: the 0.2 s poll in omamobile-sleepd measured on your Pixel 7 now that #642 ends the wait on logind's resume signal (drop the commit and its change to the test's sleep if it no longer makes a difference, or keep it with what you measured), together with the short check on this head: pacman -Q for the two packages, a press on a lit phone, and a power-key wake from a sleep. The check matters a little more than before, because the Android path now reads the panel through main's panel_dark and waits at most 1 s where your own loop allowed 1.5 s.

One nit while you're in the file: the comment above that wait still says "At most 1.5 s".

I'll set the versions (omamobile-shell and device-panther) and the title when I merge. No hurry; whenever the phone is back in your hands.

@angelrenefm

Copy link
Copy Markdown
Contributor Author

Thank you for going through it, and for the two-press check. The comment is fixed in 2c075e9: it now says at most 1 s, from wait_screen_off. The measurement of the 0.2 s poll and the short check on the phone come as soon as the phone is back with me.

I used AI help (Claude) to work on this.

Measured on the Pixel 7 (12 Nov), power-key wake from a real s2idle sleep
to the lit lock screen (bl_power 0), the press timed from the key's evdev
event: with the 0.2 s poll 0.66 s (1 wake), without it 0.70 s and 0.76 s
(2 wakes). Without the poll it could have taken up to 2 s more; it didn't,
because logind's PrepareForSleep(false) already ends the watcher's pause at
once (test/sleepd.sh checks that). The poll added nothing, so
omamobile-sleepd, its test and test/all's sleepd line are back to main's.

I used AI help (Claude) to work on this.
@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel. I went through the two new commits:

  • The poll is gone, and omamobile-sleepd, its test and the sleepd line in test/all are main's again, byte for byte. Your numbers (0.66 s with it, 0.70 s and 0.76 s without) are what I hoped omamobile-sleepd: notice a resume when logind says so, not at the next poll #642 would give, so there is one mechanism now on every phone. Thank you for measuring before deciding.
  • The comment says 1 s.
  • Apart from those two comment lines omamobile-keys is what I compared yesterday, so with the switch off it is still main's, and CI is green on this head with today's shell underneath.

Two lines are left from the short check I asked for, and then I'll merge:

  1. pacman -Q omamobile-shell omamobile-device-panther from the phone that made the sleep measurements, so I know they ran this head's package.
  2. A short press on a lit, unlocked phone on this head: does the lock screen stay dark while the panel goes off? That is the case your first commit fixed, and it is the one that changed underneath you, since the press now waits through main's wait_screen_off (at most 1 s, where your own loop allowed 1.5 s).

Two leftovers while you're there, only if you push again: the environment.d file's comment and the panther README still say the variable is read by omamobile-sleepd too.

I'll put the two version numbers on your branch as one commit on top just before I merge, and write the commit message from your commits, with the measurements.

omamobile-sleepd no longer reads OMAMOBILE_POWER_KEY_ANDROID since its
0.2 s poll went (2a3658f): the environment.d file's comment and the README
named it still.

I used AI help (Claude) to work on this.
@angelrenefm

Copy link
Copy Markdown
Contributor Author

Thank you, Derek. Both checks, on the Pixel 7 that made the sleep measurements:

  1. The packages, built on the phone from this head (2a3658fd):

    $ pacman -Q omamobile-shell omamobile-device-panther
    omamobile-shell 0.2.126-1
    omamobile-device-panther 0.1.14-1
    

    /usr/bin/omamobile-keys on the phone has the same md5 as packages/omamobile-shell/bin/omamobile-keys at 2a3658fd (adaf1250…). One honest note: the shell package was built with --nocheck. In the phone's full test/all, test/power-overlap.sh failed twice in a row ("delay 1 produced wrong screen state or brightness", after "short-press lock wait failed; dropping press"); it runs with the switch unset, so it is main's code path. I narrowed it down: on the same phone it passes alone (5 of 5), alone with all eight cores busy (9 of 9), alone inside makepkg's check() (3 of 3), and in the whole test/all run outside makepkg (every check ok). It fails only in the whole test/all inside makepkg (2 of 2), so it isn't load and it isn't this branch; I haven't found what that combination leaves behind. The other 335 checks passed. device-panther was built with its tests (all ok).

  2. A short press on a lit, unlocked phone (home screen), recorded (screen, panel and journal with real time):

    t (ms from the press)
    0 power down
    100 power up
    583 brightness 0 (the fade to black ends)
    617 lock requested
    923 bl_power 4
    1046 DPMS off
    1160 session locked

    The lock is asked for only after the screen is black, and no frame of the recording shows the lock screen: the home screen fades to black and stays black. That press came from a virtual key (uinput); I repeated it with the physical button, twice, each from the unlocked home screen:

    t (ms from the press) physical 1 physical 2
    brightness 0 588 647
    lock requested 625 673
    bl_power 4 920 978
    DPMS off 1035 1090
    session locked 1180 1430

    Same order, and again no frame with the lock screen; a short press on the dark phone then woke it on the lock each time.

The two leftovers (the environment.d comment and the panther README still naming omamobile-sleepd) are fixed in 657c88a, pushed; comments only, test/all of device-panther still ok.

I used AI help (Claude) to work on this.

@angelrenefm

Copy link
Copy Markdown
Contributor Author

For the squash message: these commits were written with Claude Opus 5.5, so the trailer CONTRIBUTING asks for is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>. I've left the branch as you reviewed it.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel, and thank you for the care in that last check. The pacman -Q line plus the md5 of the installed omamobile-keys ties the sleep measurements to this head, and the three timed presses (one virtual, two on the button) show the order I was hoping for: black first, then the lock, and no frame with the lock screen. The two comments are fixed too, and nothing on main has touched these files since, so this is ready.

One thing I have to ask of you after all: I said I'd put the version numbers on your branch myself, but I can't push to your fork from here. Could you push one commit on top (no rebase or amend needed) that sets:

  • packages/omamobile-shell/version to 0.2.132
  • packages/omamobile-device-panther/version to 0.1.16

Those are the next free numbers on main today. If another shell pull request takes 0.2.132 before I merge, I'll tell you the next one. Once CI has run on that push I'll merge and write the commit message from your commits and measurements, with the trailer you gave.

Thank you also for the honest note about test/power-overlap.sh failing inside makepkg on the phone. It runs with the switch unset, so that's main's code, not your branch; I'll open an issue for it with your narrowing.

The version numbers for this pull request. omamobile-shell takes 0.2.133
because derekross#425 took 0.2.132 on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@angelrenefm

Copy link
Copy Markdown
Contributor Author

Done: packages/omamobile-device-panther/version is now 0.1.16. omamobile-shell is 0.2.133, because #425 took 0.2.132 on main a minute after your comment. The two version files now conflicted with main, so I merged main into the branch rather than rebasing. Your reviewed commits are unchanged, and the only diff against main is this PR plus the two numbers. test/keys.sh (8/8) and device-panther's test/all (19/19) pass on the merged head.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Ángel, and thank you for catching that #425 had taken 0.2.132 in the meantime. 0.2.133 and 0.1.16 are both free, your merge of main changed nothing of the pull request itself, and CI is green on the merged head, so I'm merging it now, with the commit message written from your commits and measurements and the trailer you gave.

@derekross
derekross merged commit 49d7abe into derekross:main Nov 16, 2026
2 checks passed
nesmeck added a commit to nesmeck/omarchy-mobile that referenced this pull request Nov 16, 2026
derekross#577 takes 0.1.16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants