Skip to content

omamobile-device-tegu 0.2.5: the Wi-Fi sleep hook checks in the background, so the lock screen lights on the first press - #275

Closed
W4HO-ham wants to merge 1 commit into
derekross:mainfrom
W4HO-ham:device-tegu-wake-fast
Closed

W4HO-ham wants to merge 1 commit into
derekross:mainfrom
W4HO-ham:device-tegu-wake-fast

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

After a power-key wake, the palmtop's lock screen came up about 1.2 s late, so it looked like the first press did nothing and I pressed again. The journal of that wake (12:37 today) shows why: the kernel resumed at 12:37:12.47, but systemd-sleep thawed user.slice only at 13.62, and sleepd lit the lock screen right after. In between, the Wi-Fi sleep hook's post was waiting in wifi_up for brcmfmac to re-probe the BCM4383 ("device lost its state in sleep, probing again", firmware loaded at 13.40). user.slice stays frozen until every hook returns, so the whole desktop waited for Wi-Fi.

With the keep flag set, post now hands that check to a transient unit (systemd-run --no-block --collect --unit=omamobile-tegu-wifi-check "$0" check) and returns. The check does what post did: nothing if Wi-Fi is back, or the fallback (log, unload, reload, unload around sleeps for the rest of the boot) if it isn't. Without the flag, or after a fallback, post still reloads in place as before.

Tested on the palmtop (7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, this change on top of #238's 0.2.4 so nothing else on it changed): one 30 s systemctl suspend with an RTC alarm. System returned at 13:42:12.80, user.slice thawed at 13.04 (0.24 s, against 1.1 s before), the check unit started at 12.92 and ended cleanly at 13.97 with Wi-Fi back, and dmesg showed no UFS link or I/O errors. test/sleep-hooks gains a line that the kept case goes through systemd-run; test/all and tools/pr-check pass.

The version is 0.2.5 because #238 holds 0.2.4; set whatever is free at merge.

…round, so the lock screen lights on the first press

After a power-key wake the lock screen came up about 1.2 s late, so a second press seemed needed. The Wi-Fi hook waited in post for brcmfmac's probe (about a second) while user.slice stayed frozen. The kept case now runs that check as a transient unit.
@derekross derekross closed this in 3387707 Nov 1, 2026
@derekross

derekross commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Landed on main as 3387707 (squashed, authored by you). My review notes from before the merge, for the record:

Thank you, this is a nice catch. Following the late lock screen from the journal to user.slice waiting on the Wi-Fi hook's probe check is good detective work, and moving only the kept case's check into a transient unit is the smallest change that fixes it. The 0.24 s against 1.1 s from the same journal points, the UFS check after the wake, and the test that the kept case goes through systemd-run are all what I'd want to see. I ran the package tests on this merged with #238 and they pass.

I'll merge #238 first and then this one. The only conflict is the version file, which I'll resolve to 0.2.5, so nothing to do there.

One small thing worth thinking about, not blocking: the check used to finish before the hook returned, so a new sleep couldn't start while it ran. Now, if Wi-Fi didn't come back, the check waits up to 20 s and then unloads and reloads brcmfmac, and a systemctl suspend in that window would start a sleep while rmmod or modprobe runs. That needs a lost Wi-Fi and a quick second sleep, so it's rare, but if you'd like to close it, pre could wait briefly for a running check first, for example:

  pre)
    timeout 30 sh -c 'while systemctl -q is-active omamobile-tegu-wifi-check; do sleep 0.2; done' || true

Happy to take that as a follow-up whenever it suits you.

derekross pushed a commit that referenced this pull request Nov 2, 2026
…ing (#307)

The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to.

- **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel #178 on #156, both in review) and brcmfmac (kernel #56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after #178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did.
- **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (#268, #275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, #284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word.
- **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel #125's boot, which also checks the panel ID).
- **Charging, Haptics, Torch, NFC:** kernel #161, #96, #104 and #105 are merged.
- **USB net:** the rescue also handles a replug the gadget didn't see (#280).

The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel #99), the panel ID (kernel #125), the RTC without the PMIC interrupt (kernel #55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers.

Closes #307

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…round (derekross#275)

After a power-key wake the lock screen lit about 1.2 s late, because
user.slice stays frozen until every sleep hook returns and the Wi-Fi
hook's post waited for brcmfmac to re-probe the BCM4383. With the
keep-across-sleep flag set, post now hands that check to a transient
unit (systemd-run --no-block --collect) and returns; the check does what
post did, including the fallback. Without the flag, or after a fallback,
nothing changes. Tested on the palmtop: user.slice thawed 0.24 s after
resume instead of 1.1 s, the check unit ended cleanly with Wi-Fi back,
and dmesg showed no UFS errors.

Closes derekross#275

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ing (derekross#307)

The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to.

- **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (derekross#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel derekross#178 on derekross#156, both in review) and brcmfmac (kernel derekross#56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after derekross#178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did.
- **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (derekross#268, derekross#275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, derekross#284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word.
- **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel derekross#125's boot, which also checks the panel ID).
- **Charging, Haptics, Torch, NFC:** kernel derekross#161, derekross#96, derekross#104 and derekross#105 are merged.
- **USB net:** the rescue also handles a replug the gadget didn't see (derekross#280).

The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel derekross#99), the panel ID (kernel derekross#125), the RTC without the PMIC interrupt (kernel derekross#55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers.

Closes derekross#307

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