# clock running fast

## PeaceTank

I've recently noticed that my clock has been running fast.  I've gotten NTP working, but I'd still like to figure out just what the problem is so I can correct it (in case i'm ever without a network connection).  Over the past hour the clock (without NTP) has gotten about 20 seconds fast.  That might not seem like a big deal but over the course of a day it gets to about 8 minutes fast.  I have no idea why this is happening or where to start, so I'm really open to suggestions.

----------

## adaptr

In what way, exactly, have you established the drift ?

Did you compare it with a wall clock, or with another PC ?

The RTC in the kernel runs with sub-millisecond accuracy, so if it is playing up you may have a deep-seated timing problem.

What you could do is compare the bogomips and jiffies output from several successive reboots and see if they deviate (much).

BogoMIPS == the amount of instructions your CPU can do in a second - theoretically, at least.

jiffies == the number of "internal" clock ticks that make up a "kernel" tick.

The second is calculated form the first, and is used to continually update the kernel's own clock (the one you observe drifting.)

----------

## moocha

Also, if you've compiled HPET support into the kernel - don't. That fixed it for some peeps.

----------

## geekporn

adaptr, I think that is going a little overboard on this problem.

----------

## adaptr

Timing on a *nix system is a critical system dependency, and he stated that it was not an NTP-related problem.

I have never observed behaviour like this, and would be not a little upset if I did.

What's your solution ?

----------

## PeaceTank

sawicki boot # cat < config-2.6.11-gentoo-r8 | grep HPET

# CONFIG_HPET_TIMER is not set

# CONFIG_HPET is not set

HPET hasn't been set.

I don't think it would be the system itself, because this build has run stably for a while now.  I'm suspecting that some sort of change (kernel, most likely as I just compiled 2.6.11) would have screwed something up.  I still have the old config for the kernel, so if anyone could point me to anything that would affect this (other than HPET, its the same in the old config) I might be able to find something. 

As far as how I determined the drift, I set my computer clock with NTP and sync'ed my palm and binary clock to the EXACT same time.  An hour later I checked (using the date command, for precision) and it had gained 20 seconds.  I may try running the experiment again, and if I do I'll post the results.

----------

## adaptr

By binary clock, do you mean the hardware RTC on the motherboard ?

If so, try to isolate this from your measurements.

man hwclock for options.

----------

## PeaceTank

haha.  No.  By binary clock I mean my binary desk clock. ^-^

----------

## adaptr

Hohum.

I wouldn't bet on anything outside a PC keeping accurate time.

Test it against an Internet clock before making definite statements...

----------

## PeaceTank

I've tested it against several other comps running ntp from the same time server and i'm still getting a fast reading.  It's still about 20 seconds per hour.  Any ideas?

----------

## p.tomczyk

had the same problem - clock ticking too fast, up to couple of seconds per tenminute. ntpd tried to slew the timer, but drift was over 500 ppm so PLL never converged. your post made me think, and so i disabled all "spread spectrum"'s in BIOS. now after 4 hours /var/lib/ntp/ntp.drift indicates -214.849, and is getting lower. also ntpd steps clock alot less often, ten times smaller steps, and in opposite direction  :Smile:  guess ntpd will adopt in no time. so i guess it was frequency spread thingy. anyone else stumbled upon this?

edit: mobo is Abit's NF7-S.

and clock works great again.Last edited by p.tomczyk on Sun May 29, 2005 3:39 am; edited 1 time in total

----------

## Slalomsk8er

I have the same problem with 2 Ubuntu PCs with Nforce 2 bords, one is a Shuttle and the other is a ASUS.

But I have no answer then to sync with the time server at least once a day.

----------

## PeaceTank

I wonder if this is something with nforce2 mobo's, because mine's NF2 also.  Its a DFI LanParty NForce II Ultra B.

----------

## honnefinger

Hi there,

I'm new to Gentoo (and the Gentoo community) and I hope this is the right place to post.

