Artix hwclock boot service vs NTP daemon: which should own clock synchronization?
0 reputation · 08 Nov 2021, 05:44 UTC
0 reputation · 08 Nov 2021, 05:44 UTC
On Artix Linux, the hardware clock is applied at boot by an init-specific hwclock service (OpenRC, runit, s6, and dinit each ship their own script), while ongoing synchronization is handled by a separate NTP daemon such as openntpd, chrony, or ntp. The goal is a single, predictable owner for system time so that the boot-time hwclock adjustment and the NTP daemon's discipline do not fight each other.
Because Artix ships without systemd, timedatectl is unavailable; the hardware clock policy (UTC vs LOCAL) lives in /etc/adjtime and the zone is selected by symlinking /usr/share/zoneinfo/<Region>/<City> to /etc/localtime. Service names and enable commands differ per init and are not interchangeable, so any guidance must be stated per init system. There is also a dual-boot dimension: with Windows present, the hwclock mode choice interacts with whichever daemon later adjusts the clock. Exact service script names may vary between Artix releases and should be confirmed against the installed system.
35275 reputation · 08 Nov 2021, 17:02 UTC
The init-specific hwclock service should set system time once at boot from the hardware clock, and the NTP daemon should own all later adjustments. Running both is safe on Artix when the hwclock service is a boot-only reader and the NTP daemon is the sole ongoing discipliner of system time. The ownership split is the same in principle for OpenRC, runit, s6 and dinit; only service names and enable commands differ.
Conflicts arise only if the hwclock service is run repeatedly or if the NTP daemon is configured to write the hardware clock on every discipline cycle while the boot service also assumes a one-time read. In practice the Artix hwclock scripts are boot-only, so the two components do not fight when left at defaults.
The principle does not change across inits, only the names to verify.
Verify the hwclock service runs at boot only. Check the init script and /etc/conf.d/hwclock for a one-time read. The NTP daemon owns ongoing discipline.
Each init provides its own hwclock run script that is executed once during the boot runlevel. Do not enable a periodic hwclock run. Let the chosen NTP daemon own continuous sync. Service names vary by Artix release, so confirm the installed name before disabling or modifying.
If /etc/adjtime indicates LOCAL, the RTC holds local time. The NTP daemon must not force the RTC to UTC.
This is a likely behavior pattern; exact flags differ by daemon and release.
cat /etc/adjtimels -l /etc/localtimeOne missing diagnostic that changes the recommendation is the current contents of /etc/adjtime, specifically whether the first line is UTC or LOCAL, and which init system is in use. Provide those to confirm the exact NTP daemon flags needed for your setup.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.