# Hardware clock problem?

## BitJam

My motherboard (ASUS M2NPV-VM) is only a year or two old.  The system woke up this morning with a time offset of about eight hours.    I didn't have ntp-client in any of my runlevels but I did have ntpd in the default runlevel.  I also had clock in the boot runlevel and had CLOCK_SYSTOHC="yes".  

I suspect that maybe the battery on my motherboard is running out of juice and needs to be replaced.   Is there anything I should do either before or instead of replacing the battery?  Thanks.

----------

## Ahenobarbi

 *BitJam wrote:*   

> 
> 
> I suspect that maybe the battery on my motherboard is running out of juice and needs to be replaced.   Is there anything I should do either before or instead of replacing the battery?  Thanks.

 

Have rdate or ntp to set correct time each boot  :Wink: 

----------

## BitJam

 *Ahenobarbi wrote:*   

> Have rdate or ntp to set correct time each boot 

 

Can do, but I would like to make sure the battery is working so I don't lose system setup information which my mobo manual says requires the battery.

I have all my computer stuff plugged into one outlet strip that I turn off at night so there is no power going to the computer at night which might be why the battery got worn down so fast.

----------

## dmpogo

exactly 8 hours ? it  looks like something is confusing UTC and local time

----------

## BitJam

It wasn't exactly 8 hours, it was about 8 hours.

----------

## dmpogo

 *BitJam wrote:*   

> It wasn't exactly 8 hours, it was about 8 hours.

 

Did you log into windows in the mean time ? It also sets hardware clock. I don't think you battery is dying (never saw that in my life), just something set it wrongly.

----------

## BitJam

Nope.   I don't have Windows on this machine.  I've already replaced the battery.  The old one (CR2032) was at 3.0 volts which means the battery was not the problem.

I don't think I did anything differently.  I shut it down at night and in the morning when it woke up the time was screwy.

----------

## doctork

 *BitJam wrote:*   

> Nope.   I don't have Windows on this machine.  I've already replaced the battery.  The old one (CR2032) was at 3.0 volts which means the battery was not the problem.
> 
> I don't think I did anything differently.  I shut it down at night and in the morning when it woke up the time was screwy.

 

It sounds to me like the clock chip itself has died.  What does "/sbin/hwclock" tell you?

--

doc

----------

## BitJam

```
$ date; sudo hwclock

Sat Aug  8 00:11:42 MDT 2009

Fri Aug  7 22:41:43 2009  -0.408611 seconds

$ sudo hwclock --systohc

$ date; sudo hwclock

Sat Aug  8 00:12:39 MDT 2009

Sat Aug  8 00:12:40 2009  -0.013569 seconds
```

I think you are right.  It seems my hardware clock is drifting badly and it got to the point where ntpd was no longer able to sync without running ntpdate first (via the ntp-client service).   I was hoping putting in a new battery would fix things but it didn't.   The hardware clock should have been last synced at around 3 this afternoon so it lost exactly an hour and a half in nine hours.

----------

## doctork

BTW, I have a system using the ASUS M2NPV-VM that's been running 24x7 since Jan 2007.  I've never had a problem with it.

--

doc

----------

## BitJam

Cool.  What CPU do you have in it?  I've got an Athlon 64 x2 3600+.   I've been very happy with the board.  I liked that I could flash the BIOS without using Windows.

----------

## doctork

I've got an X2 3800+.   I've never updated the BIOS, so it's got version 104 -- ASUS doesn't even list that any more on their download page.  I've never run anything but Gentoo Linux on the beast.

--

doc

----------

