Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d378e09
device/tegu SLEEP-PLAN: a hang with Wi-Fi unloaded, and a WFI-only se…
W4HO-ham Nov 3, 2026
d726376
device/tegu SLEEP-PLAN: S1-W's first runs, and a reset from a brcmfma…
W4HO-ham Nov 3, 2026
b862dec
device/tegu SLEEP-PLAN: S1-W woke 80 times, then UFS died; S1-U tries…
W4HO-ham Nov 3, 2026
52e9456
device/tegu SLEEP-PLAN, bringup: S1-W and S1-U attended, their script…
W4HO-ham Nov 3, 2026
58e524a
device/tegu SLEEP-PLAN: S1-U died at the 35th wake too, every wake's …
W4HO-ham Nov 3, 2026
68202a6
device/tegu SLEEP-PLAN, bringup: log UFS IO coherency after every wake
W4HO-ham Nov 3, 2026
6c0d923
device/tegu SLEEP-PLAN: a hang at the first screen-on after a wake, c…
W4HO-ham Nov 3, 2026
b393a6c
device/tegu SLEEP-PLAN, bringup: the screen-on resets were the cohere…
W4HO-ham Nov 3, 2026
2725296
device/tegu SLEEP-PLAN: 135 wakes on the coherency kernel with no dea…
W4HO-ham Nov 4, 2026
d802c0d
device/tegu SLEEP-PLAN: breadcrumbs in the PMIC RTC for the silent no…
W4HO-ham Nov 4, 2026
434332e
device/tegu SLEEP-PLAN: the breadcrumb module's first night
W4HO-ham Nov 4, 2026
fea29b8
device/tegu SLEEP-PLAN: the night's count, and the coherency kernel r…
W4HO-ham Nov 4, 2026
0c5ba93
device/tegu SLEEP-PLAN: the silent no-wake and dead storage look like…
W4HO-ham Nov 4, 2026
538d401
device/tegu SLEEP-PLAN, bringup: the two suspend failures found and f…
W4HO-ham Nov 8, 2026
60f7ca5
device/tegu SLEEP-PLAN, bringup: the everyday path on #99, a 6-hour a…
W4HO-ham Nov 9, 2026
a0fdae4
device/tegu SLEEP-PLAN, bringup, AGENTS, DEVICES: the review's fixes,…
W4HO-ham Nov 9, 2026
e868a5b
device/tegu SLEEP-PLAN, bringup: S1 condensed, the launcher in the tr…
W4HO-ham Nov 9, 2026
fa3808b
device/tegu SLEEP-PLAN, bringup, AGENTS, DEVICES: one failure fixed i…
W4HO-ham Nov 9, 2026
16acf79
device/tegu SLEEP-PLAN, bringup: the published-tip runs, and the cpui…
W4HO-ham Nov 9, 2026
539e6cc
device/tegu SLEEP-PLAN, bringup: 36 of 36 on the published tree with …
W4HO-ham Nov 10, 2026
cb26c1d
device/tegu SLEEP-PLAN, bringup: 36 of 36 on the published tree with …
W4HO-ham Nov 10, 2026
07bd0e0
AGENTS.md, DEVICES, SLEEP-PLAN: what is known and open about the 9a's…
W4HO-ham Nov 10, 2026
c7e9955
device/tegu SLEEP-PLAN: the Power-key wake on the published tree
W4HO-ham Nov 10, 2026
cf5e970
device/tegu SLEEP-PLAN: 40 of 40 through the sleep hook
W4HO-ham Nov 10, 2026
007b3f6
device/tegu SLEEP-PLAN, AGENTS.md, DEVICES: a no-wake on the publishe…
W4HO-ham Nov 10, 2026
fc45c97
device/tegu SLEEP-PLAN, bringup: the status line, how the 11-10 run w…
W4HO-ham Nov 10, 2026
d852585
Merge main into tegu-sleep-1103
W4HO-ham Nov 10, 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
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Each entry gives the gotcha, then the reason or the fix. Details are in the link
- **spi-s3c64xx with automatic chip select dropped bits between transfers before linux-omarchy-mobile#150 (merged 2026-10-31):** its FIFO flush cleared the packet count before turning the channels off, so the controller clocked a few bits with the slave still selected. A slave that restarts per chip-select cycle (touch) doesn't notice; one that streams across cycles (the 9a's GNSS core, CHPP) loses 2-6 bits per transfer, and every read lands at a different bit offset. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "G3, GNSS gets a fix"
- **A node without pinctrl runs on the bootloader's pins, and a pin change tested next to another fix proves nothing on its own.** The 9a's GNSS SPI has no pin group and runs at the bootloader's drive 0; raising the drive looked like it cleaned the data, but it was tested together with the SPI flush fix, and with the flush fix alone at drive 0 the data was just as clean (linux-omarchy-mobile#151 closed). Read the bank's CON/PUD/DRV in `/sys/kernel/debug/pinctrl/<controller>/pins` (one controller at a time, as the gs101 note above says) before changing anything, then change one thing per boot, and check whose pins they are in the vendor tree before claiming them (gpp22 is the eSE's). [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "G3, GNSS gets a fix"
- **Samsung pinctrl takes pin groups only at its own probe:** groups added later by a runtime overlay are refused ("invalid function … in map table"), so a driver's pin states belong in the base DT even when its node comes from an overlay. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) M2.0
- **On the 9a, a writable GPIO bus clock gate hung the SoC:** the Samsung pin controller turns its pclk off after every register access, and `CLK_GOUT_GPIO_PERIC0` was a real, manual-mode gate, so the modem's AP2CP writes on PERIC0 (twice a second under GNSS) hung the palmtop within minutes, at random points and with nothing in the log. Keep GPIO gates critical or read-only on a CMU without automatic clock gating ([linux-omarchy-mobile#172](https://github.com/derekross/linux-omarchy-mobile/pull/172)). [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) G3-L1
- **On the 9a, a writable GPIO bus clock gate hung the SoC:** the Samsung pin controller turns its pclk off after every register access, and `CLK_GOUT_GPIO_PERIC0` was a real, manual-mode gate, so the modem's AP2CP writes on PERIC0 (twice a second under GNSS) hung the palmtop within minutes, at random points and with nothing in the log. Keep GPIO gates critical or read-only on a CMU without automatic clock gating ([linux-omarchy-mobile#172](https://github.com/derekross/linux-omarchy-mobile/pull/172)). A test kernel built from the integration tree as it stands lacks that fix (and [#150](https://github.com/derekross/linux-omarchy-mobile/pull/150)'s SPI flush order): the owner's sleep-test kernels did, and the modem reset the palmtop twice within a minute of ONLINE on 2026-11-08. Before a modem test on any kernel that isn't the daily, check that `/sys/kernel/debug/clk/zumapro_gpio_peric0/clk_flags` reads `CLK_IS_CRITICAL`. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) G3-L1, [tegu NOTES](device/tegu/NOTES.md)
- **On tegu, ABL leaves every GPA5 pin pulled down, and that hides the modem's cp2ap lines:** with the pull-down nothing rose for 10 s after power-on; with stock's pulls (wakeup up, phone-active and ps-hold floating, in the base DT) they rise within 0.5 s. Check a line's pull before blaming the device that drives it. [tegu FAR-ALIVE-PLAN](device/tegu/FAR-ALIVE-PLAN.md)
- **brcmfmac on BCM4389 needs control-ring D3 messages:** this firmware ignores the TCM mailbox, so early suspend tests ran with Wi-Fi unloaded. The D3 series on `omamobile-int` sends the D3 inform as a control message, and Wi-Fi now stays connected across s2idle (S5b-3; S5c, 31 of 31 freezes, 2026-10-19). The sleep hook (`omamobile-sleep` in device-cheetah) keeps Wi-Fi loaded when `/etc/omamobile/wifi-keep-across-sleep` exists (set on the reference phone since S5c), and otherwise unloads it; after a failed D3 handshake it falls back to unloading for the rest of the boot. Wi-Fi can't wake the phone (no host-wake consumer). [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S5

