You are not logged in.

#1 2005-07-14 21:19:47

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

a very strange problem with time

I have a very strange problem with my clock. A couple of days ago I have said "The clock of my computer (HP nx9000) is very precise". The same day it started to slow down. Now the situation is very bad: I set the clock on 21:40:24 (ntpdate), and now my computer shows that this is 23:08:00, but it is really 23:12:40. I have no idea how to fix that. Is it a hardware or software problem? Even putting ntpdate to rc.local does not help because during my work I get 5 - 20 minutes of delay.

Offline

#2 2005-07-14 21:27:48

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: a very strange problem with time

Do you reboot your computer often? The battery is only there to keep bios settings and to maintain time when its powered off.
Its very unlikely its a software issue, time is all on the motherboard. I would check the battery and/or inpsect the MB itself.

Offline

#3 2005-07-14 21:35:38

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: a very strange problem with time

Penguin wrote:

time is all on the motherboard.

I thought Linux maintained its own time when the system is running. I recall reading something like "linux uses its own time-keeping that is much more accurate than the hardware clock" or something to that effect. Once. Somewhere. I don't know where. Maybe I dreamed it. ;-)

Dusty

Offline

#4 2005-07-14 21:51:16

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: a very strange problem with time

I believe that is correct Dusty.  Upon boot up, I believe Linux will read the hardware clock's setting, and then keep track of it until you power down.  In theory, it should be more accurate than the hardware, and thus when you powerdown, it resets the hardware clock to the time that Linux says it is.  In order to be truly accurate, it's good to setup NTP so the software side of things will always be in sync with the international atomic clock as well.

I believe I read that all when I was poking around the time related docs, or maybe it was from setting up a Linux From Scratch box...I forget where.

Offline

#5 2005-07-14 22:02:03

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: a very strange problem with time

Ok, I'll buy the software thing. It makes sense now that I think about it with the "saving system clcok settings" messages during power down. I always thought the powersupply took care of it once powered up....

My main point here was if its rebooted often or left off for any period of time with the battery going dead, then your time would be lossed to a certain degree.

Offline

#6 2005-07-14 22:21:53

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

Re: a very strange problem with time

The delay happens while the system is running. Now I'll shut the computer down for a few hours to see if it will also happen while the computer is off.

Offline

#7 2005-07-15 01:47:19

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: a very strange problem with time

That is strange that it seems to happen when the system is powered on...if it were the other way around, I'd simply recommend you replace the CMOS battery on the motherboard, but you may be having other issues.  I would try to figure out exactly what's happening before doing stuff with NTP.  NTP would help to correct the time, but it shouldn't have to adjust by large amounts once it's set, so I'd tackled the main issue first.

Let us know how it turns out...I know I'm curious!

Offline

#8 2005-07-15 01:50:36

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: a very strange problem with time

setup ntp, and it will calculate a reasonable drift for you.
should help alleviate the problem.

and linux does keep a different time than the hardware clock, but I believe it uses hardware to gauge the time (cycles or something)..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2005-07-15 01:57:16

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: a very strange problem with time

I agree that setting up NTP will help with his problem, but I think that if he's getting in the area of 5-20 minutes off every day, then there's a bigger issue to tackle first...obviously something is not right, and you don't want to have NTP trying to contact one of the time servers every 5 minutes just to stay accurate.  IMHO

Offline

#10 2005-07-15 02:41:30

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: a very strange problem with time

elasticdog wrote:

I agree that setting up NTP will help with his problem, but I think that if he's getting in the area of 5-20 minutes off every day, then there's a bigger issue to tackle first...obviously something is not right, and you don't want to have NTP trying to contact one of the time servers every 5 minutes just to stay accurate.  IMHO

If you have ntp up and running properly, you don't even really need to check the time of the servers. The drift file keeps track of how bad your time is at staying accutate and can then constantly be modifing your time accoringly.

I use ntpdate at boot to set the time and ntpd to keep it adjusted. I hope this explains it alright.

Offline

#11 2005-07-15 02:59:09

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: a very strange problem with time

yup. excellent summation rmbalfa


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-07-15 08:09:29

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

Re: a very strange problem with time

Is seems that there is no delay when the system is off, so this is not a hardware issuse. Funny thing is that I never experienced such delays (I use arch since april, and used other flavours of linux since december 2003 on this computer). Maybe it has something to do with recent arch upgrades, kernel or smth.

Offline

#13 2005-07-15 14:19:35

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: a very strange problem with time

You can try tuning it with adjtimex tool too. I've posted some time ago openntpd + adjtimex pkgbuilds and more info about time tuning in the forums. Just search for them to learn more.

Offline

#14 2005-07-15 14:30:23

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: a very strange problem with time

Do you compile your own kernel? Maybe you left something out...

I'm thinking of 'Realtime Clock Module', but I honestly have no idea what the hell that thing does.

Dusty

Offline

#15 2005-07-16 09:46:24

mdv
Member
From: Poland
Registered: 2005-04-09
Posts: 145

Re: a very strange problem with time

I downgraded kernel26. It solved the problem.

from: /var/log/pacman.log
[05/26/05 14:36] upgraded kernel26 (2.6.11.7-1 -> 2.6.11.10-1)
[07/11/05 12:41] upgraded kernel26 (2.6.11.10-1 -> 2.6.12.2-1)
--- the time problem occured ---
[07/15/05 16:38] upgraded kernel26 (2.6.12.2-1 -> 2.6.11.7-1)

I also added kernel26 to the list of packages that are not to be upgraded. I think that kernel is one of the packages that are to be upgraded manually.

I use kernel from the package, I never heard of realtime module, but I don't think it has anything to do with system clock, sound like it 's for running apps in realtime.

Thanks anyway guys. I wonder if anybody experienced the same problem with 2.6.12.2-1.

Offline

Board footer

Powered by FluxBB