Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bios clock is always wrong

0 views
Skip to first unread message

=SERGE=

unread,
Oct 20, 2007, 2:39:59 AM10/20/07
to
Hello
my problem is not exactly a linux one but is certainly a hardware one.
It is that every time I turn up the computer its motherboard bios clock
indicates the wrong time and I have
to set time manually. My mb is an old socket A (athlon 2400) mb which
otherwise seems to be ok. I changed the small battery. (I know it could be
the battery issue)
All the same the time is wrong on startup. When computer is up it remains
ok.

Why it can be so?

Thank you


Bill Marcum

unread,
Oct 20, 2007, 9:10:03 AM10/20/07
to
Install ntpdate or chrony. By how much is the clock always wrong? If
it is a number of hours, you may have incorrectly chosen whether the
BIOS clock is set in local time or UTC. Use local time if you dual-boot with
Windows; otherwise use UTC. This setting is in /etc/default/rcS for
Debian-based systems. The line UTC= should say UTC=yes or UTC=no.

AHappyCamper

unread,
Oct 20, 2007, 9:45:47 AM10/20/07
to

You put the battery in correctly? Had the old battery leaked?
Did you clean the batter socket?

That definitely is a problem when the AC power is removed, and the clock
stops.

I leave my system powered up, with the monitor off when not in use.
Saves on parts. Once a year I shut down and vacuum it out.

Plus, it shuts down during hurricanes and tropical storms if the power
is out due to wind or lightning, here in Florida.

Moe Trin

unread,
Oct 20, 2007, 12:57:00 PM10/20/07
to
On Sat, 20 Oct 2007, in the Usenet newsgroup comp.os.linux.hardware, in article
<ffc3h7$r19$1...@news.mtu.ru>, =SERGE= wrote:

>my problem is not exactly a linux one but is certainly a hardware one.
>It is that every time I turn up the computer its motherboard bios clock
>indicates the wrong time and I have to set time manually.

"the wrong time".... meaning what? Is it always indicating the same
time like 'Wed Jun 15 09:35:37 UTC 1977' Or is it running, but is
an hour, or a day, or some number of months off consistently?

You are posting using windoze - if you dual boot, is the time correct
in windoze?

What distribution and release of Linux? What have you told the kernel
about how your BIOS clock is set?

[compton ~]$ date ; /sbin/hwclock -r ; date -u
Sat Oct 20 09:49:39 MST 2007
Sat Oct 20 16:49:40 2007 -0.201946 seconds
Sat Oct 20 16:49:40 MST 2007
[compton ~]$

Here, the _system_ clock is set to local time. The hardware clock (the
BIOS clock) is set to UTC. This is desirable in UNIX, but may not work
well in dual boot systems, because windoze expects the clock to be set
to local time. Depending on your distribution, there is a configuration
file in /etc/ that tells the boot scripts how to set the system time.
Assuming your system has /etc/inittab, look a the file called out by the
'si' line

[compton ~]$ grep -w si /etc/inittab
si::sysinit:/etc/rc.d/rc.sysinit
[compton ~]$

where you will find the section of the script that sets the system time.

# Set the system clock.
echo -n "Setting clock"

ARC=0
UTC=0
if [ -f /etc/sysconfig/clock ]; then
. /etc/sysconfig/clock

Here, the boot script expects to find configuration data in the file
/etc/sysconfig/clock.

Finally, what timezone is /etc/localtime pointing to?

>All the same the time is wrong on startup. When computer is up it
>remains ok.

Is the hardware clock set to the correct time?

>Why it can be so?

Not enough information

Old guy

Arno Wagner

unread,
Oct 20, 2007, 10:12:12 PM10/20/07
to

> Thank you

If you correct the time in Linux, this is not copied through
to the RTC, just the OS clock. You have to adjust the time
in the BIOS setup. If the time runs slower or faster than
realtime, you likely have a shot crystal. I have seen one board
that had a clock running something like twice as fast as realtime.
With very good soldering skills, it may be possible to replace
the crystal in such a case. But it is easier to just synchronize
on an ntp-Server on startup.

Arno


Moe Trin

unread,
Oct 20, 2007, 11:55:37 PM10/20/07
to
On 21 Oct 2007, in the Usenet newsgroup comp.os.linux.hardware, in article

<5nvqrsF...@mid.individual.net>, Arno Wagner wrote:

>If you correct the time in Linux, this is not copied through
>to the RTC, just the OS clock. You have to adjust the time
>in the BIOS setup.

man hwclock

--set Set the Hardware Clock to the time given by the
--date option.

--systohc
Set the Hardware Clock to the current System Time.

The following options apply to most functions.

--utc Indicates that the Hardware Clock is kept in Coor-
dinated Universal Time. It is your choice whether
to keep your clock in UTC or local time, but noth-
ing in the clock tells which you've chosen. So
this option is how you give that information to
hwclock.

>If the time runs slower or faster than realtime, you likely have a
>shot crystal.

Haven't seen that very often. Most common failure mode is a dead
battery, which the O/P already replaced.

>I have seen one board that had a clock running something like twice
>as fast as realtime.

The BIOS clock? This happens with the system clock (software time
kept by the kernel), and that's a parameter problem. Try setting
"noapic" as a kernel boot parameter.

>With very good soldering skills, it may be possible to replace
>the crystal in such a case.

Depends - with many modern motherboards, the crystal (32768 Hz, but
this may be a tuning fork) is in the real-time-clock device. An
example is the Dallas Semiconductor DS12887, DS1[234]86, or DS1587.
These chips are expensive, but are a plug-in device.

Old guy

0 new messages