Skip to content

omamobile-gnss: keep the hang marker through shutdown - #462

Merged
derekross merged 3 commits into
derekross:mainfrom
W4HO-ham:w4ho-gnss-marker-clean-stop
Nov 10, 2026
Merged

derekross merged 3 commits into
derekross:mainfrom
W4HO-ham:w4ho-gnss-marker-clean-stop

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

A hang while the Pixel 9a GNSS service is stopping can clear its persistent hang marker before the GNSS processes have actually exited. A later location request can then start the same failing path again.

Keep the marker until systemd has stopped the service successfully. Associate the session and stop request with the systemd invocation so a failed start, unexpected exit, timed-out stop or later skipped start cannot clear an earlier marker.

Tested:

  • Package tests, including failed stops, unexpected exits and a later skipped start; real systemd fixtures for a clean stop and a SIGKILL.
  • On the Pixel 9a daily bring-up kernel, a 150-second on-demand session produced 112 fixes from 115 valid GGA sentences. A second on-demand session restarted successfully and delivered 141 fixes over 140 seconds, with a maximum 1.1-second gap and advancing fix timestamps. The modem stayed online; both sessions stopped after their idle lease and cleared the marker. Protected-partition checks and the required device health checks passed afterward.
  • The full package suite on maclab passed except speaker-tuning's Python 3.14 test-module name collision; that suite passed separately in an isolated copy with test/__init__.py added.

Clear the 9a marker only after systemd has stopped the GNSS service cleanly. A failed stop or unexpected exit retains it so a later location request cannot repeat a hang.
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. Moving the clear to ExecStopPost, and tying it to this invocation's own stop request and a success result, is the right fix: a stop that hangs or times out now keeps the marker, and a later skipped start can't clear an earlier session's. I read both branches. On the Pixel 7 Pro, --stopped exits at once and --stop and the start are unchanged, so nothing changes there. Your test also catches it if I drop the result check or ignore a failed profile stop, which is good to see.

One thing before I merge: the template's evidence. Could you add the kernel release (uname -r), the package the two sessions ran (pacman -Q omamobile-gnss, and whether it was built from 8c78927), and the tools/phone-smoke report from that boot?

A small suggestion, not blocking: on the 9a, omamobile-gnss-start --retry run by hand now clears the marker and then refuses ("no systemd invocation ID"). That's the safer behaviour, since the next location request starts GNSS inside the unit. But the skip message still reads as if --retry starts it. A line saying "the next location request starts it" on the 9a would avoid confusing whoever hits it.

At merge I'll use your commit's subject with the version, "omamobile-gnss 0.2.8: keep the hang marker through shutdown".

… what starts GNSS

Run by hand, omamobile-gnss-start --retry cleared the hang marker and then refused with "no systemd invocation ID", and the skip message read as if --retry started GNSS. On the 9a it now says that the marker is cleared and that the next location request starts GNSS, in its unit; the skip message says the same. The 7 Pro's messages are unchanged. The test covers the by-hand retry: marker gone, nothing started.
@W4HO-ham

W4HO-ham commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Your suggestion is in (e44af0a): on the 9a, omamobile-gnss-start --retry by hand now clears the marker and says "the next location request starts GNSS" instead of refusing, and the skip message says the same, so nobody reads --retry as the thing that starts it. The 7 Pro's messages are unchanged; the test covers the by-hand retry (marker gone, nothing started).

The evidence you asked for (uname -r, pacman -Q omamobile-gnss and whether it was built from 8c78927, and a tools/phone-smoke report from that boot) I'll add once the palmtop is out of today's suspend series; those two sessions ran before I took this branch over, so I'll install this head and run the pair again rather than reconstruct the old boot.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. The new by-hand --retry is better than what I
suggested: it clears the marker, says the next location request starts GNSS,
and nothing starts outside the unit. I read it through, and the unit's own
path and the 7 Pro's are unchanged. The test covers it too.

Re-running the pair of sessions on this head rather than reconstructing the
old boot is the right way to do it, thanks. When you post it, please include
uname -r, pacman -Q omamobile-gnss (built from e44af0a) and the
tools/phone-smoke report from that boot. Then I'll merge it as
"omamobile-gnss 0.2.8: keep the hang marker through shutdown".

One small optional thing: the skip and --retry messages name
omamobile-gnss-start, which lives in /usr/lib/omamobile-vendor/ and isn't
on PATH, so the full path would save whoever reads it a search.

@W4HO-ham

W4HO-ham commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

The pair of sessions on this head, 2026-11-09 on the palmtop: uname -r 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty (the owner's integration kernel, build #100), pacman -Q omamobile-gnss 0.2.8-1, built on the palmtop from e44af0a with tools/phone-install-package. The modem was up from omamobile-device-tegu's boot unit (ONLINE, registered, gnssd in the profile). Each session is what Omarchy's Location switch does: a client connects to /run/omamobile-gnss/nmea.sock, the socket unit starts omamobile-gnss-nmea and it starts omamobile-gnss (the gnss-slsi profile), the client reads for 150 s and disconnects, and the idle lease stops the service.

  • Session 1: 143 GGA sentences, 142 with a fix, the first fix at the 39th sentence, up to 24 satellites. The service was active and the marker present during the session; 75 s after the client left, omamobile-gnss inactive, the marker gone, gnssd still running, the CP ONLINE.
  • Session 2 (the restart): 143 GGA, 141 fixed, first fix at the 62nd, up to 26 satellites; the same clean stop and clear afterwards.

tools/phone-smoke on that boot: every required check ok (boot on slot B, the storage guard with only userdata and slot B's images writable, root with 91 GB free, kernel health with no oops or WARN, USB gadget, session), and display 1080x2424, GPU on panthor, lock, touch, buttons, Wi-Fi up, Bluetooth, battery 88 %, the AoC sound card, sensors, three cameras, thermal 41 °C all ok; no failed units.

The skip and --retry messages now give /usr/lib/omamobile-vendor/omamobile-gnss-start as its full path, as you suggest, in the next push.

omamobile-gnss-start lives in /usr/lib/omamobile-vendor, not on PATH, so the two 9a messages that name its --retry now give the path.
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. That's everything I asked for: the kernel release, the
package built from e44af0a, both sessions with their fixes and the clean
stop and cleared marker after each, and the smoke summary from the same
boot. The head is one commit past what you tested, and that commit only
changes the two message strings, so the run stands for it. Thanks for the
full path in the messages too.

Merging as "omamobile-gnss 0.2.8: keep the hang marker through shutdown".

@derekross
derekross merged commit d47c90b into derekross:main Nov 10, 2026
2 checks passed
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…s#462)

* omamobile-gnss 0.2.8: keep the hang marker through shutdown

Clear the 9a marker only after systemd has stopped the GNSS service cleanly. A failed stop or unexpected exit retains it so a later location request cannot repeat a hang.

* omamobile-gnss: on the 9a, --retry by hand clears the marker and says what starts GNSS

Run by hand, omamobile-gnss-start --retry cleared the hang marker and then refused with "no systemd invocation ID", and the skip message read as if --retry started GNSS. On the 9a it now says that the marker is cleared and that the next location request starts GNSS, in its unit; the skip message says the same. The 7 Pro's messages are unchanged. The test covers the by-hand retry: marker gone, nothing started.

* omamobile-gnss: the skip messages give the retry's full path

omamobile-gnss-start lives in /usr/lib/omamobile-vendor, not on PATH, so the two 9a messages that name its --retry now give the path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants