19

I had updated my old iMac to Mavericks just fine. I then bought a new (certified refurbished, actually) iMac and migrated everything over from a Time Machine backup.

The new iMac's clock loses several seconds a day. When I unlock the Date & Time system preference, the time then synchronizes to the correct time immediately. But then it just loses time again.

I read this answer and now have a total of 3 time-servers, but it doesn't seem to solve my problem.

In the system.log file, there are these relevant messages:

Dec  3 22:31:34 iMac.local ntpd[66350]: SYNC state ignoring +0.155735 s
Dec  3 22:31:35 iMac.local ntpd[66350]: ntpd: time set +0.308737 s
Dec  3 22:31:35 iMac.local com.apple.time[158]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).

The Interval maximum value one doesn't look good.

Anybody know how to fix this so that the time stays sync'd?


Update

It took a little while, but the addition of multiple time servers did make it better (not perfect, but better). Now it gains time, but seemingly at a much slower rate.

If the addition of multiple servers (3 in total) had anything to do with making it better, perhaps (?) the addition of yet more servers will make it better still. I now have a total of 5 servers in ntp.conf. I'll watch it over the next couple of days and see what happens. (Even if this fixes it, this still doesn't answer why all of this is necessary to fix it in the first place. An answer to that would be nice, but I'll settle for it just being fixed at this point.)

BTW: you can set multiple via the System Preferences GUI: just type server names into the field with commas to separate them. This keeps the GUI and the file in sync.

BTW #2: here's the site I got the list of publicly accessible NTP servers from.

4

Well, some of these questions (your bullet list including "why 5 servers") are a little difficult to answer, time synchronization is quite the rabbit hole. The old parable about the man with one clock knowing what time it is but the man with two never being sure...

One server is an obvious "truechimer" always because there's nothing to invalidate it. Two servers is the "worst possible configuration" according to the NTP authors since it will never know which one is "more" correct. Once you get to three servers NTP can begin to mark clocks as "falsetickers" based on some internal metrics - those will show up with a status of 'x' when you run ntpq -p on the system. More information about what the columns and status indicators are for that command is available on ntp.org.

To get back to the issue at hand, a few notes:

  • placing the line pool us.pool.ntp.org iburst in your /etc/ntp.conf file will automatically add four stratum 2 ntp servers from the ntp pool to your time server list. These use DNS round-robin rotation to spread out load. If you are not in the US, there are other pools you can use.

  • you can't do the pool configuration line from the System Preferences GUI; you could, however, put the following in which would have the same effect: 0.us.pool.ntp.org, 1.us.pool.ntp.org, 2.us.pool.ntp.org, 3.us.pool.ntp.org.

  • in selecting time servers yourself, you should always ensure you select "stratum 2" or higher servers (best practice online is to only go to stratum 1 servers if you are serving time to dozens of machines locally). you'll also want to check policies in the public time server list before altering the default minpoll/maxpoll with public servers, some administrators do not want you to change from the defaults (this can place a higher load on their public servers). The best approach is to just use the NTP pool servers.

  • I am also seeing a substantial change in time quality since upgrading to Mavericks. I have just added more servers as you did to see if that solves the issue, but something definitely changed. I have a stratum 1 server on my local network and the clock on my iMac drifts all over the place whereas prior to the Mavericks upgrade it didn't.

  • 1
    You'd think having just one server of time.apple.com (the default: Apple's own server) would "just work" thus not requiring more servers. – Paul J. Lucas Dec 14 '13 at 1:02
3

