# Clock problem

## dl200010

I do not know if this is the right place for this topic, but here I go. I have my laptop with Gentoo, XOrg-X11, and KDE 3.5.2. When my laptop is running, my clock is running too fast. It gets ahead of time. Since I have Windows XP daul booting, I do not save the system clock to the hardware clock. After I restart the computer the system clock is on the right time for a little bit.

----------

## theDOC_23

maybe there is a problem with your systemclock tick. you should consider running an ntp-client, like chrony (net-misc/chrony).  if you don't want to do that or don't have an internet connection with your laptop, try the package net-misc/adjtimex. it is able to adjust the system clock parameters and has a pretty good manpage describing how and why to do that.

----------

## dl200010

I installed chrony and it did not help. My system clock is excelerating. It starts out on time, because I do not sync the hardware clock to the system clock, and in six minutes it is ten minutes ahead of time.

----------

## theDOC_23

maybe you have misset your timezone or the way the system interprets your hardware clock. be shure to set the CLOCK option in /etc/conf.d/clock to "local".

stop chrony and try the following:

check if the timezone is set correct (ls -l /etc/localtime).

delete the /etc/adjtime file

set the hardware clock to the current time (hwclock --localtime --set --date=<current time>)

sync the system clock from it (hwclock --localtime --hctosys)

delete chrony's drift file /etc/chrony/chrony.drift

and start chrony again.

----------

## dl200010

I did all that, but I also removed chrony. Chrony is only to keep my clock up do date using the internet, but my comptuer is not always online. The clock is using the proper timezone and all and it is set on local in /etc/conf.d/clock. It still is going too fast, it  gains faster than the clock I have that is not in a computer and it set to the hardwareclock.

----------

## dl200010

I also have Windows XP on my machine, and it runs without the clock gaining time.

----------

## theDOC_23

i know you don't want to run chrony. but with it you can measure the right clock tick to set it by hand at boot time (with the adjtimex tool) or let it set automatically when chrony starts. so, your clock will get more accurate even if chrony has no connection to the internet.

does the clock have normal speed when chrony is active?

if not, maybe the "rtconutc" option is set in the chrony.conf and you should comment that one.

you can read the current clock settings with: adjtimex -p

the default value for tick is 10000. because my clock was running too fast, too, it was adjusted to 9989...

----------

## dl200010

That might be a problem, my chip, on idling, turns from a 2.6 GHz to about a 1.5 GHz. That might cause a problem, I am not sure but it seems like it would.

I have a AMD Mobility Athlon 64 skt754 4000+: 2.6 GHz

I am going to set up chrony, could anyone give me a example chrony.conf file and all that I need to get it up and runing.

----------

## /carlito

Have you tried booting your machine with kernel flags noapic nolapic? 

With newer kernels you should also be able to use disable_timer_pin_1

----------

## srilliet

i to have an atholon amd64 emachine when i am running gentoo it runs fine also gnome works great but i don't like the interface but when runing kde, clock set to "UTC" i have also tried "LOCAL" and it jumps ahead 5 seconds for every 1 real time second ( 5X faster)

----------

