Maker Pro
Maker Pro

WTF with my computer clock?

R

root

The damned thing loses about 20 minutes/day and has
so since the machine was new about 3 years ago.

My guess is that it isn't fixable, but maybe you
have some ideas.

TIA.
 
W

William Sommerwerck

This is a chronic problem that seems to afflict all computers. I've never
owned a machine whose clock didn't lose time.

Outside of resetting the clock manually, or running a utility that reads the
time from some "correct" source and resets the clock, I know of no solution.
 
W

William Sommerwerck

This is a chronic problem that seems to afflict all computers. I've never
Well, yes, but surely only a few seconds a day?

Please don't call me surely.

I should have pointed out that 20 minutes a day is, indeed, unusual. But
computer clocks are notoriously inaccurate. And I've never seen one that
gained time.
 
J

JB

Meat Plow said:
Windows XP and Vista and Linux all have a built in clock sync with a
time server.
Figure out how to set it to update every 6 hours or less.

As far as the hardware is concerned it probably isn't fixable but it's
not the end of the world.

I don't get it. It is just stupid to require an "always up" Internet
connection for any kind of stability. Not to change the subject, B WTF with
my Win 98 machine that keeps trying to connect to NTP servers? I can't find
what process is doing that.
 
P

petrus bitbyter

root said:
The damned thing loses about 20 minutes/day and has
so since the machine was new about 3 years ago.

My guess is that it isn't fixable, but maybe you
have some ideas.

TIA.

Well... Guess t's too late for guarantee.

A new battery sometimes solves the problem.

Find the clock/calender chip on your mainboard. If it has a DIP package, it
can be replaced easily. (Hmm... That's to say I can. Don't know about your
skills.) Some SMD-packages can also be replaced but less easily.

Buy, build a battery backup clock that can communicate via the serial port
or an USB one. You will of course need some software too.

Ever saw a high accurate clock on a PCI-card. Don't remember where but still
remember I considered it way too expensive.

petrus bitbyter
 
B

Bryce

Meat said:
I suppose the unstupid thing would be to replace the
hardware?
(snip)

Begin by finding out which of the two clocks is the bad guy.

The CMOS clock runs continuously, powered from the PC power
supply when available and from the CMOS battery otherwise.
During start-up the O/S reads this hardware clock and uses
this value to initialize the software clock that is the date
and time source until the next startup.

A bum oscillator or low CMOS battery will cause hardware
clock errors and result in wrong-time initialization.

If the CPU misses servicing the clock interrupt or other bad
stuff, the operating system's idea of time will suffer, but
the hardware clock keeps right on ticking.

So, if you're losing time without a reboot, the CMOS is
innocent and the O/S and CPU aren't doing the right dance.
If the time is wrong from the gitgo, then the HW clock is
the culprit.

Bryce
 
R

root

Bryce said:
If the CPU misses servicing the clock interrupt or other bad
stuff, the operating system's idea of time will suffer, but
the hardware clock keeps right on ticking.

So, if you're losing time without a reboot, the CMOS is
innocent and the O/S and CPU aren't doing the right dance.
If the time is wrong from the gitgo, then the HW clock is
the culprit.

Bryce

Good points. The computer loses time when it is running.
It is the way the time is updated by the cpu/kernel.
I am running linux.
 
The damned thing loses about 20 minutes/day and has
so since the machine was new about 3 years ago.

My guess is that it isn't fixable, but maybe you
have some ideas.

TIA.
Since you are on this newsgroup, fixing it should be easy. All it
requires is a little soldering. I just checked two fairly modern
motherboards and located the crystal that is associated with the CMOS
clock. Look for a small cylinder lying flat to the board in the
neightborhood of the CMOS battery. That is the crystal that controls
the clock. The error you are seeing is well outside the normal
tolerances for a 'good' (or even a cheap) crystal. Replace it.

If you want high accuracy, it would be necessary to adjust the
frequency by adjusting the parallel capacitor, but normally you should
have an error of less than a minute a week with an uncalibrated
crystal.

