[arch-general] Systemd and time synchronisation problems

mike cloaked mike.cloaked at gmail.com
Tue Sep 11 15:06:21 EDT 2012


On Tue, Sep 11, 2012 at 7:51 PM, Jan Steffens <jan.steffens at gmail.com> wrote:
> On Tue, Sep 11, 2012 at 8:27 PM, Thomas Bächler <thomas at archlinux.org> wrote:
>> 2) When chrony is not running, systemd-timedated runs periodically to
>> adjust the hardware clock for drift (AFAIK, not sure that is the job
>> that timedated does).
>
> No. When chrony isn't running, the hwclock isn't getting adjusted at
> all. The only thing systemd does on startup is warp the system clock
> if and only if the RTC is running in localtime.
>
> systemd-timedated's job is to provide a DBus interface to change
> system time and date settings:
>   SetTime, SetTimezone, SetLocalRTC (whether RTC is in localtime),
> SetNTP (whether NTP is enabled)
> It's used by gnome-control-center, at least. The SetNTP call uses the
> ntp-units.d directory to select an implementation.

Thank you for all the information - it seems that the key to this was
that the RTC was too far out from correct time at boot - now that I
manually set the RTC to correct time it comes up close to correct -
and then chrony synchronises a few minutes after startup.  At present
tracking shows it is about 0.1 microsecs from NTP time:
System time     : 0.000000106 seconds fast of NTP time

What  I don't understand is why the hardware clock was not re-written
with the correctly synchronised time previously, since chrony has been
running every time I booted the system for ages?
-- 
mike c


More information about the arch-general mailing list