I've installed Gentoo on a AMD64 3GHz, and I've noticed that my system clock is approximately running twice as fast as it should. Does anybody know whether this is a kernel bug. I've seen two similiar bugs at kernel.org where the one was reported for 2.6.10, but no fixes. I'm running  2.6.11-gentoo-r7.

Any ideas welcome.

-K.

----------

## overkll

What brand of motherboard do you have?  Is it an MSI?  I've read a couple of posts here regarding specific MSI boards that have that issue.  Disabling APIC (not ACPI) solves the problem.  You can either disable it in the kernel under "Processor type and features" or with passing the "noapic" parameter with your bootloader at startup.

----------

## yoshi252

Setting the "spread spectrum" option in bios to "off" really helped me. I also had several seconds drift per hour but now it's all gone  :Smile: 

I also have a NForce2 Motherboard, an ASUS A7N8X Deluxe.

----------

## honnefinger

Thanx, for the help. Just to let you know that I had to remove the options in the kernel,  set the 'noapic' boot parameter and switch APIC off in the BIOS to get it to work. Leaving either of the 3 out resulted in either my machine not booting or the machine booting up, but the clock still running too fast.

To answer your question: Yes, I do have MSI motherboard.

Now I have another problem. My machine will not reboot. After a reboot I have to reset the machine manually to get it back up again. Tried some power save options in the BIOS, but no luck. I've checked under Knoppix it works fine.

Ever seen this ?

-K.

----------

## pilla

Merged two threads about same subject (clock too fast)

----------

## lesshaste

For the timer problem you need to add the  no_timer_check bootprompt (assuming  2.6.12+).  You don't seem to need to noapic boot option at least iin 2.6.12-gentoo-r7 (although it is still turned off in the BIOS along with ACPI).

I am not sure a solution exists for the rebooting problem yet.

Raphael

----------

## YEL

hi everyone!

i have 4 boxes running gentoo and i updated them all almost one year ago to the 2.6.9 

2 boxes are infected 

2 boxes not

the infected boxes run on Intel Via based bord and have both intel CPUs

i did not touch my kernel configs  after updating 

the only thing that help a littel bit is setting a cron job which sets my date each hour

ntpdate -b time.fu-berlin.de

but this is just a workaround  and i hate this ill be really glad if gentoo developers corps gives this issue the prioritty it deserv and today as i reading the changlog of the linux kernel i was schocked again nothing has been done about this issue

now i almost give up hops and at this momment where you are reading this post  i'am  probably running amok   :Mad:   caus i can't stand this   :Rolling Eyes:  (beeing ignored by gentoo developers )

guys we trust in you give us some real fix for this 

ps: if you need more logging or specification just drop a message

IGWT

In Gentoo We Trust

Greetings YeL

----------

## dextermagnific

Hi,

I have the same problem here. I don't use any time server and my clock runs too fast.

Seems that the kernel when shutting down doesn't sync properly.

You know when booting the kernel gets the time from the bios and then starts counting by itself (yes, when your computer goes hibernate and restores, you have to update your time from the bios). And when your computer shuts down, if sets the bios time according to the kernel time. I think the problem is the kernel time which is too fast. I have to set the time regularely and i don't like that.

Any suggestions ?

----------

## bjunix

Hello gentoo community,

very same problem here. 

althought my time dont run a few seconds per hour too fast, but it runs a few minutes to fast. i have to determine how many minutes exactly, but i can say its quite a lot. 

System runs stable. i try to fix the problem with the suggestions made earlier in this thread.

i ll report back my results.

kernel is 2.6.12-gentoo-r9

edit:

HPET is set. so i try to recompile kernel without HPET support.

----------

## YEL

common guys please let your voice be heared i know iam not the only one suffering from this issue and i know that you all still waits for a solution.

i believe the gentoo developers can help us to solve this issue and  we can provide all the informations needed 

so please guys if you have the same problem drop an add to this thread juts to be a kind of counter 

so that those guys out there know that the problem is worth beeing given more attetion and priority

thanks 

if the clock is screwed the system is screwed too 

