Bug#755722: systemd must sync systemclock to RTC on shutdown

Stefan Fritsch sf at sfritsch.de
Mon Feb 16 19:40:52 GMT 2015


On Monday 16 February 2015 16:00:36, Michael Biebl wrote:
> > There is also natural drift between the system clock and the RTC.
> > Who  is supposed to account for that? On a system with an uptime
> > of several months, the drift may be large enough to cause the
> > time to go backwards at a reboot.
> 
> Running hwclock --systohc on shutdown does not solve the time skew
> problem.

It does not magically make the RTC run accurately. But it solves the 
problem of spurious fscks at reboot, doesn't it?

> You could use hwclocks drift calculation and call hwclock
> --adjust e.g. via a cron job. That is ugly though and it get's
> easily confused in multi-boot environments.
> A better alternative is NTP.
> Incidentally, systemd ships systemd-timesyncd, a SNTP client, which
> can easily be enabled via "systemctl enable
> systemd-timesyncd.service" and we are discussing about shipping it
> enabled by default.

I am not opposed to enabling timesyncd by default post-jessie. For 
jessie, I agree with the simpler fix posted by Martin.

I don't know what timesyncd does if no NTP server is reachable. It's 
possible that this case will need to be discussed again, but probably 
that discussion should happen in upstream's bug tracker.




More information about the Pkg-systemd-maintainers mailing list