PlainBill
 
G

George Jetson

Since you are on this newsgroup, fixing it should be easy. All it
requires is a little soldering. I just checked two fairly modern
motherboards and located the crystal that is associated with the CMOS
clock. Look for a small cylinder lying flat to the board in the
neightborhood of the CMOS battery. That is the crystal that controls
the clock. The error you are seeing is well outside the normal
tolerances for a 'good' (or even a cheap) crystal. Replace it.

If you want high accuracy, it would be necessary to adjust the
frequency by adjusting the parallel capacitor, but normally you should
have an error of less than a minute a week with an uncalibrated
crystal.

PlainBill



I think they are similar to watch crystals and are susceptible to vibration,
make sure its glued down.
 
R

root

Dave Platt said:
You may be able to resolve the problem by using the NTP daemon
(available in most distributions). It has two benefits:

- It can set, and resynchonize the system clock via periodic queries of
highly-stable time servers, via the Internet. This gives you a
very reliable time-sync to start with.

- It can calculate the amount of "drift" that your system's local
clock has (by comparing the system clock-run rate against the rate
deduced by querying NTP servers), and can then instruct the kernel
to compensate for this drift (i.e. "tweaking" the kernel's own
clock-update algorithm). This compensation helps keep the clock
correct, in between the larger adjustements that the NTP daemon
makes when it queries Internet time servers.

Thanks for the advice Dave, I started ntpd and will see how that
works.
 
J

JB

root said:
Thanks for the advice Dave, I started ntpd and will see how that
works.

You might also dig a little deeper into the support site for your machine
and see if there isn't a workaround or update.
 
R

Ray L. Volts

root said:
The damned thing loses about 20 minutes/day and has
so since the machine was new about 3 years ago.

My guess is that it isn't fixable, but maybe you
have some ideas.

TIA.

This thread reminds me of an old Columbo movie.
As I recall, the murderer had reset his PC clock so that certain data
would be erroneously timestamped while his PC was used during his
absence -- thus providing his alibi later. I don't recall how Columbo
realized this bit of trickery had taken place, but, being Columbo, he
did. Nowadays, the culprit would need to remember to also keep the
machine from syncing with online time servers!

Not particularly helpful to the OP, just throwing it out there as an
amusing tangent.

More on point, I have an old W2K machine -- Abit KT-7 RAID mobo that I
had to recap -- that loses about 10mins every couple weeks. It isn't a
"mission-critical" machine and isn't online often, but I don't mind
occasionally resetting its clock.
 
R

root

Ray L. Volts said:
More on point, I have an old W2K machine -- Abit KT-7 RAID mobo that I
had to recap -- that loses about 10mins every couple weeks. It isn't a
"mission-critical" machine and isn't online often, but I don't mind
occasionally resetting its clock.

Once a week I run a cron program that streamrips a radio program. I want
to get the start of the program [prairie home companion]. At 20 minutes
a day time loss, I have to sync the time just before I want to start
recording. So far I have set two additional cron jobs, one at the start
of the particular day, then one 15 minutes before the program begins.
It is like using a sledge hammer for everything I do.
 
B

Bryce

root said:
Good points. The computer loses time when it is running.
It is the way the time is updated by the cpu/kernel.
I am running linux.

Me too. Have a look at man hwclock.

Maybe running hwclock -r to resync the system time to the
CMOS (RTC) clock every so often as a cron job would suffice.
hwclock does tweaking to counter long-term drift in the RTC.
Not as spiffy as syncing with a time server, but no internet
connection needed.

Bryce
 
R

root

isw said:
What the NTP process does is essentially to monitor the local clock
compared to a reference to understand just what its errors are, and
synthesize a "perfect" clock from it. The synthesized clock can remain
within a few microseconds (or better) of a reference timekeeper all the
time.

Isaac

