Repository navigation
omamobile-modem-sit 0.3.45: mobile data back at once after a wake with no Wi-Fi, and a reconnect that comes back IPv6 only tried again - #837
Conversation
|
Thank you, both of these come straight out of your night's runs, and the numbers make the case: one echo of three after 155 wakes, three of three after the change. I read the route change through Two things before it merges:
One note for that run and for #759: while a default route through the USB gadget stays configured, Small things: in the half second after the route returns |
…se that failed is done first, and the route's wait knows the bearer was alone across a wake From the review of derekross#837. A reconnect that comes back IPv6 only is released and tried again three times in a row at most (IPV6_ONLY_RELEASES). The next such bearer is kept as the network gave it, with one line saying so, and so are the ones after it, until a setup brings IPv4 again. On a network that only ever grants IPv6 for the APN, every try used to set the bearer up and release it for the rest of the boot, holding sitd's loop each time. If that release itself fails, the bearer stays listed with its IPv6-only record and the next try said "listed again; no setup needed". sitd now remembers that a release is owed, says the bearer is still listed IPv6 only, and releases it before the setup. A bearer nobody meant to release (the network's grant at start-up, or one kept after the bound) is still left alone when the modem lists it again. The route service kept "was cellular the only way out" in the variable it also resets to print the path again, so in the half second between the route's return and the next check a sleep waited RETURN_GRACE once more. The answer now lives in SleepHold (seen), which takes it only from checks made while the route is its own business. Tested: test_data_call_change.py gains four cases (activate granting IPv6 only every time: three releases and no more over later drops, one "keeping" line; IPv4 again starts the count afresh; a failed release is done before the next setup; an IPv6-only bearer listed again is left alone) and test_data_network.py two for the hold. test/all passes. Not run on a phone yet.
|
Done, in 9c2190b.
Unit tests only so far: this commit has not run on a phone. My palmtop gets it with its next modem start. On the gadget's default route: in my runs the log said "as the only way out" after each wake, so my palmtop had no default route through the gadget then. I haven't looked at why. |
…ell to works (opt-in), with the runs on the published branch The cell's old condition was a fix for the third no-wake and a series from the published kernel as it is. Kernel derekross#247 is merged, and on derek/omamobile at 26867fc4e (derekross#224, derekross#232, derekross#247, derekross#258) 300 of 300 sleeps with a 60 s alarm woke with the modem off on the night of 2026-11-17: 296 on the alarm and 4 within seconds on the touchscreen's interrupt with nobody at the palmtop. On 2026-11-16, 86 of 86 sleeps entered with the modem up woke, each ended by the modem within 29 s, so none of those reached its alarm. From the review of derekross#846: the word is "works (opt-in)", since auto-sleep ships off on the 9a (omamobile-device-tegu doesn't install /usr/share/omamobile/auto-sleep-default); the cell says again that a new sleep test runs attended first and that the modem's inhibitor stays, the owner's palmtop under derekross#809 excepted; and it cites merged notes, not derekross#758's comments. MODEM-PLAN gains the 2026-11-16 section: the runs on the test kernel and on the published branch under derekross#809's terms, the route finding that became derekross#837, and the palmtop hanging awake twice at a power-up of the modem's link (once between the sleeps of a series, once in everyday use with Wi-Fi connected), with the NV check after each. The Modem cell names those hangs. SLEEP-PLAN's S1 table gains a row for the 86 modem-up sleeps and one for the night's 300, and its status line is brought up to date.
|
Thank you, that was quick, and it is what I asked for. The bound reads right: three releases in a row, then the bearer stays as the network gave it, and the count runs across drops, so a network that only ever grants IPv6 costs three releases in a boot. What's left before it merges:
items = data_call.entries(self.client.request(0x0602, timeout=10))
listed = next((i for i in items if i[2] == cid), None)
unreleased = FalseTwo small things, as you see fit:
|
…h no Wi-Fi, and a reconnect that comes back IPv6 only tried again On the 9a with Wi-Fi off, the cellular default route came back 10 s after every wake (the grace that waits for Wi-Fi), so a ping 5 s after each of 155 wakes got only its last echo. The grace now applies only when something else led out before the sleep. In the same night's runs the network dropped the internet bearer once and sitd's reconnect asked for IPv4v6 but got IPv6 only, which omamobile-sit-data can't use, so mobile data stayed down. Such a bearer is now released and counts as a failed try, retried with the usual backoff.
…se that failed is done first, and the route's wait knows the bearer was alone across a wake From the review of derekross#837. A reconnect that comes back IPv6 only is released and tried again three times in a row at most (IPV6_ONLY_RELEASES). The next such bearer is kept as the network gave it, with one line saying so, and so are the ones after it, until a setup brings IPv4 again. On a network that only ever grants IPv6 for the APN, every try used to set the bearer up and release it for the rest of the boot, holding sitd's loop each time. If that release itself fails, the bearer stays listed with its IPv6-only record and the next try said "listed again; no setup needed". sitd now remembers that a release is owed, says the bearer is still listed IPv6 only, and releases it before the setup. A bearer nobody meant to release (the network's grant at start-up, or one kept after the bound) is still left alone when the modem lists it again. The route service kept "was cellular the only way out" in the variable it also resets to print the path again, so in the half second between the route's return and the next check a sleep waited RETURN_GRACE once more. The answer now lives in SleepHold (seen), which takes it only from checks made while the route is its own business. Tested: test_data_call_change.py gains four cases (activate granting IPv6 only every time: three releases and no more over later drops, one "keeping" line; IPv4 again starts the count afresh; a failed release is done before the next setup; an IPv6-only bearer listed again is left alone) and test_data_network.py two for the hold. test/all passes. Not run on a phone yet.
…, and a release owed ends with the bearer From the review of derekross#837. Once the bound is reached and an IPv6-only bearer is kept, sitd no longer starts omamobile-sit-data on it: the route service needs IPv4, and started there it failed and was started again every 10 s for the rest of the boot. Mobile data stays wanted, so the next bearer that comes with IPv4 starts it. And a release owed from a try that failed is cleared when the modem no longer lists the bearer, so a kept bearer listed later isn't released for it. Tested: test_data_call_change.py (the bounded case now checks the route isn't started on the kept bearer and is started when IPv4 comes back; a new case drops the bearer after a failed release and checks nothing more is released) and test/all.
9c2190b to
6592bc4
Compare
|
Rebased onto main after #881, now 0.3.45 (the version file and the three commit subjects). The conflict at the top of the Both small points are in a third commit (6592bc4):
The modem-up series on this head is next. My palmtop is on a modem-off sleep series for the auto-sleep question until late today, so the modem-up run follows that, with the result here. |
|
The modem-up series on this head (6592bc4), on my palmtop today, under #809's terms:
|
omamobile-modem-sit is 0.3.46 here, after main's 0.3.44 and derekross#837's 0.3.45; the audio defaults keep this branch's tegu_route and tegu_aec beside main's control follow_screen.
Two fixes from tonight's modem-up sleep runs on my Pixel 9a (#758, under #809), both in the data path after a wake.
Mobile data back at once after a wake when nothing else leads out.
omamobile-sit-datatakes the cellular default route away at logind's sleep announcement and, after the wake, waits for Wi-Fi or forRETURN_GRACE(10 s), which #750 added so traffic doesn't leak over the bearer while Wi-Fi reconnects. With Wi-Fi off, though, that means no mobile data for the first 10 s of every wake: in 155 wakes withWIFI=offthe series' ping 5 s after the wake got only its last echo back every time. Awake, with the link idle, the same ping got 3 of 3. And on the 99th wake, the wake was at 23:04:22.33 and "The cellular default route is back as the only way out" at 23:04:32.64. The wait now applies only when something else led out before the sleep. That is read from the previous check (last), before NetworkManager reacts to the same signal, so Wi-Fi going down for the sleep doesn't count. A sleep during the wait keeps what was known before it. With Wi-Fi connected, nothing changes.A reconnect that comes back IPv6 only is released and tried again. In one boot the network dropped the internet bearer (
the internet bearer (CID 1) is gone from the list), and #817's reconnect ran 3 s later as designed. It asked for IPv4v6, as at start-up, but this time the network granted PDP type 2 (start-up had got 3).omamobile-sit-datathen failed at every restart with "An active IPv4 internet bearer is required", and mobile data stayed down until a reboot. A reconnect asking for IPv4 that gets IPv6 only now releases the bearer (data_call.deactivate) and counts as a failed try, so it is retried on the existing backoff (15 s, doubling).Tests:
test_data_network.pyhas three new SleepHold cases (back at once when alone; Wi-Fi before the sleep still waits; a sleep during the wait keeps what was known), andtest_data_call_change.pyhas one for the IPv6-only reconnect, which is released, retried, and on IPv4v6 starts the route service.packages/omamobile-modem-sit/test/allpasses.On the palmtop, with this package (
push1-g716f6d8ef355,WIFI=off,modem-sleep-series.sh 10 120, the boot ended insystemctl reboot): 10 requests, 9 entered, 1 refused by the link's notifier. After every wake: ping 3 of 3 and DNS answered, where 155 wakes before the change got 1 of 3. The network didn't drop the bearer in that run, so the IPv6-only path is tested only by the unit test so far.