# Major system clock drift

## rquast

Hello!

I notice a major Gentoo Linux system clock drift on my IBM ThinkPad R30. The drift is about (minus) one hour per day. The hardware clock itself shows no such drift. Even the W2k clock shows no drift. 

Configuring the BIOS _not_ to switch off the processor (or PCI bus) clock when the processor (or the bus) is idle does not help. Unloading the APM kernel modules does not help either. No experience with ACPI yet.

What I want to know is

- if this obviously Linux specific problem is known

- how the clock drift can be explained

- how the clock drift problem can be tackled

The ThinkPad R30 uses an Intel Modbile PIII that is send to sleep when idle. Could the clock drift be caused by incorrect idle time management?

Thank you,

R. Quast

----------

## dice

I don't know why your clock drifts, but I can propose a solution:

```

emerge net-misc/ntp

rc-update add default ntp

```

You'll also need to configure a time server in /etc/ntp.conf

----------

## robster

Your last line of code is a little off, I did it this way:

rc-update add ntpd default (its ntpd, not ntp)

Hope this helps  :Smile: 

----------

## Kartoffel

Since your hardware clock is working try hwclock --systohc --utc  I think you only use --utc if your hwclock is utc.   That way you don't have to install another program.  Supposedly running hwclock repeatedly teaches the system time to work correctly.  

I tried ntpdate but could never get it to work for hardware clock set at local time.

Have fun.

----------

## McVeigh

I was reading another how-to that said to create a /etc/ntp.conf file with the time server you want to use. is this correct?

----------

## friedmud

I too have this problem!

It is really starting to get annoying - I have checked all of my configs and gone through the Gentoo install twice and same problem.

Never had this problem with Slack though....

Anyone have an answer???

My System:

Athlon 1.2 GHz

ABIT KT7A

Derek

----------

## AutoBot

I was having a similar problem so I deleted /etc/adjtime and made sure my  /etc/rc.conf read CLOCK="local" , rebooted and all things seem to be ok now.

----------

## meekrob

was to delete /etc/localtime and set CLOCK="local" in rc.conf.  I don't know if this is the best practice, but it worked for me.

----------

## AutoBot

It's fine to do this, /etc/localtime gets regenerated/generated properly when you reboot --- you could also just blank it out if you feel uncomfortable deleting it  :Smile: 

----------

## dice

 *robster wrote:*   

> Your last line of code is a little off, I did it this way:
> 
> rc-update add ntpd default (its ntpd, not ntp)
> 
> Hope this helps 

 

Whoops  :Very Happy: 

In my defense, that was from memory as I was on my Slackware laptop at home instead of my Gentoo workstation at work  :Wink: 

(yeah, yeah... I'll move the laptop over to Gentoo just as soon as I have a free day or three  :Wink:  )

----------

