Repository navigation
omamobile-modem 0.1.9: watch the CP state on one open file - #148
Conversation
|
Ran a GNSS session on it that made Kepler's watchdog fire 14 times. Each time gnssd reloaded the image over the CP's link (81 GNSS image ioctls in the kernel log), and the palmtop stayed up. The link came up 55 times in 6 minutes of uptime. Earlier sessions with the 0.5 s watcher reset the SoC after far fewer reloads (02:43 and 03:15 last night). |
|
Correction to my last comment: the hang came back at 05:02 with this watcher installed (bootloader reset reason CLUSTER0_NONCPU_WDTRESET). The ramoops console shows the CP's link still cycling about twice a second in the last minute, this time in step with gnssd's |
|
Thanks for this, and for posting the correction when the hang came back. That honesty makes these threads much easier to trust. Keeping one fd open is a good change, and cutting the link wakes from about 120 a minute to 5 is worth having on its own, as you say. I checked:
A few things before I merge:
Smaller things:
This watcher runs on every phone's modem profile, so I'll run it on my 7 Pro for one modem boot before merging. |
d4396e3 to
2c9ccad
Compare
|
Thanks for the careful read. Two commits on the branch now (I can't force-push from where I am today, so the second one carries the rework; the squash subject is the new title).
Kernel phone-smoke: teguKernel
Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.0-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.36-1, omarchy 4.0.6-1 |
|
Thanks, this is a great outcome. Your A/B settles it: a held file at 0.5 s added no link-ups in a minute, so the open and close was the trigger. With the default back at 0.5 s, the other phones keep their crash timing and the 9a still loses the wakes. The interval parsing and its test are just what I hoped for, and thanks for explaining the earlier "5 a minute". I re-checked:
How I'll merge it:
Before merging, I'll do one modem boot on my 7 Pro with this version, since the watcher runs on every phone. With the file held open, the boot channel is open for the whole session. On our CPIF that means frames arriving on it would be queued rather than dropped, and that node has no queue cap. I expect the channel to stay silent after ONLINE, but I'd like to see it, so I'll check that nothing is queued after ten minutes. If something is, I'll come back to you before merging. |
|
The description's first line now says it the right way round (the open and close wakes the link, the held file doesn't). Your squash message from the final wording is exactly right; nothing to change. Thanks for the boot-channel check on the 7 Pro; if anything queues there I'll look at the poll() route first. |
On the palmtop (Pixel 9a) every open and close of umts_boot0 woke the CP's PCIe link for about 100 ms. The watcher opened the file for each 0.5 s poll, so it woke the link about 120 times a minute. It now holds one file open for the whole watch and polls every 5 s, which cuts the link-ups to about 5 a minute. Whether the status ioctl on the held file wakes the link too is being measured. The watcher was one source of link cycling, and the hang seen while gnssd reloaded Kepler is still open: it happened with this watcher in place too. A crash still shows within seconds. The interval, OMAMOBILE_MODEM_WATCH_SECONDS, is read inside watch() and checked against 0.2-60 s, with the default used otherwise, so a bad value can't break the other subcommands, power-off at the profile's stop included. The package test covers it.
…s at 0.5 s Measured on the palmtop with the modem ONLINE: the profile's held-file watcher made 0 link-ups in a minute, and a second held-file watcher at 0.5 s added 0 in its minute. So it is the open and close of umts_boot0 that wakes the CP's PCIe link, not the status ioctl, and the default goes back to 0.5 s with the file held open; crash timing on the other phones stays as it was.
9aa68b6 to
babf987
Compare
…L1's frame The count was wrong by one (eight watchdog resets, the eight times listed). G3-L1 now says its first step, the link held up through cpif's keep_link_up, runs under the same frame and counts toward the same cap; the watcher is named as derekross#148 in review, and the partition check's span is the consoles' (07:34 to 09:19).
…t, and runs on real packages The slot-B precondition and a one-hang cap head the runbook, citing the AGENTS line that is on main. Every stop of the modem unit by hand becomes an attended reboot, since a profile stop hard-reset the palmtop once and the power-off path is unqualified; SIM-11's checksum compare moves to after the reboot. SIM-1 now requires a real install of omamobile-modem (0.1.10 once derekross#148 and derekross#163 merge) with pacman -Qkk clean and the profile's sha256 recorded, and omamobile-modem-sit 0.3.4, since 0.3.3's state reads cycle the CP link. The start script the runbook relies on is committed under device/tegu/bringup. Smaller: no calls to the palmtop during the test and what to do if a release isn't confirmed, the cluster watchdog reset named for a hang, test -d for the CPIF check, the unit copy marked temporary, the Linux poweroff question answered, the network no longer named.
|
Thanks again for this one. I rebased it onto main after #141 landed. Your two commits applied cleanly, the package is identical to what I reviewed, and the checks still pass on today's main. The one thing left is on me: one modem boot on my 7 Pro with 0.1.9, checking that nothing queues on the boot channel after ten minutes. My phone is away from the laptop right now; I'll run it as soon as it's back, post the result here and merge right after, with the squash message from your final wording. |
|
Ran it on my 7 Pro tonight: 0.1.9 with sit 0.3.3, one modem start in a fresh boot. CP ONLINE in about 9 s, the watcher held one file (0 |
The display bullet cited BRINGUP-M1 test 23 for "Power alone does nothing", but that test is about forcing a restart of a hung phone, not about waking a blanked screen. What can be checked: the omamobile head's zuma-husky.dts has no gpio-keys node, the c6 test tag's has one (derekross#148), so on the head kernel no key can wake a blanked screen. Notes only.
The Pixel 9a's SoC and board device tree, 120 Hz, the touchscreen and its sleep fix, NFC's ST54L mode and poll stop, and the panel's local high brightness mode are merged (kernel #80/#81, #88, #82, #131, #71, #126; #155). The Pixel 8 Pro's buttons are in the published kernel (kernel #148). The OnePlus 13's device package is merged (#111), mustang has stage 0 notes (#198), and kodiak joins the Pixel 11 row (#201). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#148) On the Pixel 9a each open and close of umts_boot0 woke the CP's PCIe link for about 100 ms, so the watcher, which opened the file for every 0.5 s poll, woke it about 120 times a minute. The watcher now holds one file open for the whole watch. The status ioctl on the held file doesn't wake the link (0 link-ups in a minute at 0.5 s, measured 2026-10-29), so the interval stays at 0.5 s and crash timing on the other phones is unchanged. OMAMOBILE_MODEM_WATCH_SECONDS overrides the interval. It is read inside watch() and checked against 0.2-60 s, so a bad value can't break the other subcommands, power-off at the profile's stop included; the package test covers it. The watcher was one source of link cycling. The SoC hang seen while gnssd reloaded Kepler (device/tegu/MODEM-PLAN.md G3) is still open: it happened with the held file too. Tested on the Pixel 7 Pro (2026-10-30, kernel 7.3.0-rc6-omamobile-push1-gaae3b058ef98): CP ONLINE in about 9 s, 0 umts_boot0 opens a minute from the watcher, nothing queued on umts_boot0 after 10 minutes (select returned []), no UFS error-handler pass, no dead-application lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ross#208) Power, volume keys and the touchscreen run on the Pixel 8 Pro with the zuma ALIVE pin controller, gpio-keys and the touch stack from linux-omarchy-mobile derekross#148 and derekross#153 (test tags b, b2, c5, c6 on the author's fork). DEVICES marks them testing.
The Pixel 9a's SoC and board device tree, 120 Hz, the touchscreen and its sleep fix, NFC's ST54L mode and poll stop, and the panel's local high brightness mode are merged (kernel derekross#80/derekross#81, derekross#88, derekross#82, derekross#131, derekross#71, derekross#126; derekross#155). The Pixel 8 Pro's buttons are in the published kernel (kernel derekross#148). The OnePlus 13's device package is merged (derekross#111), mustang has stage 0 notes (derekross#198), and kodiak joins the Pixel 11 row (derekross#201). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stacked on #141 (it needs 0.1.8's version bump first; the change itself is this one commit).
On the palmtop, every open and close of
umts_boot0wakes the CP's PCIe link for about 100 ms ("PHY out of isolation", link up, "PHY isolated" again); the status ioctl on a file held open does not.omamobile-modem-cp watchopened the file for each 0.5 s poll, so the link cycled twice a second for as long as the modem was up.The watcher now keeps one open file for the whole watch and polls it every 0.5 s as before (
OMAMOBILE_MODEM_WATCH_SECONDSoverrides it, read insidewatch()and checked against 0.2-60 s, so a bad value can't break the other subcommands). Measured on the palmtop with the modem ONLINE (10-29): the held-file watcher made 0 link-ups in a minute, and a second held-file watcher at 0.5 s added 0 in its minute, so the open and close is what woke the link, not the status ioctl. A crash still shows within a second, and crash timing on the other phones is unchanged.What this doesn't fix: three times last night the SoC hung (watchdog reset, no oops in ramoops, the log stopping mid-cycle) while the link cycled during gnssd's Kepler image reloads. Once that was with this watcher in place, with the link cycling in step with gnssd's
IOCTL_LOAD_GNSS_IMAGEcalls. The watcher was one source of the cycling. The hang itself looks like CPIF's link power-down racing an access, and that's still open (MODEM-PLAN G3 on #138).