Expand All @@ -186,8 +186,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, a new sleep test runs attended first, and the direct freeze path is still not used.** Unattended sleep series are allowed since 2026-11-05 (#409) on the contributor's conditions and three of the maintainer's. The contributor's: on the charger with the cable in; the modem off for the boot; the script stops itself on any UFS error line or oops; a wake with dead storage (SSH still answers) gets `echo b > /proc/sysrq-trigger` remotely, and only a silent hang waits for the owner's buttons; the owner says yes before each run. (Their "slot B marked" condition is not part of it: marking B on the 9a stays on hold, see the boot chain notes above, so a series that resets the palmtop spends ABL tries and stays short.) The maintainer's: nothing new (a kernel, a module or a script) runs unattended before one attended run of it; the automatic sysrq recovery is capped per night, and the next boot's ext4 recovery is checked and recorded; and the recovery script is in the tree (`device/tegu/bringup/`, where the series scripts already are) before it runs unattended. The plan says which rule each step runs under, and the counts below are the early ones; [tegu SLEEP-PLAN](device/tegu/SLEEP-PLAN.md) keeps the current tally. Four 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), one 30-minute `systemctl suspend` with `tegu-mif-sleep` loaded (2026-10-30, cable out) and the sixth 30 s `systemctl suspend` cycle on 2026-10-30 (the daily boot, no module; it left the USB bus); 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 `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 auto-sleep (the `omamobile-sleep` toggle, systemd path, no module) woke every time while it was on, including seven sleeps of 11 s to 22 minutes in a day of use on 2026-11-01 (lengths from the RTC); the package ships it off, and the owner turned it back on on the palmtop that day, so keeping 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
- **On the 9a, a new sleep test runs attended first, and the direct freeze path is still not used.** Unattended sleep series are allowed since 2026-11-05 (#409) on the contributor's conditions and three of the maintainer's. The contributor's: on the charger with the cable in; the modem off for the boot; the script stops itself on any UFS error line or oops; a wake with dead storage (SSH still answers) gets `echo b > /proc/sysrq-trigger` remotely, and only a silent hang waits for the owner's buttons; the owner says yes before each run. (Their "slot B marked" condition is not part of it: marking B on the 9a stays on hold, see the boot chain notes above, so a series that resets the palmtop spends ABL tries and stays short.) The maintainer's: nothing new (a kernel, a module or a script) runs unattended before one attended run of it; the automatic sysrq recovery is capped per night, and the next boot's ext4 recovery is checked and recorded; and the recovery script is in the tree (`device/tegu/bringup/`, where the series scripts already are) before it runs unattended. The plan says which rule each step runs under, and the counts below are the early ones; [tegu SLEEP-PLAN](device/tegu/SLEEP-PLAN.md) keeps the current tally. Four 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), one 30-minute `systemctl suspend` with `tegu-mif-sleep` loaded (2026-10-30, cable out) and the sixth 30 s `systemctl suspend` cycle on 2026-10-30 (the daily boot, no module; it left the USB bus); 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 `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 auto-sleep (the `omamobile-sleep` toggle, systemd path, no module) woke every time while it was on, including seven sleeps of 11 s to 22 minutes in a day of use on 2026-11-01 (lengths from the RTC); the package ships it off, and the owner turned it back on on the palmtop that day, so keeping it on is the owner's call. Two causes are known. Dead storage after a wake: the UFS pads came back as plain inputs; [linux-omarchy-mobile#224](https://github.com/derekross/linux-omarchy-mobile/pull/224) re-applies the pin state at resume. A silent no-wake with C2 entered through s2idle's own path: with C2 disabled for the sleep (#96) or left to the ordinary idle path (#98) the RTC alarm woke the palmtop 300 of 300 times each; [omarchy-mobile#591](https://github.com/derekross/omarchy-mobile/pull/591) is the sleep hook for it. Open: on the published kernel, which has no idle states, a sleep still fails to wake now and then: one in 22 on 2026-11-09 (a boot without modules, no console), none in two re-runs of 36 with modules loaded, and one in 213 overnight on 2026-11-10 on the newest tip with the fixes. That one left a console: the kernel stayed alive, and CPU 7 answered nothing from just after the device suspend until the owner's reset (an RCU stall on CPU 7 every 63 s; neither the alarm nor the Power key got through). So a palmtop that stays silent after a sleep may be a running kernel with one core locked up, not a SoC that stayed down; what that core was doing isn't known. The main PMIC's interrupt, and with it the RTC alarm, came to the published `zumapro-tegu.dts` with [linux-omarchy-mobile#236](https://github.com/derekross/linux-omarchy-mobile/pull/236), merged 2026-11-10; on a kernel from before it `rtcwake` fails and a sleep ends only on a key. Check that `/sys/class/rtc/rtc0/wakealarm` exists before any RTC-woken sleep. The rule above stands. [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. The dead storage is understood: gph5-0 and gph5-1 (the UFS reference clock and reset, `13060000.pinctrl`) read `CON 0x0` after such a wake, so the device gets no clock and no reset edge; linux-omarchy-mobile#224 re-applies the UFS pin state in `exynos_ufs_resume()`. On a kernel without it the check above stays. [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 defaults to 5 in the kernel (S3a, `d0c08c464ef8` on `omamobile`), and gs101 too since linux-omarchy-mobile#188 (2026-11-04), so a suspend test only checks that `spm_lvl` reads 5; on a kernel without those commits, `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
Loading