Well, having 5 NTP servers seems to have solved it, so I guess this answer was actually the answer to fix it, but it's an unsatisfying answer because it doesn't answer the following questions:

  • Why 5 servers?
  • Why are so many needed?
  • Why is more than 1 ever needed?
  • Is there actually a hardware problem with the clock chip that makes it drift so much thus requiring 5 servers to keep it correct?
  • Mine still keeps getting stuck. – Ingmar Hupp Apr 2 '14 at 9:55
  • 5 is not a special number. Clocks go offline and networks between you and a clock may go down so you need more than one. The ntp protocol relies on a consistent network so it can calculate ping times and adjust the clock signals appropriately. More servers mean a better chance that one or more of them will give a good signal. It is pretty common for computer chips to drift so I'm not sure if it is a hardware problem or just a fact of life with the types of hardware in most PCs. – Gray Jul 24 '17 at 21:21
3

I believe Mavericks did the same thing to my mac mini. After a couple unfruitful calls to apple support (who gave me the standard lame solutions like resetting p-ram), I decided to dig into this myself.

I observed that the ntp demon (ntpd) quits/exits after the first run after system startup. (found by looking at the system logs through the console utility and filtering by "ntp").

I gave apple support a third call to find a more suitable solution than editing config files. I talked to one of their senior tech support staff. He had me do another p-ram reset, but also move the SystemConfiguration folder (found in the Macintosh HD/Library/Preferences folder) to the trash, empty trash and restart. After which, I had to setup my WiFi and computer name again (and later my screen sharing preferences too, as I use VNC for remote screen sharing).

So far (about 23hours later) I can see that ntpd is continuing to run:

12/6/13 10:14:13.648 AM ntpd[125]: ntpd: time set +0.963208 s
12/6/13 10:17:41.244 AM ntpd[125]: FREQ state ignoring +0.048040 s
12/6/13 10:18:51.412 AM ntpd[125]: FREQ state ignoring +0.065328 s
12/6/13 10:20:25.493 AM ntpd[125]: FREQ state ignoring +0.086068 s
12/6/13 10:23:01.588 AM ntpd[125]: FREQ state ignoring +0.121602 s
12/6/13 10:26:33.638 AM ntpd[125]: FREQ state ignoring +0.171160 s
12/6/13 10:31:06.911 AM ntpd[125]: ntpd: time set +0.233468 s
12/6/13 10:53:45.415 AM ntpd[125]: ntpd: time set +0.314875 s
12/6/13 11:58:56.335 AM ntpd[125]: SYNC state ignoring -0.375950 s
12/6/13 12:30:12.744 PM ntpd[125]: ntpd: time set -0.825345 s
12/6/13 1:47:54.647 PM ntpd[125]: SYNC state ignoring -1.119880 s
12/6/13 2:09:34.354 PM ntpd[125]: ntpd: time set -1.432706 s
12/6/13 3:49:25.547 PM ntpd[125]: SYNC state ignoring -1.439366 s
12/6/13 4:16:33.217 PM ntpd[125]: ntpd: time set -1.830211 s
12/6/13 10:33:28.790 PM ntpd[125]: SYNC state ignoring -0.411060 s
12/6/13 11:06:32.793 PM ntpd[125]: ntpd: time set -0.905610 s
  • Resetting the PRAM was the first thing I tried: didn't do anything. I don't have the .applesaved file. See above for my update. – Paul J. Lucas Dec 6 '13 at 15:32
0

This thread looked like a good explanation of the issue and the possible work-around.

https://discussions.apple.com/thread/5604114?start=45&tstart=0#27183298

Basically pacemaker conflicts with Apple modified ntp on Mavericks. Several work-arounds offered with at least: * compile your own version of ntp or restore from pre-mavericks * force touching of the drift file so that pacemaker re-reads it

I haven't tried any yet.

-1

It is broken, even in Mavericks 10.9.2. The solutions I have seen recommended apparently don't really fix the problem. It seems like the only real fix is to replace Apple's broken ntpd and configuration. For a thorough explanation, see this guy's post: http://www.atmythoughts.com/living-in-a-tech-family-blog/2014/2/28/what-time-is-it

  • 4
    Please summarise the solution in the link - link-only answers can be invalidated if the linked page changes. – grg May 7 '14 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .