Re: Time is going very much off all the time



Darrell Stec <darrell_stec@xxxxxxxxxxxxxxxxxx> writes:

Unruh wrote:

Darrell Stec <darrell_stec@xxxxxxxxxxxxxxxxxx> writes:

houghi wrote:

Darrell Stec wrote:
My time is going off all the time since a few weeks. Not sure when it
started, but I now need to do a netdate every 4 hours and the time
difference is between 1 or 2 seconds up to 5 minutes.

Anybody an idea what might be causing this?

houghi

I had a similar problem. What fixed it was to set the BIOS clock to a
slightly different time, boot Linux. Reboot and set the BIOS to the
proper time and then use the time feature in OpenSuse to set it to the
same time. I don't know why that fixed the problem.

Will try that.

If your clock is slow, you might change the backup battery on the
motherboard.

The PC is not turned off, so the battery could not be there, for all I
care.

houghi

Depending upon the motherboard the battery may run the clock all the time
and is continually recharged. But if old enough it takes less and less a
charge. Since the charging circuit take a few milli or nanoseconds to
recharge the depleting battery you will loose that time. The effect is
cumulative so eventually the clock will loose more and more time.


NONONO.

YESYESYESYES.

There are three different clocks on the motherboard.


Gee thanks for telling me this. I've been around computers for a long time.
In fact I built my first three as in designed, etched, drilled and soldered
the compontents.


Well apparently despite this experience you never learned much from it.


The RTC,
which is run by battery andis ONLY used by the system at bootup to set the
system cloock.

And if it is wrong everything goes downhill from there. I did not GUESS at

No. Nothing goes downhill. YOur clock is just wrong.

my recommendation. I used it to fix a real problem with my computer time
drifting off, as much as 8 minutes a day. My time is now accurate and is
almost to the second in agreement with my cell phone and Palm Pilot. It
wasn't before.

I am glad.

Doing what I recommended sets the RTC and the software clock to the same
point in time. That's why it worked in my caseo

hwclock --utc --hctortc
does that as well.


It is the only thing runby the onboard battery, and is never
used during running linux after startup. Then there are the timer
interrupts which are set to occur once every 10ms.

And some interrupts are and always have been read every eighteenth of a

That was the timeer interrupt on DOS. On linux there is a timer interrupt
every 1/100th of a second. These are not triggered by the rtc. These are
triggered by the bus crystal. -- ther is a counter chip which counts orr
the bus cycles, and can be programmed to issue an interrupt every x counts.
That has nothing to do with the rtc.

second. The RTC is capable of issuing periodic interrupts on IRQ 8 at
frequencies ranging between 2 Hz and 8,192 Hz. It can also be programmed to
activate the IRQ 8 line when the RTC reaches a specific value, thus working
as an alarm clock.


These are run from the
main bus freq crystal which is run from mains power.

What are you calling mains power. Here in the US that means the 120 volts
AC.

Yes, as opposed to the little battry that runs the cmos chip which contains
the rtc and has its own oscillator.


If it does not work,
your computer does not work. Finally ther is the main processor frequency
whichi is used by Linux to count the subdivisions between 10ms. (to
1microsec). Again it does not work only if your cou does not work.(eg in
suspends).

.



Relevant Pages

  • Re: Time is going very much off all the time
    ... cumulative so eventually the clock will loose more and more time. ... used during running linux after startup. ... That was the timeer interrupt on DOS. ... That has nothing to do with the rtc. ...
    (alt.os.linux.suse)
  • Re: [PATCH][I2C] ST M41T00 I2C RTC chip driver
    ... You can't stop the clock when you read it ... This particular RTC chip provide no mechanism to manually stop the clock ... There is a problem that if all the register reads don't happen within ... assumes that its not called from an interrupt handler (e.g., ...
    (Linux-Kernel)
  • Re: [PATCH][I2C] ST M41T00 I2C RTC chip driver
    ... On ix86 machines, it is appropriate to read the RTC clock ... I see you using a semaphore that can't be used in interrupt ...
    (Linux-Kernel)
  • Re: after reboot computer time is changed
    ... I don't even know _what_, exactly, I would be switching to LFS. ... "dangerous" if anything else but hwclock ever sets the RTC. ... clock, is too difficult a concept for Linux users to cope with, therefore ... only one single clock. ...
    (comp.os.linux.setup)
  • Re: System clock modified after crash
    ... The clock runs at local time. ... >> Linux freeze. ... the RTC runs at local time. ...
    (comp.os.linux.misc)