Repository navigation
Conversation
…r 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.
Open
8 of 9 tasks
Contributor
Author
|
An overnight run with this change in place on the 9a (2026-11-13 to 11-14, one boot, the test kernel with linux-omarchy-mobile#232 and the sleep guard on for zumapro; the service's file is this branch's logic applied on #697's version). Wi-Fi connected and LTE registered throughout; the owner was not at the palmtop and told me to run it without him.
The kernel side of the count is on linux-omarchy-mobile#232. |
7 of 9 tasks
Contributor
W4HO-ham
added a commit
to W4HO-ham/omarchy-mobile
that referenced
this pull request
Nov 14, 2026
… nothing by hand (2026-11-14) 30 of 30 requests entered with omarchy-mobile#556's phone-service package and follow_screen on: sitd told the modem the screen state itself, the sleep hook ran each time, and the route change that was derekross#750 is part of derekross#556 now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Option A from my note on #556, written and run on a Pixel 9a. Draft: it only matters once a phone can sleep with the modem up (kernel #232), so it should wait for that, and you may want it folded into #556 instead. The version number moves at merge (#697 and #556 both name 0.3.37 too).
What
With the modem up and Wi-Fi connected, every system sleep on the 9a was refused. At logind's announcement NetworkManager takes Wi-Fi down; the bearer's metric-700 default route is then the only one; whatever was talking over Wi-Fi sends through the bearer in the same second; and the modem's link is up when #232's notifier looks.
omamobile-sit-dataowns that route, so it now steps aside for a sleep:PrepareForSleepthrough abusctl monitorchild (systemd is already a dependency; without busctl nothing changes);The logic is in a small class,
SleepHold, with unit tests; the loop only asks it what to do.Tested
packages/omamobile-modem-sit/test/allandtools/pr-check: pass. New unit tests for the announcement parser and forSleepHold(the route goes at the announcement, waits for Wi-Fi after, returns alone after the grace, is not invented, survives a second sleep during the wait, and roaming ends it).On my palmtop (Pixel 9a), 2026-11-13, a test kernel with kernel #232, the maintainer's 6.1 and 6.2 patches from its review and
sleep_guardon for zumapro (7.3.0-rc6-omamobile-push1-gc50fd8fdf42a); LTE with IMS registered, Wi-Fi connected, the data service running, the owner's VPN daemon as the talker; RTC sleeps of 60 s requested withsystemctl suspend -i, the modem told "screen off" by hand before each:omamobile-sit-dataSleepHoldAfter every series the phone service answered and
ping -I rmnet0got 5 of 5, except the last, which ended in a watchdog reset 20 s after its twelfth sleep had ended; that hang is in the kernel's link power-up, awake, and is reported on kernel #232. In the fourth series sit-data logged "The cellular default route is back behind Wi-Fi" 20 of 20 times and "Default internet path cellular" not once.The file that ran was this change applied on top of #697's
data_network.py(the palmtop runs #697's build), not this branch's file byte for byte; the packaged file was put back afterwards.Not tested
follow_screen.