LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Mandriva 2006.0 Clock Drift (https://www.linuxquestions.org/questions/mandriva-30/mandriva-2006-0-clock-drift-371302/)

crxssi 10-09-2005 03:45 PM

Mandriva 2006.0 Clock Drift
 
There is some kind of problem in Mandriva Linux 2006.0 that causes my software clock to run very fast.... it is gaining over two minutes every hour.

This is the first time I have run 2006.0 64bit SMP on this machine, previously I had LE 2005 (10.2) 32bit SMP running on it and there was no clock drift. Thus far, everything else seems to be running smoothly.

Asus A8N-SLI Deluxe, Athlon 64 X2 4200+, 1GB RAM, SCSI 2940, IDE, NVidia FX

2.6.12-12mdksmp #1 SMP Fri Sep 9 17:20:34 CEST 2005 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ unknown GNU/Linux

I cannot post a bug on bugzilla because there is no 2006.0 product listed. I cannot post the information on forums because the club forum page is not available. I did email it to qa@mandriva.com

sshoemaker 10-10-2005 11:33 AM

clock drift
 
Have you tried running ntp as a daemon or ntpdate? these will update your clock with a timeserver (be sure to find one of the round-robin dns time servers so that no single time server is overloaded).
In your ntp configuration file just put the following:
driftfile /var/lib/ntp/ntp.drift

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org

that will allow their dns to rotate through different time servers --helping to conserve bandwidth.

You can also update it manually by using ntpdate pool.ntp.org -- and you can run this in a cron job such as

0 * * * * (ntpdate pool.ntp.org)

You can configure these to run as often as needed (just beware that transaction processing programs such as Oracle do not like time shifts -- if you insert something at a date that is "before" the current time, it will mess it up).

crxssi 10-10-2005 05:21 PM

Yes, I am (was) already running ntpd. The sw clock is so fast that ntpd will not keep it updated; besides- that doesn't fix the problem, just put a bandage on it. Since it is a home system, the time jumps aren't critical so...

For now I just put this in crontab:

0 6 * * * /sbin/clock --hctosys ; /usr/sbin/ntpdate pool.ntp.org ; /sbin/clock --systohc
15,45 * * * * /sbin/clock --hctosys

Which is working reasonably well until the reason is found for the clock running so fast.

troyrock 10-13-2005 12:02 AM

Same problem here
 
I am also running Mandriva 2006 SMP on an AMD 65 X2 with exactly the same problem. When I come home in the evening, it's off by about 30 min from when I left in the morning.

crxssi 10-13-2005 06:33 AM

Well, it is nice to know that it is repeatable. Thanks for posting.

sshoemaker 10-13-2005 07:37 AM

clock drift
 
sound like there's an issue with the internal clock in the cpu. does the time go way off if your computer is off?? -- in that there's an issue with the motherboards' time keeping.

crxssi 10-13-2005 04:58 PM

Taken from my original posting: There is some kind of problem in Mandriva Linux 2006.0 that causes my software clock to run very fast

It is the software clock. There is nothing wrong with the RTC. And there was nothing wrong with the software clock in 10.2. Has to be something going strange in the kernel.

crxssi 10-15-2005 08:28 AM

troyrock: Someone on Mandriva bugzilla has also reported it, so that is three systems now. http://qa.mandriva.com/show_bug.cgi?id=19250

It is important that you please provide the exact harware you are using- motherboard brand/model and graphics card type/model. Thanks!

crxssi 10-21-2005 09:16 PM

It gets worse. I don't know if this is part of the same bug or not, but now, every day when I get home from work to use this home computer the keyboard stutters badly and I have to restart the Xserver to regain control. About every other key I press results in anywhere from 2 to 12 of that key being sent. Ug.

crxssi 10-22-2005 09:33 AM

Solution!

It *is* a problem in the kernel and it is documented here: http://bugzilla.kernel.org/show_bug.cgi?id=5105 It took forever for me to stumble across the answer. I have cross posted it to qa.mandriva

This is the summary based on my research and observations.... there is a problem in the 2.6.12 kernel that causes the kernel to make an incorrect assumption about the type/use of the clocks on an AMD 64 X2 dual core system. The problems it causes seems amplified by high/continuous CPU usage. You can tell if you are bitten because you will see one or more of three symptoms:

1) Your software clock will run too fast- gaining sometimes minutes per hour
2) At some point the keyrepeat under X will go haywire and cause keyboard stuttering
3) You will see messages like this "warning: many lost ticks." in /var/log/messages

The workaround is to boot the kernel with the "notsc" option. This will force the kernel to not use tsc. There is a patch to the kernel, also, that supposedly fixed the problem properly. When it makes it into the official tree, I don't know.

This is a serious enough kernel problem to warrant Mandriva posting Errata about the issue, since it will affect [probably] all people using 2006.0 with an AMD X2 processor and possibly issusing a new 64 bit kernel. Of course, this will affect all distributions, since it is a kernel issue.

chemdawg 10-22-2005 09:40 AM

Quote:

Originally posted by crxssi
This is a serious enough kernel problem to warrant Mandriva posting Errata about the issue, since it will affect [probably] all people using 2006.0 with an AMD X2 processor and possibly issusing a new 64 bit kernel. Of course, this will affect all distributions, since it is a kernel issue.
I was using 2006 and noticed this problem with my 3.0GHz x86 processor, so it may be more widespread than just AMD and 64 bit kernel. Mine gained about 2 minutes per day, give or take a few nanoseconds!

purelithium 11-06-2005 12:41 AM

From the Bugzilla bug report comment thread:

Quote:

The workaround is to boot the kernel with the "notsc" option. This will force
the kernel to not use tsc. There is a patch to the kernel, also, that
supposedly fixed the problem properly. When it makes it into the official
tree, I don't know.
So therre's the workaround, but I'm not sure where to input this option.

jeanmm 11-09-2005 08:57 AM

Hello,

I found several cases with the same problem. Try to add following options to the kernel at startup : "noapic nolapic". Mandriva's doc warns not to use apic and lapic if the PC is not a multi-processor.

You may modify these options for lilo or grub to make them permanent.


;)

DataFusions 11-22-2005 05:12 AM

Hello,

I seem to be having the same problem but with an AMD Sempron 3000+
The time is flying past almost at double speed... other than that everything seems fine. (except he keyboard struttering but easily fixed by slowing the repeat rate)

I tried the 'notsc' option but that changed nothing..

What were the other options again :)

DataFusions 11-22-2005 05:55 AM

Seemed to have fixed it by using apic and lapic...


All times are GMT -5. The time now is 08:04 PM.