Skip to content

device/tegu SLEEP-PLAN: link the S1 bring-up modules' source, and correct the one-second sleeps - #256

Closed
W4HO-ham wants to merge 4 commits into
derekross:mainfrom
W4HO-ham:tegu-sleep-links
Closed

W4HO-ham wants to merge 4 commits into
derekross:mainfrom
W4HO-ham:tegu-sleep-links

Conversation

@W4HO-ham

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

Copy link
Copy Markdown
Contributor

As you asked on #244: the source of tegu-wdt-s2idle and tegu-pmic-wakeread is in one commit on my kernel fork, e761ba793 on tegu-sleep-bringup-modules, under bringup/tegu-sleep/ with a README. It says the watchdog module isn't a way to catch the hang, and that anything like it needs a runbook entry first. Both SLEEP-PLAN paragraphs now link it. Neither module is on the palmtop now; they were loaded from /tmp and are gone after the resets.

The AGENTS correction about the short sleeps will come as its own PR once I've measured the real length of the earlier 30-minute sleeps from the palmtop's journal. tools/pr-check passes.

Both modules (the watchdog through s2idle and the PMIC wake read) are now in a not-for-merge commit on the owner's kernel fork, as asked on derekross#244.
The one-second sleeps were dmesg deltas, and the kernel log's clock stops while the SoC is suspended. The RTC shows full-length sleeps, so the core power-down hook (derekross#255) is withdrawn, and S1's wake counts stand.
@W4HO-ham W4HO-ham changed the title device/tegu SLEEP-PLAN: link the S1 bring-up modules' source device/tegu SLEEP-PLAN: link the S1 bring-up modules' source, and correct the one-second sleeps Nov 1, 2026
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

I've added a correction to this PR. The "sleeps were short" paragraphs that merged with #244 were my measurement error: I took each sleep's length from dmesg, whose clock stops while the SoC is suspended. The RTC shows full-length sleeps (details on #255, which I've closed). The paragraphs are replaced by one correction paragraph that says what was wrong, what the PMIC readings really show, and how to measure a sleep (the RTC). So S1's wake counts and the AGENTS gotcha stand, and no AGENTS PR is needed.

@derekross

Copy link
Copy Markdown
Owner

Thank you for this, and for the correction. Linking the modules' source was what I asked for on #244. I read e761ba793: both modules carry their SPDX line, and the README says the watchdog module isn't a way to catch the hang and needs a runbook entry before it runs again. The correction is the more useful part. A dmesg delta across s2idle leaves out the sleep, because the kernel's clock stops while the SoC is suspended. I took the one-second figure at face value too, so thank you for checking it against the RTC and saying plainly what changed. It's right that no AGENTS change is needed.

Two small things in the new paragraph on the thirty 120 s sleeps:

  1. The count. "118-123 s, 28 of them; one lasted 106 s, one 112 s and one 64 s" adds up to 31, not 30. Could you check which number is off?
  2. The 64 s sleep. The paragraph says all thirty "woke on the alarm (IRQ 56)", but IRQ 56 is the S2MPG14's line, which other PMIC events share, and a 120 s alarm can't fire at 64 s. If you have that wake's rtc-alarm0 count or INT2 reading, please say what woke it. If not, "woke on the PMIC line" fits better for that one. The 7 Pro has early PMIC wakes like this too (AGENTS lists them under suspend), so it's worth counting rather than folding into the alarm wakes.

Once those two are fixed, this is ready to merge.

…h, and three woke early on the PMIC line

The count said 28 and added up to 31. IRQ 56 is the S2MPG14's line, shared with other PMIC events, and the series kept no alarm count, so the 64, 106 and 112 s sleeps are early PMIC wakes, not alarm wakes.
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Both fixed in 497085e. The count was off by one: 27 sleeps lasted 118-123 s, not 28, so with the 106, 112 and 64 s ones it's thirty. The series recorded only the wake IRQ, not the rtc-alarm0 count or INT2, so I can't say what woke those three. The paragraph now says all thirty woke on the PMIC line (IRQ 56, which the alarm shares), that 27 match the alarm's time, and that the three short ones count as early PMIC wakes, as on the 7 Pro.

@derekross derekross closed this in dab156a Nov 1, 2026
@derekross

derekross commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

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

Thanks, that's exactly it. 27 + 3 is thirty now, and saying plainly that the series recorded only the wake IRQ, so the three short sleeps count as early PMIC wakes rather than alarm wakes, is the honest reading. I've nothing else on this one and will merge it.

(The red "Tests" job on this run is a timing-sensitive check in the audio package's speaker watchdog, which this PR doesn't touch. I'll re-run it before merging.)

derekross added a commit that referenced this pull request Nov 2, 2026
#315)

The test set the "measured" 33 C 0.2 s after the watchdog started and
expected its baseline at 0.6 s. On a loaded machine the step sometimes
landed after the baseline was taken, so the watchdog saw 25 -> 41 C
instead of 33 -> 41 C and the test failed for timing alone. It failed
three times on 2026-11-01 (pull requests #256, #313, and main), and it
aborted every nightly development publish, which builds and tests every
package first: pkgs.omamobile.org/development stayed at omamobile-shell
0.2.45. The step now lands at once, the baseline is taken at 1.0 s and
the rise comes at 2.0 s, a second's margin either side. No change to the
watchdog itself.


Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

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
…rect the one-second sleeps (derekross#256)

Links the source of the S1 bring-up modules (tegu-wdt-s2idle and
tegu-pmic-wakeread, one commit on the contributor's kernel fork with a
README saying the watchdog module needs a runbook entry before it runs
again), and corrects the "one-second sleeps": those were dmesg time
differences, and the kernel log's clock stops while the SoC is suspended.
Thirty 120 s sleeps timed by the RTC: 27 lasted 118-123 s and three woke
early on the PMIC line (IRQ 56, shared with the alarm), counted as early
PMIC wakes.

Closes derekross#256

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
derekross#315)

The test set the "measured" 33 C 0.2 s after the watchdog started and
expected its baseline at 0.6 s. On a loaded machine the step sometimes
landed after the baseline was taken, so the watchdog saw 25 -> 41 C
instead of 33 -> 41 C and the test failed for timing alone. It failed
three times on 2026-11-01 (pull requests derekross#256, derekross#313, and main), and it
aborted every nightly development publish, which builds and tests every
package first: pkgs.omamobile.org/development stayed at omamobile-shell
0.2.45. The step now lands at once, the baseline is taken at 1.0 s and
the rise comes at 2.0 s, a second's margin either side. No change to the
watchdog itself.

Claude-Session: https://claude.ai/code/session_01BeEcdVeSfyLCbijF8XQF1d

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