# Clock is fast

## yinkoshaumer

I noticed the other week that my system clock is fast. It is about 5min fast for every 30 actual minutes. NTPD does not help. Are there any config files that I can check or is this all on the motherboard's RTC?

Thanks,

Yinko

----------

## crudh

Do you have a dual core CPU?

----------

## yinkoshaumer

Nope, but here are my specs

MSI K8N Neo4 (nForce4)

AMD 64 3200+ Venice Core

1GB Dual Channel RAM

Gentoo - 2.6.15-r1

I am running a 64bit system, but I wouldn't think that this matters.

This is really starting to drive me up the wall.. lol

Thanks,

Yinko

----------

## yinkoshaumer

I'm thinking about just setting up a cron job to reset my clock every 5min... but I'd rather not have to do that

Any help is greatly appreciated.

Thanks,

Yinko

----------

## crudh

 *yinkoshaumer wrote:*   

> I'm thinking about just setting up a cron job to reset my clock every 5min... but I'd rather not have to do that

 

I understand that. But sorry, don't know what to do. I had a similar problem before, but that was dual core related. The only advice I can give is search the forums and google for it, but I guess you have done that already so...

----------

## yinkoshaumer

i found this in the wiki: http://gentoo-wiki.com/HARDWARE_Gentoo_Linux_64bit_on_HP_Pavilion_zv6000_series_notebook#RTC_Interupt

but the solutions suggested either break more things or just plain don't work.

Yinko

----------

## <3

My clock seems to be running fast also and I have a system that is similar to yinkoshaumer.

```
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as

# Greenwich Mean Time).  If your clock is set to the local time, then

# set CLOCK to "local".  Note that if you dual boot with Windows, then

# you should set it to "local".

CLOCK="local"

```

I have the clock var. set to local.

BTW I am dual booting Windowz XP.

----------

## bollucks

Choose the PM TIMER option in your kernel config which is designed to fix such issues.

----------

## <3

I already have pm_timer compiled into the kernel.

----------

## albright

I had similar problems (but with dual core); adding

this:

append="notsc"

to my lilo.conf fixed it ...

----------

## batistuta