in gentoo we still trust

 :Sad: 

----------

## cyberpnk

I have a HP Pavilion zv6000 and I get the same double clock speed issue.  I tried passing noapic and no_timer_check.

no_timer_check does not do anything and noapic works great but I cannot get my laptop to get on-line.  no matter what card I use, static or dynamic.  Whats the point of playing quack3 if you cant play on-line?

Anyone know about this?

```
cat /proc/cpuinfo

processor   : 0

vendor_id   : AuthenticAMD

cpu family   : 15

model      : 15

model name   : AMD Athlon(tm) 64 Processor 3200+

stepping   : 0

cpu MHz      : 1995.557

cache size   : 512 KB

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 1

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow

bogomips   : 3932.16
```

----------

## kmarasco

 :Very Happy:   NEW FIX FROM HP Go to the HP site and upgrade your bios to version F.1B, which fixes the bug at its source.

http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?dlc=en&lc=en&os=228&product=468790&lang=en&cc=us&softwareitem=ob-36843-1

----------

## PaulBredbury

Although this is not a problem I'm experiencing, I think the ck-sources changelog has some interesting bits to say about the clock hz, and "maintaining accurate timer ticks"   :Smile: 

----------

## cyberpnk

 *kmarasco wrote:*   

>   NEW FIX FROM HP Go to the HP site and upgrade your bios to version F.1B, which fixes the bug at its source.
> 
> http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?dlc=en&lc=en&os=228&product=468790&lang=en&cc=us&softwareitem=ob-36843-1

 

Sweet!!!! it worked!  I can finally play quakeIII on-line without skipping frames.  W00t! 

Thanks for the heads up!  :Very Happy: 

Now if I can only get Cedega to fully work with my radeon xpress 200m so I can play Guild Wars I will be all set.  On to another post I guess   :Rolling Eyes: 

----------

## aronat

hrr hrrr i cant figure out how to use this flash utility in linux..   :Mad: 

I download the file and open it with wine, but when i try to flash it says:

```
Cannot load driver C:\308F1B\BHLASHNT.SYS

Please check your accounts, if you have no administrator rights please log in again!

File not found

Error code: 2

```

"The WinFlash utility is used to locally flash the System BIOS (ROM) on notebooks operating in a Microsoft Windows environment. "

 :Rolling Eyes: 

Someone who have any ideas or tips how i solve this??

 *kmarasco wrote:*   

>  ... 

 

 *cyberpnk wrote:*   

>  ... 

 

??   :Wink: 

----------

## cyberpnk

 *aronat wrote:*   

> hrr hrrr i cant figure out how to use this flash utility in linux..  
> 
> I download the file and open it with wine, but when i try to flash it says:
> 
> ```
> ...

 

I have a windows partition on my laptop.  Perhaps you cannot do this in wine because it is so windoze specific.  Do you have vmware or a extra partition to spare?  you might have to do some juggling with you file system.  Perhaps tarball your partition and toss that on another computer and install windoze temporarily just for the flash?

----------

## kmarasco

Ditto aronat. I used my windows partition to apply the upgrade. Its pretty scary to run a bios upgrade in an uncertain environment! Sorry that I can't help on this one  :Sad: 

----------

## kmarasco

Just a thought...I'm running linux from a usb drive. If you have another windows system, you could boot to it without swapping out or modifying the drive in your laptop by sticking it in a usb enclosure.

----------

## grouchy

I tried a number of the items suggested in this thread and others.  Checking for UDMA, disabling HPET, feeding in the no_timer_mumble kernel variable.

My machine has an asus sk8n/nforce3 mb.  Turning off IOAPIC in the bios ended up fixing my clock drift issues.

----------

## scottd34

Mine was picking up about a half hour a day-ish.  setting the ec_burst=1 and noapictimer in the kernel config seems to have worked.  I have an asus a7n8x-e nforce2 mobo and kernel 2.6.17-r4.

after a few minutes i am getting stratum 4.. so we will see how long this lasts.

----------

