Power plan: battery-low shutdown built; logrotate's jetson-logging fixed
/ crosscheck (push) Successful in 0s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-14 08:32:17 +09:00
parent 0f3b33a3e7
commit fc9f93336e
2 changed files with 32 additions and 2 deletions
+7 -2
View File
@@ -1,7 +1,7 @@
---
type: plan
status: active
updated: 2026-10-09
updated: 2026-10-14
---
# Car Power: Ride Through Cranking, Shut Down at Ignition Off
@@ -32,11 +32,16 @@ A small host service polling the INA219 about every 1 s:
| on input | current ≥ about 0 | nothing |
| on battery | discharging, < grace | publish `system/power` "on battery"; **a short episode that recovers is a crank**: stamp it into the recording |
| ignition off | discharging continuously for grace (start at 60 s; tune after the car crank test) | publish "shutting down" → stop capture (close the session cleanly) → optional parked-at-home step → `systemctl poweroff` |
| battery low | voltage below a floor (around 10.5 V for 3S, to confirm), at any time | `systemctl poweroff` immediately |
| battery low | **built 2026-10-14** (svc-core `orin-status --poweroff-below 11.0 --poweroff-after 30`): below 11.0 V *while discharging*, 30 readings (1/s) in a row; a missing reading restarts the count | state `stopping` on `yukart/system/orin-status`, then `systemctl poweroff` through svc-gw's polkit grant (no sudo) |
Optional parked-at-home step: if home WiFi/LAN is reachable at ignition off, stay up long enough to copy recordings off over the LAN
(same LAN-only rule as map sync, project-yukart decision 10), within a hard time cap, then shut down.
The battery-low row came first: on 2026-10-14 the pack ran flat overnight with the Orin up and nothing to stop it,
and the boot's journal ends mid-stream at 06:29:22 (ext4 replayed its journal on the next boot; nothing lost).
11.0 V while discharging at the Orin's ~0.45 A is about 10 % charge, a margin for a clean shutdown; 30 s rides out a
crank or a load spike. The ignition-off rows are still to build.
## Open: getting the Orin back on at ignition on
After `poweroff` the UPS keeps supplying the board from its battery:
+25
View File
@@ -0,0 +1,25 @@
---
type: report
date: 2026-10-14
---
# logrotate failed every day: NVIDIA's jetson-logging
`logrotate.service` failed on every run (`error: stat of /data/logging-volume/*.log failed: Permission
denied`), leaving a permanent entry in `systemctl --failed`.
**Cause.** `/etc/logrotate.d/jetson-logging` (package `nvidia-jetson-services`) has two stanzas for
`/data/logging-volume/*.log`. The first rotates as user `logging` (`su logging logusers`), but `/data` is
`drwx------ root`, so that user cannot reach the directory. The second is the package's copy for setups where
that user does not exist: same files, rotated as root. With both present, logrotate also reports a duplicate
entry. The directory is empty: nothing on this host writes there.
**Fix (2026-10-14).** The first stanza is removed; the root stanza and the Docker one stay. A comment at the top
of the file says so. Original kept at `~/infra/logrotate/jetson-logging.orig`.
```bash
sudo logrotate -d /etc/logrotate.conf # dry run: no error for jetson-logging
sudo systemctl start logrotate.service # "Finished Rotate log files."
```
The file is a dpkg conffile: an upgrade of `nvidia-jetson-services` that changes it asks whether to keep the
local version. Keep it (or re-apply: drop the `su logging logusers` stanza).