Add Config -> Sync net time manual trigger
The reflashed image starts chronyd at ~27 s, before NetworkManager installs a usable resolv.conf, so pool.ntp.org stays unresolved and minpoll 12 would wait up to 4096 s. Wi-Fi came up at ~30 s but the clock was only stepped at ~112 s, when usb0 emitted another dispatcher event. - Config -> Sync net time in the built-in dmenu Config menu runs bananarchy-sync-net-time.sh, forces a burst via bananarchy-time-sync.sh sync and shows a desktop notification with the UTC date or a failure. - New sync mode reports success/failure and exit status; resolved() now requires at least one known source, DNS waits run before the flock, and network-up/force/sync get 8 retries so a slow boot retry cannot swallow network-up events. - Rebuilt dmenu.so from src/sxmo-dmenu/dmenu.c into prebuilt/ and overlay/; apply-bananarchy-overlay.sh keeps the wrapper root-owned and executable; check-rebuild.sh guards the menu entry, wrapper and sync mode. - Rebuilt and verified images/bananarchy-nokia-argon.img (all new files byte-identical to overlay, boot.img unchanged, 27 initramfs modules). Live verification on the reflashed phone: helper sync as the X session user prints "Network time synced: 2026-11-07 20:17:43 UTC", the wrapper posts a notification, a DNS-down sync fails clearly after 16 s, restoring DNS syncs again, and the rebuilt dmenu daemon was reloaded with the new Config item.
This commit is contained in:
1 parent
9ac39ce6bf
commit
85c6a7b886
12 files changed
+177
-16
No files matched your search
@@ -584,9 +584,12 @@ The **Xlibre** display server (`modesetting_drv.so`) uses **Glamor + DRI3 + GLX
|
||||
|
||||
`chronyd` runs from the default runlevel with `pool pool.ntp.org iburst minpoll 12 maxpoll 16`: long polls keep Wi-Fi asleep, while `iburst` sets the clock within seconds whenever the pool resolves. Because NetworkManager installs `resolv.conf` after `chronyd` starts, a `bananarchy-time-sync` OpenRC service and `/etc/NetworkManager/dispatcher.d/20-bananarchy-time-sync.sh` re-resolve the pool and request an immediate burst when a connection comes up (`up`, `dhcp4-change`, `dhcp6-change`, `dns-change`, `connectivity-change`, `vpn-up`). The helper uses chronyd's root-only Unix command socket, so `cmdport 0` keeps the UDP command port closed, and it throttles repeats with a monotonic uptime stamp so a decades-long clock step cannot confuse it. `/var/lib/chrony` is owned by the `chrony` user so the driftfile survives reboots.
|
||||
|
||||
If the clock is still wrong after a connection comes up, use **Config -> Sync net time**. It runs `bananarchy-sync-net-time.sh`, forces an immediate burst over the same Unix socket, and shows a notification with the synced UTC date or a failure message. This is also handy after a long offline period, when the RTC has fallen back to 1970.
|
||||
|
||||
```bash
|
||||
bananarchy-time-sync.sh status # chronyc tracking + sources (via doas)
|
||||
bananarchy-time-sync.sh force # re-resolve the pool and burst immediately
|
||||
bananarchy-time-sync.sh sync # force and print a human-readable result
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user