Repository navigation
omamobile-modem: a start refused before any driver loads releases the sleep block - #424
Conversation
|
Thank you for this. It's a clean fix for the half of #390 that bites most often: after a forced restart or a latch, the phone sat awake all day for a modem that never started. I read every path into Since #398 this script starts the modem on every Pixel 7 Pro, and refusals there will now let the phone sleep. That's the same reason and the same state the 7 Pro's suspend tests ran in, so I'm happy with it, but I'll run it on mine before merging: a latch, a reboot, the release, then the modem back by hand. I'll do that together with #389's boot. Two small things, fine in one push:
On the version: as you say, 0.1.17 is taken twice already. I'll set the next free number in the file and the title at merge. |
… sleep block omamobile-modem-inhibit holds a block on sleep from before the modem's drivers load until the reboot, since suspend with the modem up isn't qualified. But a start that refuses before any driver loads (a stale modem-up marker after a forced restart, the bring-up latch) left that block in place for the whole boot, so the phone never slept although no modem was up, and systemctl suspend needed -i (derekross#390). refuse() now kills the inhibitor (it refuses a manual stop) when it is running and none of pcie_gs201_cp, shm_ipc and cpif is loaded. Once a driver has loaded, nothing changes: the block stays until the reboot. An unprovisioned phone skips the inhibitor by its own conditions, so nothing is released there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of derekross#424: a modprobe that failed left through set -e, not refuse(), so the sleep block stayed although the unit comment said "no CPIF" released it. Each modprobe now refuses with its module's name for the tile ("Off: cpif didn't load"). refuse() then releases the block only when none of the modem's drivers is loaded, and that list now takes the device's link stack from link.conf (derekross#568) as well as pcie_gs201_cp, shm_ipc and cpif: a module that loaded and failed in probe keeps the block, one that never loaded releases it. The latch stays either way, as it did. test_link.py runs the real starter through both cases (the first link module fails: the block goes; the second fails with the first loaded, a module named only in link.conf: it stays), with a fake systemctl so the tests never ask the host's. The inhibitor's and the modem unit's headers and cheetah's MODEM-PLAN M4.6 get the dated release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d1c9d04 to
b50995e
Compare
|
Thanks for reading every path. Both points are in b50995e, rebased onto today's main:
|
|
Thanks, both points are in, and the second went the better way: a module that doesn't load is now a refusal with a reason on the tile, and the Nothing more needed from you. What's left is my run on the Pixel 7 Pro: a latch, a clean reboot, the release, then the modem back by hand, in the same session as #389's boot. I'll post the result here and merge after it, with the version set then. One thing for later, not for this PR: the refusals that come before |
|
The 7 Pro run is done, 2026-11-10,
No UFS error-handler pass and no I/O error on either boot. So a refused start no longer keeps the phone awake, and a successful one is unchanged. Thank you for your patience with this one; it has waited on my phone since 11-05. It will merge as omamobile-modem 0.1.20: main moved to 0.1.19 today (#634), and this branch bumps none, so I'll add the number on top of your branch and merge. |
Main moved to omamobile-modem 0.1.19 (derekross#634) and this branch bumped no version, so the squash would have shipped new contents under a published number. Tested on a Pixel 7 Pro on 2026-11-10 as this tree plus derekross#389. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ses the sleep block (derekross#424) A modem start that is refused before any link driver loads (a stale marker, the bring-up latch, a phone that isn't provisioned) kept the "don't sleep with the modem up" block for the whole boot, although no modem was up. It now releases the block, so the phone can sleep that boot. A link module that fails to load is a refusal with a reason for the Mobile data tile, where the script used to leave through set -e with modprobe's status. A successful start is unchanged. Tested by the contributor on a Pixel 6 Pro. Tested on a Pixel 7 Pro on 2026-11-10 (7.3.0-rc6-omamobile-push1-gc7fb37460f84, this change with derekross#389): with a bring-up marker placed by hand the next boot refused, logged "no modem driver loaded: sleep is no longer blocked this boot", held no inhibitor and loaded no link module; removing the marker and starting the unit brought the CP ONLINE with the block back. A normal boot before it: ONLINE, a call and a text each way.
What and why
Part of #390.
omamobile-modem-inhibitblocks sleep from before the modem's drivers load until the reboot. A start that refuses before any driver loads (a stale modem-up marker after a forced restart, the bring-up latch) left that block in place for the whole boot, so the phone never slept although no modem was up, andsystemctl suspendneeded-i.refuse()now kills the inhibitor (it refuses a manual stop) when it's running and none ofpcie_gs201_cp,shm_ipcandcpifis loaded. Once a driver has loaded, nothing changes. An unprovisioned phone skips the inhibitor by its own conditions, so nothing is released there.test/allcovers all three cases (no driver: released;cpifloaded: kept; inhibitor not running: left alone).Device and build
uname -r):7.3.0-rc6-omamobile-push1-ge1e6adb69bbfversioneither way, so the number is best set at merge)Checks (no phone needed)
tools/pr-check origin/mainpassestests/allpasses: one check, "published files are world-readable and not executable", fails on this laptop on an untouched main too, so it's this machine's setup; CI runs ittests/packagespasses (or the packages I touched: omamobile-modem)versionbumped, and the new version is in the commit subject (left for the merge, see above)Co-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
omamobile-modem-inhibitinactive, noomamobile-modemlock insystemd-inhibit --list, no modem driver loaded.systemctl start omamobile-modemafterwards brought the modem (CP ONLINE) and the inhibitor (lock held) back.userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportphone-smoke: raven
Kernel
7.3.0-rc6-omamobile-push1-ge1e6adb69bbf, tools atd1c9d044, 2026-11-04T08:48Z.Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.1-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.15-1, omamobile-device-raven 0.1.32-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.17-1, omamobile-modem-sit 0.3.30-1, omamobile-omarchy 0.1.31-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.94-1, omamobile-voice 0.1.0-1, omaphone 0.2.2-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1
The smoke report was taken after the modem was started again. Its flags are the unpublished kernel's CPIF lines and the AoC mailbox burst at card start, as in #389 and #401.
🤖 Generated with Claude Code