diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 18b057c41..58461f732 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -13,6 +13,109 @@ hash/build ID; this dirty release is not a published kernel package. `[V]` marks verified observations; `[I]` marks an inference still to test. Raw captures, recordings, backups and vendor files remain off repository. +## 2026-10-31 and 11-01: every testing row on a published-style kernel + +Each line is a boot of the named head on the palmtop, built with +defconfig + `kernel/configs/omamobile.config` (plus #227's options) + +`olddefconfig`, pushed with `bin/omamobile push`, results collected, then +the daily integration kernel pushed back. Each row gives the release of +its boot (`uname -r`; the hash is the built tree's commit). Details are on +each pull request. + +- [V] **Kernel config gaps (#227, `7.3.0-rc6-omamobile-push1-g5628f1888904` with all four built in).** + A build from the fragment booted with no USB: the eUSB2 PHY and the ACPM, mailbox and S2MPG14 path its rails + come through were modules, and the initramfs loads none. The fragment + also lacked the MAX77779 fuel gauge and charger, the RT6160 camera + regulator, the zumapro PCIe host (as a module) and the TAS2572 driver. +- [V] **Display and GPU (kernel #96, `7.3.0-rc6-omamobile-push1-g5628f1888904`):** DSI-1 connected at 1080x2424, a + panthor render node, from the package's graphics start. +- [V] **Bluetooth (kernel #122, `7.3.0-rc6-omamobile-push1-g6ec07aeee91d`):** hci0 up, host wake 6 interrupts idle and + 38 after a 12 s scan. +- [V] **Charging (kernel #161, omarchy-mobile #230, + `7.3.0-rc6-omamobile-push1-g7dbac6f4e65c`):** the charger binds at + 0x69, and the charge limit holds charging off at 80 % through + `charge_behaviour`. +- [V] **AoC, speakers, microphone, sensors (kernel #162, omarchy-mobile + #234, `7.3.0-rc6-omamobile-push1-g922812d75006`):** the AoC from the device tree at boot (93 services), the sound + card, a tone heard from the speaker, the microphone at -32 dBFS, and the + sensor proxy with five sensors. +- [V] **NFC (kernel #104 rework, #105, omarchy-mobile #235, + `7.3.0-rc6-omamobile-push1-gb45a0d400e49`):** the clock pad + from clk-exynos-clkout, `nfc0` polling with no I2C errors, neard and the + link opener from the package. The pad variant's optional parent needed + `of_property_match_string()` first: `of_clk_get_by_name()` returns -EINVAL, + not -ENOENT, when a node has no `clock-names`. +- [V] **Cameras (kernel #164, `7.3.0-rc6-omamobile-push1-g4023f585ccae`):** all three stream (19 fps main, 30 fps + ultrawide and front, 1280x960) once PMU 0x3ebc, the DC-PHY's isolation, + is in the zuma PMU allowlist; without it every `phy_power_on()` failed + with -EIO. +- [V] **Fingerprint (kernel #165, `7.3.0-rc6-omamobile-push1-gb533af3f1cbc`):** goodix-fp binds from the device tree + (`/dev/goodix_fp`, irq on gpa7-6); matching was not run, since the + service writes Trusty's secure storage. +- [V] **Wi-Fi (kernel #168, omarchy-mobile #238, + `7.3.0-rc6-omamobile-push1-g07bdf006cdc2`):** the new zumapro PCIe + channel-1 host plus #56's brcmfmac: the link, the BCM4383 at + `14e4:4449`, `wlan0` connected at boot, a ping over it. + +## 2026-10-31 and 11-01: leftovers on the palmtop from bring-up + +- [V] **A plugin link in `~/.config/omarchy/plugins/` outranks the package.** + `omamobile.quicksettings` pointed at a 10-17 hand copy (no notification + shade) and `omamobile.switcher` at a 10-22 copy; four plugins were not + linked at all. Relinked with `omamobile-setup-user`'s loop (AGENTS, #243). +- [V] **NetworkManager was masked in `/etc` and iwd ran Wi-Fi,** so the + quick-settings Wi-Fi tile had no device. The switch, under a two-minute + dead-man unit that would have masked NetworkManager and started iwd + again: remove `/etc/systemd/system/NetworkManager.service` (the mask, a + link to `/dev/null`), `systemctl daemon-reload`, `systemctl disable --now + iwd`, `systemctl enable --now NetworkManager`, then `nmcli device` showed + `wlan0` managed, and a fresh SSH login stopped the dead-man. The + bring-up start script on the palmtop that used to start iwd now leaves + Wi-Fi to NetworkManager when it is enabled. +- [V] **`omamobile-aoc`, `omamobile-sensor-proxy` and `omamobile-nfc-open` + were masked in `/etc`;** the three masks are gone, recorded in + `/root/bringup-backup/etc-masks/`. +- [V] **A fastboot flash of slot B's images clears slot B's successful + flag** (#224): the evidence, and the `devinfo` write that marked B again, + are in the next entry. + +## 2026-10-31: a fastboot flash of slot B cleared its successful mark, and B was marked again + +[V] Linux-omarchy-mobile #96's test kernel came up without USB (the config +gaps in #227), so the palmtop went to fastboot by the buttons and got the +daily images back. Before the flashes, `fastboot getvar` read +`current-slot: b`, `slot-successful:b: yes`, `slot-unbootable:b: no`, +`slot-retry-count:b: 2`. The five commands, suffixed, with no +`--set-active`: + +```sh +fastboot -s flash boot_b boot.img +fastboot -s flash init_boot_b init_boot.img +fastboot -s flash vendor_boot_b vendor_boot.img +fastboot -s flash vendor_kernel_boot_b vendor_kernel_boot.img +fastboot -s flash dtbo_b dtbo.img +``` + +After them, `slot-successful:b: no` and `current-slot: b`. The retry count +wasn't read again in fastboot; on the boot that followed, `devinfo` read B +active, not successful, `retry-count` 2. + +[V] B was then marked successful again, a `devinfo` write against the 9a +rule's hold, made under the 10-21 approval that the hold had replaced. The tool +was `omamobile-bootctl` (`packages/omamobile-device-cheetah/src/omamobile-bootctl.c`, +a static arm64 build with its source and binary hashes pinned in the +runner). The steps: the live 8192 bytes copied off the palmtop and +compared with the backup taken after the 10-28 stock boot (only the +bootloader-owned slot bytes and the record at 0x6d-0x70 differed); a dry +run that planned one byte, 0x35 `1c` to `1e` (B's successful bit); a +detached relock armed for 30 s; then `blockdev --setrw` on the disk and on +`devinfo`, the write, and an EXIT trap that set both read-only again. The +read-back matched the predicted image in all 8192 bytes, so 0x35 is the +only byte that changed, slot A's bytes are unchanged, and both read-only +flags read 1 afterwards. No other backup was taken first. Until the +maintainer decides how B is marked on the 9a, there are no more `devinfo` +writes: with B unmarked, reboots stay few and images are tried with `push`. + ## 2026-10-30: the hands-on morning (fingerprint, card, USB-C host, GNSS) Release `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`, device diff --git a/device/tegu/SLEEP-PLAN.md b/device/tegu/SLEEP-PLAN.md index 0df3ee52d..d3f4009c4 100644 --- a/device/tegu/SLEEP-PLAN.md +++ b/device/tegu/SLEEP-PLAN.md @@ -427,6 +427,123 @@ with the cable in. no ACPM timeouts. With gating on, 10-31's earlier run was also ten of ten, so this does not yet separate the two; the count both ways goes on until one side fails. + + **S1 on the clock-fix kernel, 2026-11-01 (same release, the daily kernel + with the PERIC0 GPIO clock kept on, linux-omarchy-mobile #172).** That + gate hung the SoC under the modem's GPIO traffic (MODEM-PLAN G3-L1), so + it was a candidate for these no-wakes too. Cable in, modem never loaded, + NFC polling off before every cycle, UFS clock gating on (the default), + thirty 30-second RTC cycles planned: cycles 1-20 woke (47-80 s from + suspend to SSH, `suspend_stats` success 20 and fail 0, no UFS or ACPM + lines, wake IRQ 56 each time), and cycle 21 did not wake: no SSH 160 s + after the suspend, and it needed Power + Volume Up. So the clock gate is + not the sleep hang; one in 21 here, against about one in 40 before. + After the reset (2026-11-01 morning), nothing from the hung sleep was + kept: `/sys/fs/pstore` was empty, and the persistent journal of that + boot ends on `PM: suspend entry (s2idle)` with nothing after it. That + run didn't keep the console through sleep (`printk.console_suspend=N` + went into the script after it), and a Power + Volume Up reset may not + keep the ramoops region anyway. The next run keeps the console, and + whether the SoC watchdog still runs in s2idle (a watchdog reset keeps + ramoops; the buttons were needed every time so far) is the next thing + to check. + + **A watchdog through s2idle, tried 2026-11-01 (same release): it breaks + the sleep, so it can't catch the hang.** `s3c2410_wdt` stops both + watchdogs in its suspend callback, so a hang in s2idle never resets the + palmtop. A bring-up module (`tegu-wdt-s2idle`, in the owner's logs) + restarted the cluster 0 watchdog in the noirq phase with the PMU reset + path unmasked and the counter enabled, as the driver's own enable does, + and stopped it in resume_noirq. Armed, three sleeps of three ended in a + reset: the s2idle wake came within 60 ms of arming, and after resume + ACPM stopped answering (`Timeout! ch:2`, then `RX front can not keep up + with TX front` and `sec-pmic-acpm … Failed to read IRQ status: -110` + every 0.5 s) until the restored 10 s watchdog reset the SoC; ramoops + kept all of it. Loaded but disarmed, two sleeps of two woke (after 1.5 + and 1.6 s, wake IRQ 56, no ACPM timeouts). So a running cluster 0 + watchdog (or its PMU counter enable) during s2idle upsets the APM, and + this module is not a way to record the real hang. The real hang's + console is still unknown; what this run does show is what an APM that + stops answering after resume looks like, which matches the stall seen + in G3-L1's CPU-sleep run (MODEM-PLAN). + + **The sleeps that woke were short: the PMIC wakes s2idle about a second + in (2026-11-01, same release).** In the disarmed sleeps above, + `PM: suspend exit` came 1.5 and 1.6 s after `PM: suspend entry`, not + at the 30 s RTC alarm, with `/sys/power/pm_wakeup_irq` 56, the + S2MPG14's own line (GICv3 106, `s2mpg14-pmic`). One more 30 s sleep + with `pm_debug_messages` on: "Triggering wakeup from IRQ 56" 0.6 s + after entry, exit 1.5 s after it. Across that sleep and the 40 s after + it, the PMIC line counted 2 and `rtc-alarm0`, its only mapped child, + 1, which is the real alarm going off after the wake; awake, the same + `rtcwake -m no -s 30` alarm fired at 30 s as it should. So another PMIC + source, one without a mapped child, raises the line as the palmtop + goes to sleep. Earlier cycle logs only recorded wake IRQ 56 and the + time to SSH, which can't tell a short sleep from a full one, so S1's + wake counts may describe sleeps of about a second. Next: read the + S2MPG14 interrupt registers (INT1-INT5 through the ACPM regmap, from + the kernel, never from userspace) at that wake, and check the 30-minute + sleeps' records for their real length. + + A bring-up module (`tegu-pmic-wakeread`) then read INT1-INT5 and their + masks through the PMIC's regmap in suspend_noirq and resume_noirq + (reads only; INT1-INT5 clear on read). Three sleeps, all woken about a + second in: + + | Alarm set | INT1-5 at sleep | INT1-5 at wake | Wake IRQ | + | --- | --- | --- | --- | + | 30 s | 00 09 00 00 00 | 00 0c 00 00 00 | 56 (PMIC) | + | 120 s | 00 09 00 00 00 | 00 0d 00 00 00 | 56 (PMIC) | + | none (`rtcwake -m disable`) | 00 08 00 00 00 | 02 09 00 00 00 | 59 (Power key, gpa4-0) | + + The masks read `ff fb ff ff ff` each time, so only INT2 bit 2, alarm 0, + is unmasked. With an alarm set, alarm 0 latched within 60 ms of the + suspend_noirq read, whether it was due in 30 or 120 s; with none set, + INT1 bit 1 (power key released) latched and the power key's GPIO woke + the SoC, with nobody touching the key. So something in the last stage + of the suspend makes the S2MPG14 raise events that didn't happen, and + every sleep since at least 2026-10-30 has probably lasted about a + second. The 1 s and 60 s RTC ticks (INT2 bits 3 and 0) were latched + but masked throughout. After the no-alarm sleep, SSH over USB took + about 8 minutes to come back, with nothing in the kernel log about + USB. + + **With CPU core power-down off, the sleep lasted its full length.** + The only deeper cpuidle state on each CPU is state1 + (`cpu-a520-sleep`, `cpu-a720-sleep`, `cpu-x4-sleep`, PSCI core + power-down; each was used 4-5 times by s2idle in the short sleeps). + With state1 disabled on all eight CPUs (WFI only) and a 30 s alarm, + `PM: suspend entry` at 472.7 s and the wake at 501.9 s, on IRQ 56 with + INT2 `0c` (alarm 0): the real alarm, 29 s in. So the events that end + every other sleep a second in come with the CPUs' power-down during + s2idle, most likely from the firmware's side of that power-down, not + from the PMIC drivers. One sleep so far; next: a series of longer + sleeps with state1 off (a sleep hook can turn it off before the sleep + and on after), their hang rate, and the drain against the short-sleep + figures. + + Our idle states match stock's: the same three `c2` states with + `arm,psci-suspend-param = <0x10000>` (core power-down) and stock's + latencies. What stock has besides them is Samsung's `exynos-cpupm` + node: cluster power-down per cluster (`cpd_cl0` for CPUs 0-3, `cpd_cl1` + for 4-6, `cpd_cl2` for 7) and `sicd` across all eight (system idle + clock down), which its vendor driver coordinates with the APM. Mainline + has no such driver, so when every CPU sits in core power-down in s2idle, + the firmware sees a state stock's kernel would have announced to it + first. That the PMIC's false events come from there is an inference, + not a measurement. The device package's fix for now is a sleep hook + that allows only WFI for the length of a sleep (`omamobile-device-tegu` + 0.2.5, #255). + + **Ten sleeps with the hook (2026-11-01, same release, device-tegu 0.2.5 + installed from its branch).** `systemctl suspend` with a 60 s RTC alarm, + ten times: nine slept 55-61 s, entry to exit, and woke on IRQ 56 (the + alarm); the seventh's resume took longer than the 8 s the script waited + before measuring, so its length isn't known, but it woke and the hook + restored the states. `suspend_stats` 6 to 15 successes, 0 failures; no + UFS errors, no ACPM timeouts. The screen stayed lit through these sleeps + (`systemctl suspend` skips the shell's blanking), so no drain figure + from this run. - **What the five clean cycles rule out, and what they don't.** Five in a row with the storage counters at zero says the UFS resume path is not broken per se; the afternoon failure and this hang are both the sixth or