From owner-freebsd-stable@FreeBSD.ORG Thu May 3 05:24:03 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A01116A403 for ; Thu, 3 May 2007 05:24:03 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 45EC113C458 for ; Thu, 3 May 2007 05:24:00 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id PAA11128; Thu, 3 May 2007 15:23:54 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 3 May 2007 15:23:53 +1000 (EST) From: Ian Smith To: Martin Dieringer In-Reply-To: <20070503022338.P839@thinkpad.dieringer.dyndns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Doug Barton , freebsd-stable@freebsd.org Subject: Re: clock too slow - big time offset with ntpdate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2007 05:24:03 -0000 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: > http://www.freebsd.org/doc/en/books/faq/book.html#CALCRU-NEGATIVE > and > http://lists.freebsd.org/pipermail/freebsd-stable/ 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