clock too slow - big time offset with ntpdate

Ian Smith smithi at
Thu May 3 05:24:03 UTC 2007

On Thu, 3 May 2007, Martin Dieringer wrote:

 > On Wed, 2 May 2007, Doug Barton wrote:
 > > Martin Dieringer wrote:
 > >
 > >> On Wed, 2 May 2007, John Walthall wrote:
 > >> 
 > >>> On Tue, May 01, 2007 at 08:50:10PM +0200, Martin Dieringer wrote:
 > >>>> I think it has to do with powerd, if I kill that, the time stays correct.
 > >>> 
 > >>> With powerd enabled, are you able to maintain a "reasonably"
 > >>> correct time with frequent NTP syncronizations? Sorry if it's just
 > >>> me, but I am not quite clear about that, from what has been written
 > >>> already.
 > >> 
 > >> I would have to update every minute at least and would still be more
 > >> than 5 seconds off.
 > >
 > > I think you misunderstand how ntpd works vs. how ntpdate works.
 > > ntpd is a daemon, so you don't run it every minute, it runs in the
 > > background and keeps the clock up to date.
 > > Turn off all of the power management, and any other service that
 > > might be affecting the clock, and then reboot. If your system is
 > > able to maintain correct time under these circumstances, start
 > > adding things in until you find the culprit and let us know.
 > both laptops can keep the time without powerd. apm is enabled, but not
 > acpi. as soon as I start powerd or change cpu speed, time gets a few
 > seconds off.
 > It doesn't matter whether I use ntpd or ntpdate.
 > (ntpdate at system startup makes no sense as I have to dialup first).

If using ppp or mpd, you could run ntpdate from a link-up script.

But to address the underlying problem, quoting from earlier, you said:

 > > Now I got following while playing sound on the Compaq:
 > >
 > > kernel: calcru: runtime went backwards from 183711700 usec to 183167434 usec for pid 12 (swi4: clock sio)
 > >
 > > here I have a working clock, but also intermittent sound output

To which I suggested, after a bit of hunting:

 > and
 > searching for
 > 'calcru: runtime went backwards' provides many hits, as does google;
 > seems it could be a number of things, perhaps choice of timecounter.

Also a bit further down in the FAQ:
 '5.25. Why does the clock on my laptop keep incorrect time?'

Have you had a look at those FAQ entries?  Might they be relevant?

How about showing us /var/run/dmesg.boot for at least one of these two
machines?  I'm still curious as to what Timecounter & HZ is selected:
show us 'sysctl kern.timecounter' and 'sysctl -a | grep -i cpu' ?

Cheers, Ian

More information about the freebsd-stable mailing list