Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fcceab6
device/tegu: SLEEP-PLAN S1 result, the drain is the SoC floor
W4HO-ham Oct 30, 2026
1088286
Merge remote-tracking branch 'origin/main' into sleep-s1-results
W4HO-ham Oct 30, 2026
463598e
Merge remote-tracking branch 'origin/main' into sleep-s1-results
W4HO-ham Oct 30, 2026
510a4e6
device/tegu SLEEP-PLAN: the cable-in method as runbook steps, and the…
W4HO-ham Oct 30, 2026
b265200
device/tegu SLEEP-PLAN, AGENTS: a systemd sleep failed to wake too, s…
W4HO-ham Oct 30, 2026
485be76
device/tegu SLEEP-PLAN: the cable-in probe woke; the no-wake's common…
W4HO-ham Oct 30, 2026
97858da
device/tegu SLEEP-PLAN: the cable-out figure with MIF at 421 MHz in s…
W4HO-ham Oct 30, 2026
80e6659
device/tegu SLEEP-PLAN, NOTES, AGENTS: the no-wake correction reaches…
W4HO-ham Oct 30, 2026
c8d10bf
device/tegu SLEEP-PLAN, AGENTS: the sleep toggle is off on the palmto…
W4HO-ham Oct 30, 2026
6a3a489
device/tegu SLEEP-PLAN: a power-key press didn't wake a sleep with th…
W4HO-ham Oct 30, 2026
d26c4ec
Merge remote-tracking branch 'origin/main' into sleep-s1-results
W4HO-ham Oct 30, 2026
f3047ae
device/tegu SLEEP-PLAN, AGENTS: UFS failed to resume from an s2idle a…
W4HO-ham Oct 30, 2026
5b060af
device/tegu SLEEP-PLAN: five clean s2idle cycles, then a hang off the…
W4HO-ham Oct 31, 2026
eafd4ba
device/tegu SLEEP-PLAN: the failing suspend was the third of its boot…
W4HO-ham Oct 31, 2026
a1a3568
device/tegu SLEEP-PLAN: the four rails have no consumer, so S2 measur…
W4HO-ham Oct 31, 2026
402b5ac
device/tegu SLEEP-PLAN: the failing resume never reached the first DM…
W4HO-ham Oct 31, 2026
4a2d4e5
device/tegu SLEEP-PLAN: a hypothesis for the failed link startup, and…
W4HO-ham Oct 31, 2026
ad50771
Merge remote-tracking branch 'origin/main' into sleep-s1-results
W4HO-ham Oct 31, 2026
bcd35fc
device/tegu SLEEP-PLAN: the register that names an early RTC cycle's …
W4HO-ham Oct 31, 2026
93a9332
device/tegu SLEEP-PLAN: ten clean cycles, and console_suspend=N keeps…
W4HO-ham Oct 31, 2026
da8f759
Merge remote-tracking branch 'origin/main' into sleep-s1-results
W4HO-ham Oct 31, 2026
86623ed
device/tegu SLEEP-PLAN, NOTES, AGENTS: the consistency pass from the …
W4HO-ham Oct 31, 2026
ed02b10
SLEEP-PLAN: S3, ten clean wakes with UFS clock gating off
W4HO-ham Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ Each entry gives the gotcha, then the reason or the fix. Details are in the link
### Suspend and modem

- **On the 9a, NFC must not poll through s2idle.** A suspend with neard polling reset the palmtop (2026-10-27); with polling stopped, 35 s2idle cycles with RTC wakes that day all woke (`7.3.0-rc6-omamobile-tegu-s2mpg15-m1`). The cause isn't known: nxp-nci has no PM callbacks, but neither does the 7 Pro's st-nci, so the controller's interrupt or the I2C bus during the freeze are the next suspects. A sleep hook on the palmtop, `omamobile-tegu-nfc` (not in the repository yet; it comes with tegu's device package), stops neard's poll loop before a systemd sleep and restarts it after; a sleep written straight to `/sys/power/state` (`rtcwake -m mem`) skips the hook, so stop polling by hand first. Without [linux-omarchy-mobile#131](https://github.com/derekross/linux-omarchy-mobile/pull/131) the ST54L also doesn't answer on I2C after a wake (`Error -6 on I2C send`, also after the driver's retry), or after about 2-3 s of idle at any time, until neard powers it off and on ([#132](https://github.com/derekross/omarchy-mobile/issues/132)): nxp-nci never turned its NFC mode on, as ST's HAL does after init. With #131 (the results below on `core.c` blob `77fc35b61da5`, #131's first version; the merged version, `c96704ddd480`, re-run for six power-ons and polling at 3 s and 30 s; the release, `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`, is the same as without the fix), NFC polls after 3 s to 3 minutes of idle and polled again after two RTC-woken s2idle cycles (2026-10-29): one with a hook that stops polling and powers the adapter off, and one without that hook, for which it isn't recorded whether polling was stopped, so whether NFC comes back after a wake with the stop-poll hook alone rests on that one cycle and needs a re-run with the hook's log. No power-off hook is needed for NFC; the stop-poll rule above stands on its 35 of 35. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "Suspend with the modem on"
- **On the 9a, sleep tests are attended, and the direct freeze path is still not used.** Three sleeps have never woken (not from the RTC alarm, not from the power key; Power + Volume Up to reset, nothing in pstore): two direct `rtcwake -m freeze` runs (2026-10-28, 2026-10-29) and one 30-minute `systemctl suspend` with `tegu-mif-sleep` loaded (2026-10-30, cable out); 35 short and seven longer systemd sleeps woke (two 30-minute and four 240 s ones on 2026-10-29, a cable-in 30-minute one with the module on 2026-10-30; the afternoon's cable-out run with the module makes eight). No single factor explains it, so keep sleep tests attended, keep `power-ab` on `--suspend systemd` (the sleep hooks run that way), and don't load `tegu-mif-sleep` at boot until the hang is understood. The shell's the shell's auto-sleep (the `omamobile-sleep` toggle, systemd path, no module) woke every time while it was on, and the two no-wakes without the module were both direct freezes; the toggle is off on the palmtop since the 2026-10-30 shell reinstall (the package ships it off), so turning it on is the owner's call. [tegu SLEEP-PLAN](device/tegu/SLEEP-PLAN.md) S1
- **On the 9a, a sleep can end badly in two ways: UFS fails to come back and the root filesystem goes read-only, or the SoC hangs and leaves the USB bus.** The first seen once on 2026-10-30 (`link startup failed 1`, `Host init failed 1` x5, `ufshcd_wl_resume failed`, then `I/O error, dev sda` and ext4 `emergency_ro`; `spm_lvl` 5). The palmtop woke on its alarm but nothing on disk could be read: `systemctl suspend`/`reboot` did nothing, the power key could not light the screen, SSH kept answering from memory. A dark palmtop that ignores the power key may therefore be awake with dead storage, not asleep. After every s2idle, `dmesg | grep -E "link startup failed|Host init failed|I/O error"` first; if it matches, `echo b > /proc/sysrq-trigger` (binaries won't load), then check the ext4 recovery on the next boot. [tegu SLEEP-PLAN](device/tegu/SLEEP-PLAN.md) S1
- **UFS must be at `spm_lvl` 5 in system suspend.** At the core default 3, UFS failed its first hibern8 exit on resume and needed a host reset (it recovered, no I/O errors); at 5 the first real s2idle freeze resumed clean. gs201 now defaults to 5 in the kernel (S3a, `a7e5e1d95`), so a suspend test only checks that `spm_lvl` reads 5; on a kernel without that commit, `echo 5` first. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S1-S3
- **Only s2idle, never `deep`.** The firmware advertises PSCI SYSTEM_SUSPEND, so mainline offers `deep`, but Linux has no gs201 SoC sleep sequence (SYS_SLEEP), and the phone wouldn't wake. `mem_sleep_default=s2idle` in the bootargs and device-cheetah's `sleep.conf` drop-in keep it on s2idle. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) §1, §5
- **Some unattended RTC cycles wake early on the PMIC interrupt** (2 of 20 in S4, 4 of 31 in S5c, at 13-16 s instead of 30 s). Which PMIC event it is hasn't been read yet; count it, don't treat it as a failed cycle. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S4, S5c
Expand Down
32 changes: 32 additions & 0 deletions device/tegu/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,38 @@ resets) and are in [MODEM-PLAN](MODEM-PLAN.md) under "G3, twenty-fourth to
thirty-fourth tries" and "The CP link hang". Not a GNSS matter: if a boot
with nothing but Bluetooth starting resets again at that time, start here.

## 2026-10-29: the s2idle drain is the SoC floor, not the CPUs or the radios

- Cable out, screen off: 311 mA awake, 302 mA asleep (two 30-minute
`systemctl suspend` rounds through `power-ab --suspend systemd`). The CPUs
sleep (timekeeping suspended for the whole of a 60 s test, one deep-state
entry per CPU); Bluetooth, NFC and Wi-Fi cost nothing measurable at idle.
What stays on is MIF, the buses and the always-on rails: there is no
system idle state in our kernel. `tegu-mif-sleep.ko` (MIF 421 MHz in
sleep) saves about 60-75 mA by the coulomb counter; a hand unit loaded it
at boot for one night and was disabled the next day (below).
Details and method in [SLEEP-PLAN](SLEEP-PLAN.md) S1.
- `rtcwake -m freeze` written straight to `/sys/power/state` failed to wake
again (the second time in two days); every `systemctl suspend` after
`rtcwake -m no` had woken up to then. The next day showed the entry
path isn't the whole story (the 2026-10-30 bullet).
- 2026-10-30: the cable-out `power-ab --suspend systemd` run with the
module loaded never woke from its 30-minute sleep (not from the RTC, not
from the power key; reset by hand), so the hand unit that loaded the
module at boot is disabled. The same day a cable-in 30-minute systemd
sleep with the module, its alarm logged as armed, woke on the alarm to
the second, and the afternoon's repeat of the cable-out run with the
module loaded by hand woke too: 273 mA awake with the screen off, 260 mA
asleep, about 40 mA under the figure without the module. Three sleeps
have never woken (two direct freezes, one systemd sleep with the module)
and no single factor explains them, so sleep tests stay attended and the
module stays off at boot; the shell's auto-sleep toggle is off on the
palmtop since the 2026-10-30 shell reinstall, and unattended sleep stays
off until the hangs below are understood.
- The 2026-10-27 "140 mA asleep" figure doesn't hold up against 2026-10-28
(434-445 mA cable out, as-is) and tonight; treat about 300 mA cable out
as the baseline.

## 2026-10-28, evening: USB-C host mode through TCPM

Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty` (the
Expand Down
Loading