MacOS – Clock won’t keep time after Mavericks installation

clockmacosntp

My clock no longer keeps time properly after installation of Mavericks. This problem affects all of my iMacs immediately post-Mavericks, so it's not an issue with a bad battery.

The symptom is: The clock drifts by about a minute per day. Clicking the Date & Time applet in Settings immediately syncs the clock to the correct time. So the NTP servers are obviously working. It's just that Mavericks doesn't make use of them to set the system clock unless the Date & Time applet is clicked.

I followed the advise here and used the UI to set multiple time servers. I used the recommended string: 0.us.pool.ntp.org, 1.us.pool.ntp.org, 2.us.pool.ntp.org, 3.us.pool.ntp.org

After having made this change, instead of the clock losing thirty seconds per day, now it gains one minute per day.

As you can see from the log, it executes a few time syncs correctly and then just stops. The last sync was executed back on 1/17/14 at 4:40pm:

1/17/14, 2:06:08 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:06:19 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:09:25 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:09:30 PM ntpd: ntpd exiting on signal 15
1/17/14, 2:09:30 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:09:36 PM ntpd: ntpd exiting on signal 15
1/17/14, 2:09:36 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:13:34 PM ntpd: proto precision = 1.00 usec
1/17/14, 2:20:10 PM ntpd: SYNC state ignoring +0.156620 s
1/17/14, 2:37:33 PM ntpd: ntpd: time set +0.241899 s
1/17/14, 2:58:17 PM ntpd: ntpd: time set +1.052795 s
1/17/14, 3:42:36 PM ntpd: SYNC state ignoring -1.002861 s
1/17/14, 3:42:37 PM ntpd: ntpd: time set -1.012315 s
1/17/14, 4:41:31 PM ntpd: SYNC state ignoring -1.369896 s

Apparently the problem can be solved if the user knows Unix and can actually recompile parts of the operating system. This is way beyond my level of expertise. I did run ntpdate -q time.apple.com after clicking the UI's Date & Time control so things here haven't gotten out of sync just yet:

server 17.151.16.38, stratum 2, offset -1.405741, delay 0.04819
server 17.171.4.14, stratum 2, offset -1.404515, delay 0.09674
server 17.171.4.15, stratum 2, offset -1.406511, delay 0.09543
server 17.171.4.33, stratum 2, offset -1.405914, delay 0.09560
server 17.171.4.34, stratum 2, offset -1.405216, delay 0.09547
server 17.171.4.35, stratum 2, offset -1.405537, delay 0.09482
server 17.171.4.36, stratum 2, offset -1.406435, delay 0.09608
server 17.171.4.37, stratum 2, offset -1.409832, delay 0.10497
server 17.151.16.12, stratum 2, offset -1.405502, delay 0.04555
server 17.151.16.14, stratum 2, offset -1.405269, delay 0.04694
server 17.151.16.20, stratum 2, offset -1.407573, delay 0.04491
server 17.151.16.21, stratum 2, offset -1.404786, delay 0.04668
server 17.151.16.22, stratum 2, offset -1.405651, delay 0.04752
server 17.151.16.23, stratum 2, offset -1.406247, delay 0.04523
server 17.171.4.13, stratum 2, offset -1.405871, delay 0.09541
19 Jan 10:29:24 ntpdate[33548]: step time server 17.151.16.20 offset -1.407573 sec

Is there a problem with this update OS to make it better able to tell time properly without having to deal with cryptic Unix commands and OS recompilations?

Best Answer

Ok, the solution has been identified:

Here are the steps

  1. Replace Mavericks' buggy usr/sbin/ntpd executable with the one from your backups or other Mac with the previous version of OS X.
  2. Delete var/db/ntp.drift
  3. Restart the ntpd process using the new executable

I can verify that the clock now stays in sync. It's an absolutely ridiculous solution to a simple problem but it works. Thanks Gary at the Apple forum for the solution and emailing me the new executable. Also thanks to input from bmike above.