Time: chrony replaces timesyncd, with NICT/JP-pool NTP primary and gpsd SHM as an offline-only refclock; makestep any time and fake-hwclock cover the battery-less RTC. Antenna: the modem cleared the supply again after the service set it, so the service is now idempotent, configurable (ANTENNA=active|passive, passive keeps it off) and re-checked by a 30 s timer. gpsd: a gpsdctl udev hook spawned a stray gpsd without -n at boot that blocked the real service; gpsd.service now binds to the NMEA device. GNSS: CGNSSMODE=15 (GLONASS, BeiDou, Galileo, QZSS) and all supported NMEA sentences; both persist across a modem reset. Adds sim7600-at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.6 KiB
type, date
| type | date |
|---|---|
| report | 2026-10-08 |
Time Sync and Timezone
Result
| Item | State |
|---|---|
| Network time | chrony (since 2026-10-09; was systemd-timesyncd), primary ntp.nict.jp (stratum 1) + JP pool + Ubuntu pools, over whichever uplink holds the default route |
| Timezone | Asia/Tokyo (was Asia/Yakutsk: same +09:00 and no DST either, but the wrong place) |
| Clock across power-off | Not kept. The RTC has no backup battery (see below) |
| GPS time | chrony refclock GPS (gpsd SHM 0), fallback only; used when offline with a fix |
| Boot clock without network | fake-hwclock restores the last saved time (replaces timesyncd's saved timestamp) |
RTC loses time when powered off
On the 2026-10-08 cold boot, the kernel set the system clock from rtc0 (nvvrs-pseq-rtc, hctosys=1) to June 4.
Then the clock was corrected in two steps:
- ~12 s: timesyncd stepped forward to its last saved timestamp (
/var/lib/systemd/timesync/clock). This is close, but behind by however long the board was off. - ~43 s: first NTP sync corrected the rest. The kernel then writes the synced time back to the RTC, which only lasts until the next power-off.
Until step 2, timestamps are wrong, and with no uplink (in the car, out of coverage) they stay wrong. The fix is hardware:
an RTC backup battery (see BOM). rtc1 (tegra_rtc) isn't used for boot time and reads 1970.
Configuration
sudo timedatectl set-timezone Asia/Tokyo
/etc/systemd/timesyncd.conf.d/10-servers.conf:
# Japan-local primary (NICT, national time standard), global pool as backup.
[Time]
NTP=ntp.nict.jp
FallbackNTP=ntp.ubuntu.com 0.jp.pool.ntp.org 1.jp.pool.ntp.org 2.jp.pool.ntp.org
sudo systemctl restart systemd-timesyncd, then check with timedatectl timesync-status (server, stratum, offset).
Chrony with GPS fallback (2026-10-09)
Replaced systemd-timesyncd (removed by the chrony package) so GPS can serve as an offline time source.
sudo apt install chrony fake-hwclock
/etc/chrony/conf.d/10-yukart.conf:
server ntp.nict.jp iburst prefer
pool 2.jp.pool.ntp.org iburst maxsources 2
refclock SHM 0 refid GPS precision 1e-1 offset 0.0 delay 0.5 poll 3
- NTP stays primary. The GPS refclock's generous
precision/delaygive it a large root distance, so any reachable NTP server wins. It steers the clock only offline with a fix. NMEA over USB has no PPS, so GPS time is good to ~tens of ms, plenty for log timestamps. offset 0.0is a placeholder. Tune it once NTP and a GNSS fix are both available:chronyc sourcestatsshows the GPS offset against NTP.makestep 1 -1in/etc/chrony/chrony.conf(was1 3): step the clock whenever it's > 1 s off, not only in the first three updates, because with no RTC battery a stale clock may only meet its first source (a late GPS fix) well into an offline drive. chrony's config format has no inline comments; the explanation sits on its own line above.fake-hwclocksaves the time hourly and at shutdown and restores it at boot, so an offline boot starts near the last shutdown instead of the RTC's reset date. This replaces what timesyncd's/var/lib/systemd/timesync/clockdid.- gpsd must run with
-nto feed SHM without a client. See the SIM7600 report: a stray gpsd started by agpsdctludev hook ran without it, now fixed.
Check: chronyc -n sources (^* = selected NTP server, # = GPS refclock), chronyc tracking.
At setup: synced to ntp-a3.nict.go.jp (stratum 1); GPS listed with no samples (antenna detached indoors).