Maybe that works if you leave the computer on all the time. I started
the ntpd daemon early in the morning and by late afternoon the time
was, once again, way the hell off. Since I only care one time, one
day a week what the time is I have set up crontab entries to do the
job.
 
D

David Nebenzahl

Maybe that works if you leave the computer on all the time. I started
the ntpd daemon early in the morning and by late afternoon the time
was, once again, way the hell off. Since I only care one time, one
day a week what the time is I have set up crontab entries to do the
job.

I see the problem, that seems to have been missed by those suggesting a
software kluge that periodically stuffs the clock with the right value.

Here's an idea I haven't seen in this thread yet: If you're really
interested in getting to the bottom of this problem, how about trying to
determine whether it's the actual clock (RTCC hardware) that's off, or
whether the OS is missing interrupts or there's some other software problem?

How about booting the computah under some other OS, say Windoze or even
DOS, and running a utility that checks the RTCC for accuracy? (Don't
know of any, but I'm ass-uming that there are lots of such utilities out
there. Maybe there's even one for Linux.) That way you could know
whether the clock needs to be tweaked (new crystal as suggested by
others), or whether it's an OS problem.

Just an idea.
 
D

David Nebenzahl

As I said earlier, if the local clock (crystal, whatever) is
free-running (not synced to a standard reference using e.g. ntpd), it
*will not* stay accurate because it *cannot* be running at precisely the
proper rate all the time. No matter how often you set it. No matter how
often you tweak that little capacitor (which is very likely *not there*
to tweak in the first place. You can *never* get it "right on". The
question is not whether it is ever "correct", but only how fast it
diverges from "correct" whenever you stop messing with it. The
brilliance and elegance of NTP is that it can take that crappy,
imprecise, piece of temperature-sensitive quartz, and from it synthesize
an amazingly precise timekeeper.

Sounds OK to me, except that I just checked and reset my computah's
clock (I use a little Windoze utility called "NIStime" that gets the
time from NIST); it was off by about 5 minutes. Haven't synched it up
for at least 6 months, so I know my RTCC is at least that accurate.
(Running W2K, so I assume that no software process is adjusting my
clock.) Shouldn't most PC clocks be about that accurate? (Older MB,
forget exactly what, can find out if you're interested.)
 
D

David Nebenzahl

W2K has an SNTP client built in. Run cmd.exe then type 'net time /?'
for help.

I used to build OEM computers and have seen many different degrees of
inaccuracy both positive and negative.

Thanks; as Johnny Carson used to say, "I did not know that".

So how does NTP work in this case? I'm guessing it must contact some
entity over "the network" (meaning something external to my computer) in
order to determine the actual time, no? How does this work? Who does it
contact? (Short answer will be fine.) I do notice that one of the NTP
commands is

[\\computername] /SETSNTP[:ntp server list]

so I assume my computah keeps a list of servers "out there".

(So I guess if my computer is contacting a time server out there
periodically, but my clock was still off by 5 minutes, then the RTCC
must be *really* inaccurate.)

By the way, you can type "net time ?" to see the "help" info.
 
D

David Nebenzahl

Most crystals used in computers are within ten or 20 parts per million
of the frequency stamped on the case (you can get a lot more accurate
ones, but computers don't need it). AFAIR, those little cylindrical
"clock" crystals that run at 32,768 Hz are at least ten times poorer,
and far more temperature sensitive to boot. I think the *best* you could
expect from one of those without special treatment would be about a
minute a month.

Hope I'm not belaboring the point here. I just ran "net time" again and
got the error message "Could not locate a time-server". So I assume that
even if that process is running on my computer, as someone else here
asserted, it's not doing anything to my RTC, as there are no
time-servers to query (that it knows about). Therefore, the time my
computer displays is the actual RTC value. Therefore, it seems to be at
least as accurate as you've stated (about a minute a month), which
actually seems pretty damn good to me. If it gets off by 12 minutes a
year, resetting the thing once annually would yield a clock that should
be close enough for most folks' purposes.
 
Top