[Gllug] whoah

Alex Hudson home at alexhudson.com
Sat Nov 24 22:46:48 UTC 2001


On Sat, 2001-11-24 at 17:52, Pete Ryland wrote:
> Actually, I have a similar problem with my laptop.  The hwclock is ok, but
> when running and not suspended, the system clock slips by some phenominal
> amount - so much so that ntpd wipes its hands.  Can anyone suggest what the
> root of this problem is and any idea how to solve it?  I'd rather actually
> fix what's causing the problem rather than just use ntp or chrony or
> whatever to keep fixing the time.

Depends what the problem is. Sounds like dodgy int0 timer. You should
find that if you halt the laptop, and restart from cold, the clock will
behave itself: set it to the correct time, and it will keep proper time.
Once re-animated after a suspension, though, you find the clock is
running about one-fifth the speed you expect.

If that describes your problem exactly (make sure first!), then you need
to compile a custom kernel and apply the attached patch. Go to your
linux source directory, and do a 'patch -l -p0 < timer-patch', and it
will change one line in one file (apm.c). Compile & use that kernel. 

Also, you need to know that Win9x and Linux store the time differently:
Windows expects the BIOS to be in the local timezone, whereas Linux
expects it to be UTC by default. In this instance, you have a problem,
because you're liable to lose/gain hours switching back and forth
between the two OSes. The preferably solution is to stop using Windows.
A work-around is to tell Linux your bios stores the time in the local
timezone.

Cheers,

Alex.


-------------- next part --------------
--- arch/i386/kernel/apm.c	Fri Nov  9 21:58:02 2001
+++ arch/i386/kernel/apm-badtimer.c	Sat Nov 24 22:38:04 2001
@@ -286,7 +286,7 @@
  * This patched by Chad Miller <cmiller at surfsouth.com>, original code by
  * David Chen <chen at ctpa04.mit.edu>
  */
-#undef INIT_TIMER_AFTER_SUSPEND
+#def INIT_TIMER_AFTER_SUSPEND
 
 #ifdef INIT_TIMER_AFTER_SUSPEND
 #include <linux/timex.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20011124/0e3a5f18/attachment.pgp>


More information about the GLLUG mailing list