Roger Oberholtzer wrote:
I am on a laptop that exhibits the problem. hwclock -r is showing the correct UTC time that I expect. The network is up via NetworkManager when I logged in graphically. The ntp that started when I booted is still running. But, alas, the time is incorrect. It can sit like this for hours, and the time will NEVER be corrected. Ever. Consistently.
All I have to do now is run 'rcntp restart', and time will be corrected.
Carlos explained this issue very well. Now you need to examine why your system clock is off by two(?) hours when it is started. (Two hours discrepancy is not an inaccuracy, it is a clock that has been wrongly set).
I suspect it is that the ntp rc script is assuming that since it is set to start after networking, it can assume that access to time servers is available when it starts. Alas, when a network device starts some time afterward, this assumption is faulty.
The ntp init-script is not really intended to fix enormous hour-size gaps of time - on a normal startup the time offset of the local system might be measured in seconds, which ntp will then correct immediately provided a time source is available. If the time cannot be set, and the gap is 1000s or more, ntpd will exit immediately.
In this configuration, when the system does have correct time when the system is shutdown (I have restarted ntp), shouldn't the time come up correct when the system is rebooted?
Relatively correct, yes. If it does not, that's your problem, not ntp nor chrony.
It would if the claim that ntp kept a record of the drift and used that when it first starts.
Check the driftfile and you'll notice that it is updated once an hour (if ntp is running). See /var/lib/ntp/drift/ntp.drift
Alas, the time is always the BIOS time. Which is always the expected two hours off.
Two hours off _what_? What is your reference time?
The hardware clock is working. ntp is just not adjusting it when the config above is used.
If your hardware clock is two hours off what you want, ntp will not solve the problem unless you force it too (by lifting the sanity check). Nor will chrony, I suspect. -- Per Jessen, Zürich (16.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org