there is a file somewhere (can't find it now), which controls the clock skew over time. If your system starts the first time with the clock really screwd up, this skew (stored in this file) will be incorrect and it will take a looong time to get back to normal (it kind of adjustes itself over time). I've had this problem and fixed it by doing something like:

removing this file (whatever it was)

setting the system clock manually

removing this file (whatever it was)

setting the hw clock

removing this file (whatever it was)

nptd

removing this file (whatever it was)

setting the hw clock

removing this file (whatever it was)

I know this is completely redundant, but you get the point. Yes, I was really paranoid about removing that file  :Very Happy: 

Anyone remember its location?

----------

## weltraumfahrer

Hi,

# /etc/init.d/clock stop

# ntpdate ntpserver

# rm /etc/adjtime

# /etc/init.d/clock start

Frank

----------

## Boris27

 *batistuta wrote:*   

> there is a file somewhere (can't find it now), which controls the clock skew over time. If your system starts the first time with the clock really screwd up, this skew (stored in this file) will be incorrect and it will take a looong time to get back to normal (it kind of adjustes itself over time). I've had this problem and fixed it by doing something like:
> 
> removing this file (whatever it was)
> 
> setting the system clock manually
> ...

 

/var/lib/ntp/ntp.drift perhaps? That's a file ntpd writes the clock skew in. It uses that if it can't sync your PC to reliable sources. This keeps the clock tamed when a connection hasn't been established (yet).

I use ntpd on my Nforce2 (for some reason the entire nforce series has a clock that is fast... Mine's a handful of seconds a hour fast.). Works fine.

----------

## batistuta

I don't think it was that one. For what I recall, it was independent of ntp.

It think it could be the one mentioned by weltraumfahrer

 *Quote:*   

> rm /etc/adjtime 
> 
> 

 

Have you search for what this file does? It could be. I've done a quick search in google, and one of the first links looks promissing

http://blogs.translucentcode.org/mick/2002/10/09/fixing_clock_drift_on_gentoo/

Check that out and let us know how it goes...

----------

## batistuta

Hey! With my last post I've become apprentice! Cheers!   :Very Happy: 

----------

## batistuta

please post your progress. And if you've solved the problem, please say how you've done it and add [solved] to the thread subject so that others can benefit

----------

## nukem996

Im having this same problem but on an AMD X2 4400, I thought it was a dual core issue since it only happens when the second core is enabled but you might want to look at the kernel bug I filed.

----------

## GMFTatsujin

I had a horrible problem with my AMD64 laptop's timer skewing wildly.  Mine is one of those motherboards with a badly compiled ACPI that hasn't been fixed yet.  Adding noapictimer and ec_burst=1 to grub's kernel options solved it.  . . mostly.  

Now my system clock is stable while it's on but gains time when the computer is *shut off*.  Weird.

----------

## crudh

 *nukem996 wrote:*   

> Im having this same problem but on an AMD X2 4400, I thought it was a dual core issue since it only happens when the second core is enabled but you might want to look at the kernel bug I filed.

 

I had a similar problem. I got some advice of adding ACPI to the kernel. You could try selecting ACPI and some sub-stuff (like Processor, Power and so) and build them into the kernel. That solved it for me completely.

----------

## StarDragon

had a similar problem too, fortunately enabling the dma on the kernel fixed it for me.

----------

## <3

what kernel, mobo + cpu is everyone using. Maybe we can narrow this down to a AMD or a specific kernel version range.

----------

## GMFTatsujin

My laptop's got:

AMD64 MT-30 processor

ATI mobo

Kernel 2.6.13-gentoo-r5  (I couldn't actually say why I'm not running an upgraded version.)

lspci looks like this:

```
00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 01)

00:02.0 PCI bridge: ATI Technologies Inc RS480 PCI-X Root Port

00:06.0 PCI bridge: ATI Technologies Inc Unknown device 5a38

00:07.0 PCI bridge: ATI Technologies Inc Unknown device 5a39

00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller

00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller

00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller

00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 11)

00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI

00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge

00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge

00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 02)

00:14.6 Modem: ATI Technologies Inc ATI SB400 - AC'97 Modem Controller (rev 02)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X700 (PCIE)

06:05.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)

06:06.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller

06:06.2 FireWire (IEEE 1394): Texas Instruments OHCI Compliant IEEE 1394 Host Controller

06:06.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller

06:06.4 Class 0805: Texas Instruments PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller

06:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

```

----------

## <3

bump

----------

## batistuta

I have an athlon 1700+

In my case it was my fault. I think the problem was that I've set the wrong timezone, and then corrected the clock somehow wrong, and the system thought that there was a large drift in my clock. This drift got stored in this file that I've talked about. Then Linux kept trying to "correct" the clock over and over, regardless of whether it was correct already. If nptd was not runnig, the time was garbage. Only after deleting this file the clock went back to normal.

----------

## Chuck Milam

 *batistuta wrote:*   

> I have an athlon 1700+
> 
> In my case it was my fault. I think the problem was that I've set the wrong timezone, and then corrected the clock somehow wrong, and the system thought that there was a large drift in my clock....Only after deleting this file the clock went back to normal.

 Same problem here, with the same fix on my eMachines M6809 laptop w/AMD Athlon 3200+.  Once I deleted /etc/adjtime, everyting began working fine--no more strange clock skews.  I suspect I missed something when doing an etc-update a few weeks back.    :Embarassed: 

----------

## Xithix

In lilo.conf (append="") or after the kernel in grub.conf (kernel="") try passing a kernel argument

The following arguments are known to correct weird clock issues

no_timer_check

disable_timer_pin_1

noapictimer

irqfixup

irqpoll

Try these one at a time.  For my AMD64 system disable_timer_pin_1 fixed all my weird clock issues.

Also if possible use ntp on boot.

----------

