Repository navigation
Conversation
|
Thank you, this is a nice piece of work. What I was most worried about with One thing to fix before merging:
Small things:
Versions: 0.1.17 and 0.2.108 are also claimed by other open pull requests, Before merging I'll run it on my 7 Pro: off and on again within a boot |
|
Thanks for the review! I'll fix all of these. |
|
Thanks for the reply. Nothing has been pushed yet, so my last comment stands, and two things have changed around it. Here is the whole list for one rebase:
Smaller, in the same push if you can: since #424 a start that is refused before any driver loads releases the sleep block, so the helper's header ("the inhibitor stays whatever happens") and the page's "can't sleep" note should follow that; the two test cases that call the helper without the fake Then I'll run it on my 7 Pro as described last time. This one goes in before #556. |
cebe4f2 to
c2a6c22
Compare
c2a6c22 to
9324508
Compare
|
Thank you, this is all there. "Enabled" now comes from what really starts the target ( I ran the gate, the modem package's tests and the two shell tests you changed on a merge with main, and they pass. I also broke the helper four ways (starting a modem that already ran, making it always available, stopping on "off", starting where the target isn't wanted) and each one fails the suite, which is what I want from tests around this rule. I couldn't run shellcheck here, so the SC2206 fix is checked by reading only; CI is waiting for my approval and will say. Nothing more is needed from you for the merge. Two notes:
Next is my run on my 7 Pro, with the page on this version: off and on again within one boot (nothing stops or starts, no UFS line), off plus "Restart now", on from the page in the boot where the modem is off, and a normal reboot. It goes in before #556. |
… off from the Mobile network page On the Pixel 7 Pro the modem stack starts at boot through device-cheetah's vendor wants link, so keeping it off meant `systemctl mask omamobile-modem-boot.target` over SSH. A phone whose modem drivers have loaded never sleeps (omamobile-modem-inhibit holds until the reboot) and runs warm, so the owner needs that switch on the phone. omamobile-modem-switch (pkexec, org.omamobile.modem.switch, the active local user without a password) masks the target for "off" and stops nothing in this boot: a stopped modem can't start again before a reboot, the sleep inhibitor stays anyway, and every modem power-off costs a UFS error-handler pass (MODEM-PLAN M2.6). "on" unmasks it and starts the stack only when this boot's modem never started. Its status reads without root; props.conf sits in a root-only folder, which counts as provisioned there. The switch exists only where the target is wanted at boot (`systemctl show -p WantedBy`, which sees vendor and /etc links) or masked. On the 9a, with its own modem start, and the 6 Pro, nothing wants it: status says "available": false, the page hides the switch, and "on" and "off" refuse, so the shell never starts a modem outside that phone's own starter. The Mobile network page shows the switch in its ready and off states, says when the change takes effect at the next restart, says the phone can't sleep only while the modem's sleep block is held (a start refused before any driver releases it), and offers "Restart now". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9324508 to
f292b1b
Compare
… 7 Pro test of derekross#555 Found on the reference phone on 2026-11-13, testing derekross#555's modem switch: - With the modem switched off for the boot, the only way to the page that turns it back on (the Mobile data tile's chevron) was hidden, and once shown it was greyed out with the tile. tile-state.sh now reports data_switch=off from omamobile-modem-switch, the tile says Modem off and keeps a working chevron (only in that case). - Right after switching it on, the page said the modem service isn't running and starts once the modem is set up; it now says it is starting until the phone service reports. - The heading was centred on the glyph and clipped when taller than it. - The page had no back arrow; it now has one, as the Wi-Fi and Bluetooth pages do, and Escape goes back to quick settings too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ikegam, I ran this on my Pixel 7 Pro today (2026-11-13, release kernel The switch itself did everything it should:
The page around it didn't, in the modem-off boot:
It also has no back arrow, which the Wi-Fi and Bluetooth pages have. I fixed all of these and ran them on the phone; the commit is on top of your head in our branch |
|
Thanks for testing it on your phone, and for fixing the page! I took |
…ys suspend is verified (#737) * omamobile-shell 0.2.129: auto-sleep on by default where the device says suspend is verified omamobile-sleepd (s2idle 30 s after the screen goes off behind a secure lock) shipped off on every phone. On the Pixel 7 Pro it is now verified: a night asleep with about 22 h of standby, power off, and double tap waking the phone from sleep (SUSPEND-PLAN, 2026-11-13). Turn the toggle on once, at login, on a phone whose device package installs /usr/share/omamobile/auto-sleep-default; every other phone keeps it off, and a user who turns it off keeps it off. With the modem up the phone still doesn't sleep (its inhibitor stays until linux-omarchy-mobile#232). 0.2.128 is claimed by #555 and #727. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-shell: the default-off test allows only the device-gated auto-sleep step The package test refused any code that turns the omamobile-sleep toggle on. #737 adds exactly one such step, gated on the device package's auto-sleep-default. The test now allows that one line and checks that the gate sits right above it; anything else that turns the toggle on still fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you. This is carried in #791 with your commits and authorship kept (cherry-picked onto today's main, version files resolved; a few renumbered at the top of #791), together with the change that turns sleep with the modem up on by default on the Pixel 7 Pro. Its tests pass. I'll close this one when #791 merges. |
…1.57, omamobile-shell 0.2.131: sleep with the modem up on by default on the 7 Pro (carries #555 and #556) (#791) * omamobile-modem 0.1.24, omamobile-shell 0.2.128: turn the modem on or off from the Mobile network page On the Pixel 7 Pro the modem stack starts at boot through device-cheetah's vendor wants link, so keeping it off meant `systemctl mask omamobile-modem-boot.target` over SSH. A phone whose modem drivers have loaded never sleeps (omamobile-modem-inhibit holds until the reboot) and runs warm, so the owner needs that switch on the phone. omamobile-modem-switch (pkexec, org.omamobile.modem.switch, the active local user without a password) masks the target for "off" and stops nothing in this boot: a stopped modem can't start again before a reboot, the sleep inhibitor stays anyway, and every modem power-off costs a UFS error-handler pass (MODEM-PLAN M2.6). "on" unmasks it and starts the stack only when this boot's modem never started. Its status reads without root; props.conf sits in a root-only folder, which counts as provisioned there. The switch exists only where the target is wanted at boot (`systemctl show -p WantedBy`, which sees vendor and /etc links) or masked. On the 9a, with its own modem start, and the 6 Pro, nothing wants it: status says "available": false, the page hides the switch, and "on" and "off" refuse, so the shell never starts a modem outside that phone's own starter. The Mobile network page shows the switch in its ready and off states, says when the change takes effect at the next restart, says the phone can't sleep only while the modem's sleep block is held (a start refused before any driver releases it), and offers "Restart now". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-shell: the Mobile network page with the modem off, from the 7 Pro test of #555 Found on the reference phone on 2026-11-13, testing #555's modem switch: - With the modem switched off for the boot, the only way to the page that turns it back on (the Mobile data tile's chevron) was hidden, and once shown it was greyed out with the tile. tile-state.sh now reports data_switch=off from omamobile-modem-switch, the tile says Modem off and keeps a working chevron (only in that case). - Right after switching it on, the page said the modem service isn't running and starts once the modem is set up; it now says it is starting until the phone service reports. - The heading was centred on the glyph and clipped when taller than it. - The page had no back arrow; it now has one, as the Wi-Fi and Bluetooth pages do, and Escape goes back to quick settings too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-modem-sit 0.3.37: tell the modem the screen state, only with [control] follow_screen The screen-state request (SET_SCREEN_STATE, then SET_IND_CMD_FILTER) was in the service but never sent, so the modem reported as for a lit screen all the time; each report wakes the AP and the link. With follow_screen = yes (off by default) sitd follows the panel's bl_power, never "off" during a call, and a systemd-sleep hook asks for "off" before a sleep. Without it sitd sends nothing new and the hook answers "not told". On a second 7 Pro (mine; LTE, idle): 47 indications in 60 s with the screen on, none with it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-modem 0.1.25, device-cheetah 0.1.56: modem-suspend-enable, only on the Pixel 7 Pro /etc/omamobile/modem-suspend-enable lifts the modem's sleep inhibitor for MODEM-PLAN M6, but only beside /usr/lib/omamobile-modem/suspend-runbook, a comment-only marker that only device-cheetah ships. The inhibitor unit is skipped only when both exist; the start script follows the same two files and says when the enable file is ignored. Without both, nothing changes. The link tests no longer read the machine's own enable file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * MODEM-PLAN: M6, suspend with the modem online The plan, the runbook and the results so far, on a second Pixel 7 Pro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-modem-sit 0.3.37: the cellular default route steps aside for a system sleep With the modem up and Wi-Fi connected, a system sleep was refused every time on the Pixel 9a: NetworkManager takes Wi-Fi down at logind's announcement, the bearer's metric-700 default route is then the only one, whatever was talking over Wi-Fi sends through the bearer at once, and the modem's link is up when the kernel looks (linux-omarchy-mobile#232's sleep guard). omamobile-sit-data now listens for logind's PrepareForSleep (a busctl monitor, no new dependency) and takes its default route away when a sleep is announced; the bearer's address stays. After the sleep the route waits for another default route to be back, or ten seconds without one: put back at once it carried a few seconds of traffic at every wake, and the answers ended the next sleeps early. A route that wasn't there (a silent bearer, roaming) is not brought back, and without busctl nothing changes. * MODEM-PLAN: which boots the NR counts cover, and the merged nr_after_radio_on on this phone Asked in #701's review: the plan says which boots each count covers, and the two journal lines from a boot of the merged option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgnCmDwY8r4r1jCa2SVYLN * omamobile-modem 0.1.26: one sleep policy for the inhibitor, with a kernel guard and an owner's opt-out Whether the phone may sleep with the modem up was two path conditions on omamobile-modem-inhibit.service and the same two files in the start script. It is now one script, omamobile-modem-sleep-policy, that both ask: the unit through ExecCondition= (inhibit: exit 0 holds the lock, 1 skips it) and the start script through check. Yes needs all of: - the device package's declaration, /usr/lib/omamobile-modem/suspend-verified (device-cheetah only, after MODEM-PLAN M6 passed on the reference 7 Pro on 2026-11-14), or the attended runbook's pair from before (the owner's modem-suspend-enable beside a device's suspend-runbook); - no /etc/omamobile/modem-suspend-disable, the owner's opt-out; - a running kernel whose modem link refuses a sleep early, from a PM_SUSPEND_PREPARE notifier, while the link is up (linux-omarchy-mobile#232, da171eae4cb7). Without it a sleep with the link up is refused only at noirq, and a run of those left mobile data dead until a reboot on 2026-11-13. The kernel adds no sysfs attribute or module parameter for it and development releases don't order, so the policy reads the running kernel's pcie-gs201-cp module file (modinfo -n; the start script hasn't loaded it yet) for the notifier's log line or its function name. kernel-2026.11.13's module has neither; the M6 test kernels' modules have both. Anything else, an error included, keeps the inhibitor. A policy that can't run skips the unit (systemd counts a failed exec as a skip), but the start script's call then fails too, it waits for a lock that never comes and loads no driver: the phone never sleeps with the modem up by accident. No other device ships the declaration, so the 9a and the 6 Pro keep the inhibitor. The tests run the policy for every combination and the start script with it (old kernel, opt-out, missing policy, the old pair), and the unit check in place of systemd-analyze condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-modem-sit 0.3.40: a device may turn follow_screen on in its drop-in A device's modem-sit.conf.d file was read for [audio] only. sitd now also takes [control] follow_screen from it (and nothing else from [control]: the socket's group stays the owner's), so the Pixel 7 Pro can tell its modem the screen state by default now that MODEM-PLAN M6 passed there, with texts and calls arriving and waking the phone with the screen dark (2026-11-14). A value in /etc/omamobile/modem-sit.conf still wins, and without a device default it stays off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-device-cheetah 0.1.57: sleep with the modem up on by default (MODEM-PLAN M6) The maintainer approved it on 2026-11-14 ("approve modem sleep by default on the 7 Pro"), after the reference phone passed every step of M6: two sleeps, ten sleeps refused before the freeze with data busy and the ping unbroken, a text and a call each waking the phone, audio both ways. The package now ships /usr/lib/omamobile-modem/suspend-verified, the phone's declaration that omamobile-modem 0.1.26's sleep policy reads, in place of the runbook marker, and [control] follow_screen = yes in its modem-sit defaults. No file of the owner's is needed; the policy still keeps the inhibitor on a kernel without linux-omarchy-mobile#232's early refusal and where the owner has made /etc/omamobile/modem-suspend-disable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * MODEM-PLAN, SUSPEND-PLAN, DEVICES: M6 done on the 7 Pro, on by default from kernel-2026.11.15 MODEM-PLAN section 7's status says M6 passed on the reference phone on 2026-11-14 and links SUSPEND-PLAN's record of it; 7.5 says what turns it on by default (the device's declaration, follow_screen, the sleep policy), the kernel guard and why it reads the module, the owner's opt-out, and the check after Updates. SUSPEND-PLAN's status line says the same. DEVICES' Suspend cell stays "partial", now saying the modem-up gap closes with kernel-2026.11.15 and these packages; it moves to "works" only after the release is checked on the phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * AGENTS: sleep with the modem up is on by default on the 7 Pro with kernel-2026.11.15 The maintainer approved it on 2026-11-14. The suspend-and-modem entry now says that on the Pixel 7 Pro with a kernel carrying linux-omarchy-mobile#232 and omamobile-modem 0.1.26 with device-cheetah 0.1.57 the phone sleeps with the modem up, that the sleep policy keeps the inhibitor on an older kernel, and that the owner can opt out. The rest of the entry, the 9a's rules among it, stands unchanged for every other phone, and going round a held inhibitor on a 7 Pro stays the maintainer's attended test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * omamobile-shell 0.2.131: above main's 0.2.129 for #555's Mobile network page #555's page and the page fixes carried in this branch were numbered 0.2.128, which main has since passed (0.2.129), and 0.2.130 is taken by an open pull request. No code change here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Hiroyuki Ikegami <ikegam@mixallow.net> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
What and why
The modem stack starts at boot through a vendor wants link (device-cheetah 0.1.43), so keeping it off meant
systemctl mask omamobile-modem-boot.targetover SSH. A phone with the modem up never sleeps (omamobile-modem-inhibitholds until the reboot) and runs warm, and a SIM-less or data-only owner may not want it at all, so the switch belongs on the phone.omamobile-modem-switch(omamobile-modem 0.1.24; pkexec, polkit actionorg.omamobile.modem.switch, the active local user without a password):offmasks the target and stops nothing in this boot (a stopped modem can't start again before a reboot, the inhibitor stays anyway, and every CP power-off costs a UFS error-handler pass, MODEM-PLAN M2.5/M2.6);onunmasks it and starts the stack only when this boot's modem never started.statusreads without root (props.conf's root-only folder counts as provisioned there).omamobile-modem-boot.targetis wanted bymulti-user.target(systemctl show -p WantedBy, which sees device-cheetah's vendor link) or masked. On the 9a and the 6 Pro,statussays"available": false, the page hides the switch, andon/offrefuse without touching systemd.Device and build
uname -r): 7.3.0-rc6-omamobile-push1-g0e3da55c9e9fChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: omamobile-modem, omamobile-shell)versionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
rmnet0, no UFS error-handler line, the page read "On" with LTE; switched off → masked, nothing stopped, "restart needed" until a clean reboot, after which the modem stayed off.7.3.0-rc6-omamobile-push1-g1668d1e8d1b0, modem up):statusas the user and as root readavailable: true;offmasked the target (WantedBystill readmulti-user.target, so it stays available) andrestart_neededturned true;onunmasked it and started nothing;omamobile-modemstayed active throughout, no UFS error-handler line. The page itself was not re-run on this version.userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)tools/phone-smokereportphone-smoke: cheetah
Kernel
7.3.0-rc6-omamobile-push1-g0e3da55c9e9f, tools ate19ea6c, 2026-11-09T08:54Z.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.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.13-1, omamobile-boot-update 0.1.0-1, omamobile-device-cheetah 0.1.45-0.1, omamobile-fingerprint 0.1.15-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.16-1.2, omamobile-modem-sit 0.3.32-0.1, omamobile-omarchy 0.1.32-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.101-1.1, omaphone 0.2.3-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1
🤖 Generated with Claude Code