[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mac mini: serious clock drift

On Mar 8, 2007, at 10:04 AM, Bram Senders wrote:

Hi there,

I am having issues with clock drift on my G4 Mac mini. The clock drifts
so much that even ntpd can't keep up with it.  I keep getting messages
like "time reset +2.404131 s" from ntpd approximately every 15 to 20

Also, the drift ntpd records in /var/lib/ntp/ntp.drift keeps growing
until I get messages stating "frequency error 507 PPM exceeds tolerance
500 PPM", and the like.  The only way I know of "fixing" these is to
stop ntpd, remove the ntp.drift file and start ntpd again.  Then the
frequency error slowly starts to rise again, until it once more exceeds the maximum of 500 PPM. The time it takes to get to this point varies,
but this usually occurs once a week or once every two weeks.

I have experienced this problem with every 2.6 kernel I have run on my
Mac mini, up to and including the current version 2.6.18-4-powerpc.

I have never experienced such problems running OS X on the same machine (although I haven't run OS X that much), so maybe this is a kernel bug?
Any help pinpointing and/or solving this problem is appreciated.  My
/proc/cpuinfo is attached; I think it would also be useful to know if
people with the same machine have similar problems or not.

Bram Senders

I've got two minis running Debian Etch. Both of them have this problem. It seems to be a firmware problem. But it's fixable.

Attached is a tar file you can untar from root. It will put a script called "tickadj" into /etc/init.d with a parameter file in /etc/ default/ and a pointer to the script in /etc/rcS.d .

The parameter value in the tar file works OK on both of my minis. You may have to adjust it for your particular situation.

I apologize for not putting this into proper form for installing with apt/aptitude/dpkg. Maybe someday... If anybody else wants to do that and get it into the Debian distribution, feel free. I release any copyrights I may (or may not) have in this unconditionally to the public domain.


PS: Once you get the right value into the tickadj parameter, the clock on the mini is stable enough to be a really good (sub milli- second) NTP server if you happen have a close by GPS stratum-1 it can front for. If your local NTP service is limited to the pool.ntp.org machines over the Internet, the mini is still pretty good, but I wouldn't use it to time any high-energy physics experiments.

PPS: The MacOS-X time daemons have to deal with things like sleep/ wakeup and intermittent wifi internet connectivity. Compared to that, a little clock drift is a minor annoyance. The Apple engineers probably never even noticed that the mini's firmware clock was off by a few thousand ppm. And if they did, they probably didn't think it was worth fixing.

Attachment: tickadj_script.tar
Description: Unix tar archive

Reply to: