Repository navigation
omamobile-device-tegu 0.2.21: no service watchdogs, a 9a sleep runs with the kernel's clock ticking (#765) - #766
Conversation
…ith the kernel's clock ticking (derekross#765) systemd's service watchdogs count on CLOCK_MONOTONIC, and on the 9a that clock runs through a sleep: s2idle stops it only when a cpuidle state is entered through its s2idle callback, and the 9a never gets there (no idle states in the published device tree; the cpuidle sleep hook keeps the cores in WFI where there are). After a sleep longer than three minutes systemd aborted journald, logind or homed at the thaw, and with logind gone the lock screen was unusable until a reboot. One drop-in for every system service turns the watchdogs off until a 9a sleep stops the clock. The package test checks that it does that and nothing else.
|
Thank you for chasing this down to the clock, and for the journal in #765: four long sleeps, each costing a service, and none of the short ones, is clear. I read the kernel side in our tree, and it is as you say. I'll decide this one myself, as you offered. The cost, no watchdog restart for a hung journald or logind, is real but small next to a lock screen that stops working after every long sleep, so I'm inclined to take it. Three small things:
The version may move at merge: #779 also bumps this package, and the two meet in |
# Conflicts: # packages/omamobile-device-tegu/test/all # packages/omamobile-device-tegu/version
|
Thank you. The first is done, and the second is under way:
Good catch on |
|
The packaged path, closed: after a clean reboot with |
|
Thank you, both are closed: the AGENTS line now points at #765, and the reading after a clean reboot with the package as built, I owe you a correction. My third point was wrong, and your first reasoning was right. Somnius's measurement on #765 shows the 8 Pro has the same problem, and zuma has no idle states either, so the 8a will too. Your package is the right place for the 9a's evidence. For husky and akita, either the same file in their device packages or your generator idea from #765 (the drop-in written only while I'm taking this one, as I said I was inclined to. I'll merge it with a squash message for 0.2.21. |
The stopgap from #765, with a sleep series behind it. Yours to refuse if you'd rather wait for the kernel to stop the clock.
What and why
On the 9a the kernel's clock runs through a sleep: s2idle stops CLOCK_MONOTONIC only when a cpuidle state is entered through its s2idle callback (
tick_freeze()), the published device tree has no idle states, and where a kernel has them the cpuidle sleep hook keeps the cores in WFI for the sleep. systemd's service watchdogs count on that clock, so after a sleep longer than three minutes it aborted journald, logind, homed or userdbd at the thaw; with logind gone the lock screen took no swipe until a reboot. The journal lines and the mechanism are in #765.omamobile-device-tegu0.2.19 adds one file,/usr/lib/systemd/system/service.d/10-omamobile-tegu-sleep-watchdog.conf:WatchdogSec=0for every system service. Its comment says when to remove it (when a 9a sleep stops the clock). It has to be a packaged file and not something a unit writes at boot: a running service keeps the watchdog it was started with, so a runtime drop-in anddaemon-reloadchanged nothing in my first try.The cost is the watchdogs themselves: a hung journald or logind is no longer restarted by systemd on the 9a. Nothing on the 9a relies on that today, and the other route to it (leaving them on) breaks the session at every long sleep.
AGENTS.mdgets a note under "Suspend and modem" with the symptom and the check (journalctl -b | grep 'Watchdog timeout').Tested
On my palmtop (Pixel 9a), 2026-11-14,
7.3.0-rc6-omamobile-push1-gc50fd8fdf42a(no cpuidle driver:current_driverreadsnone), the modem registered, with the same drop-in under/etc/systemd/system/service.d/from boot (the package itself is not installed there yet):With it
WatchdogUSecread 0 for journald, logind, homed, userdbd, udevd, resolved, timesyncd and coredumpd; after the series: no "Watchdog timeout" line,NRestarts0 for journald, logind, homed and userdbd, sddm quiet, Hyprland running, the modem ONLINE.packages/omamobile-device-tegu/test/all(it now checks the drop-in holds[Service]andWatchdogSec=0and nothing else, that it is the only one for all services, and that no unit of the package sets a watchdog),tests/allandtools/pr-checkpass.Not tested
/usr/lib/systemd/system/service.d/; the test used/etc, which systemd reads the same way.The version is 0.2.19 here; #483's rebase names the same number, so one of them moves at merge.