PDA

View Full Version : Fedora Core 6 Clock not keeping time



mally42
29th July 2007, 04:42 PM
At some point my Fedora Core 6 2.6.20-1.2962.fc6 decided to not keep time.

Both the system clock and hardware clock are loosing about 1/2 hour of time every hour. I think the problem may have occured after updating the kernel however when booting into the previous kernel (2.6.20-1.2948.fc6) doesn't seem to make a difference.

I'm using ntp which does sync the clock to the right time.

The system is fairly new. The processor is an Intel(R) Pentium(R) D CPU 3.40GHz and I am using the 32 OS rather than the 64 bit.


Any suggestions?

tsorvoja
29th July 2007, 05:00 PM
Last time when I had such problems was when the battery of the BIOS was empty. Try to replace the battery (usually flat and silver colored) into a new one. It costs around few euros/dollars...

mally42
29th July 2007, 05:53 PM
I don't think it's the CMOS battery. I think it's possible but unlikely that a brand new computer was shipped with a dead CMOS battery. I am pretty sure that this is has something to do with the OS. Also if it were the CMOS battery I would think the system clock would not be affected. It's also my understanding that the hardware clock keeps track of time when the system is turned off but is not used when the system is running. The Kernel clock is counter based on the timer interrupt (based on CPU cycles) and is not dependent on the CMOS battery. In fact I think that the hardware clock gets updated by the kernel clock at boot when ntp starts which may be why they are both drifting at similar rates.

The kernel clock I believe gets it timer interupt setting here:
/usr/share/systemtap/runtime/time.c

So it is my thought that if the systems is not calculating the number of CPU cycles correctly this would account for the drift. But I have no idea what would be the fix or if I'm even on the right track.