You are not logged in.

#1 2009-04-22 21:48:16

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

My hw clock is randomly off even though I set it right...

Odd problem, I don't get it:

Everytime I turn on my lap top, the hwclock is off again by a random amount of time somewhere between 5 and 120 minutes or so into the future. Usually around 45 minutes. For example now, it's off about 5:30 minutes, very little compared to usual. Anyway I do this:

[root@Tachychineta] # date
Wed Apr 22 23:51:10 CEST 2009                                                                                                                                                 
[root@Tachychineta] # /etc/rc.d/openntpd start
:: Starting OpenNTPD                                                                 [DONE] 
[root@Tachychineta] # date
Wed Apr 22 23:45:21 CEST 2009
[root@Tachychineta] # hwclock --systohc --utc
[root@Tachychineta] # hwclock
Wed 22 Apr 2009 23:45:34 CEST  -0.161923 seconds

As you can see, the clock is wrong. Then I sync from the net using openntpd. Then I set the hwclock using hwclock --systohc --utc, and then the clocks are perfectly in sync. As soon as I reboot, it will be off again. I have no idea why this happens, and I can't remember when it started, but it has been like this for at least two weeks now. And it's always off by a random amount of time. It's rediculous...

No other OS involved, no special configuration I could think off...

Last edited by Shapeshifter (2009-04-22 21:49:30)

Offline

#2 2009-04-22 21:57:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: My hw clock is randomly off even though I set it right...

maybe the bios backup battery needs replacement


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2009-04-22 22:03:37

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

Re: My hw clock is randomly off even though I set it right...

I don't think so. It doesn't forget any other settings, and it also happens when the lap top is on power supply.

Offline

#4 2009-04-23 15:20:58

icetonic
Member
From: Germany
Registered: 2008-10-21
Posts: 104

Re: My hw clock is randomly off even though I set it right...

I have exactly the same problem too -.-

The clock works perfectly, but after reboot it's suddenly wrong... I tested to look at the clock inside of the BIOS - it went correctly... as soon as I booted arch it jumped again to a random time... I set then the correct time with openntpd manually afterwards as well...

I have no idea but I guess it's a kernel problem. Because I think this started after update to .29 (which made some other problems for me yet)

Would be great if anyone knows how to fix that

Offline

#5 2009-04-29 02:52:43

JDOz
Member
Registered: 2009-04-23
Posts: 8

Re: My hw clock is randomly off even though I set it right...

I am also having this problem.  You may be correct as I believe I also noticed this around the time I updated to the .29 kernel (via pacman).

It was about 10:40 PM EDT when I ran this:
[john@localhost ~]$ date
Tue Apr 28 15:21:18 EDT 2009
[john@localhost ~]$ hwclock
Tue 28 Apr 2009 02:56:25 PM EDT  -0.629667 seconds
[john@localhost ~]$

I'm no Linux guru, but why would 'date' be reporting a time different than the 'hwclock'?  It would make sense if it was consistantly off by a set number of hours, but by about 25 minutes?

Offline

#6 2009-04-29 10:10:32

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: My hw clock is randomly off even though I set it right...

Check the /var/lib/hwclock/adjtime contents. It should feature a fairly low value in its first field, like here:

bp:~$ cat /var/lib/hwclock/adjtime
0.026639 1240968435 0.000000
1240968435
UTC

Sometimes it had been initialized to a far too high value in an attempt to synchronize hardware and system clocks at initial setup. Just removing the file in this case should help.

Last edited by bernarcher (2009-04-29 10:11:32)


To know or not to know ...
... the questions remain forever.

Offline

#7 2009-04-29 11:46:02

Mike65
Member
Registered: 2009-04-14
Posts: 3

Re: My hw clock is randomly off even though I set it right...

Check etc/ntp.conf file. When i had this problem the file was empty. I was deleted the file and reinstall ntp and it's helped for me.

Offline

#8 2009-04-30 18:33:13

ekmek
Member
Registered: 2009-04-30
Posts: 4

Re: My hw clock is randomly off even though I set it right...

Same problem here. Seems to be solved by deleting /var/lib/hwclock/adjtime as bernarcher suggested.
Its content was something like that

1540.0000 1241045976 0.000000
1241045976
LOCAL

Offline

#9 2009-04-30 21:52:56

Kenni
Member
From: Denmark
Registered: 2007-01-25
Posts: 64

Re: My hw clock is randomly off even though I set it right...

I have the exact same issue...I've tried to delete adjtime, hope it helps smile

Thanks for the input...

Offline

#10 2009-05-01 01:29:18

JDOz
Member
Registered: 2009-04-23
Posts: 8

Re: My hw clock is randomly off even though I set it right...

Wow, the first value for me was NOT small.

[john@localhost ~]$ cat /var/lib/hwclock/adjtime
-12037.949686 1241091299 0.000000
1241029513
UTC

I just removed the adjtime file.  I suspect this will probably do the trick.  Thanks for the help wit this!

Offline

#11 2009-05-02 17:21:30

JDOz
Member
Registered: 2009-04-23
Posts: 8

Re: My hw clock is randomly off even though I set it right...

Just to verify, deleting the /var/lib/hwclock/adjtime did solve the problem for me too.  Thanks everyone!

Offline

#12 2009-05-03 11:08:42

Kenni
Member
From: Denmark
Registered: 2007-01-25
Posts: 64

Re: My hw clock is randomly off even though I set it right...

My first value in /var/lib/hwclock/adjtime was only around 3 or so, nevertheless, deleting the file seems to have solved the problem on my system smile

Thanks smile

Offline

#13 2009-05-03 17:13:15

icetonic
Member
From: Germany
Registered: 2008-10-21
Posts: 104

Re: My hw clock is randomly off even though I set it right...

Thanks, worked for me too smile

Offline

#14 2009-05-06 17:18:42

fac
Member
Registered: 2009-04-27
Posts: 10

Re: My hw clock is randomly off even though I set it right...

It did not help me.

My hardware clock has a new time each time I boot my computer. Either years back or way ahead in the future. Is this the way a dead CMOS battery would show?

At each boot I have to manually go into the bios and set the correct time so Arch boots with out any problems.

Offline

#15 2009-05-06 17:38:45

Kenni
Member
From: Denmark
Registered: 2007-01-25
Posts: 64

Re: My hw clock is randomly off even though I set it right...

fac wrote:

It did not help me.

My hardware clock has a new time each time I boot my computer. Either years back or way ahead in the future. Is this the way a dead CMOS battery would show?

At each boot I have to manually go into the bios and set the correct time so Arch boots with out any problems.

Yep, it could sound like it. The issue we had, would only cause your clock to be slightly off, eg. 30 minutes or one hour. If your clock is reset to a another year on a cold boot, then you can be pretty sure that it's the CMOS battery.

But it does sounds weird if you sometimes get a year way ahead in the future...I have no glue on that one, but perhaps your clock just goes into an inconsistent state due to the dead battery.

Offline

#16 2009-05-06 19:28:38

fac
Member
Registered: 2009-04-27
Posts: 10

Re: My hw clock is randomly off even though I set it right...

Yeah I have never experienced a dead CMOS battery before so I have no clue what is going on here. I think the problem started with the latest kernel update. Also it is necessary to use --directisa when using the hwclock command. Something that was not necessary before.

During boot when Arch interacts with the hw clock the following error message pops up:

select() to /dev/rtc to wait for clock tick timed out

This has gone away after I have set "USEDIRECTISA="yes"" in the rc.conf however the hw clock still jumps random around in time. Up until now I have seen times between year 2001 and year 2029 and a lot of different dates and times in between.

EDIT: Changed "bios update" to "kernel update" - there is a small difference smile

Last edited by fac (2009-05-06 19:29:57)

Offline

#17 2009-07-02 04:06:25

rhomp2002
Member
Registered: 2008-08-01
Posts: 38

Re: My hw clock is randomly off even though I set it right...

I am having a problem with the system clock.  In /etc/rc.conf the time is set to be UTC and US/New york which would be EST.  When I issue the command date, I get the time expressed as PDT which is Pacific time or 3 hours earlier than it should be for New York.  All the places I have the time set it is set for UTC and New York.  Why does it always default to PDT?  I can make the calcs in my head to get the proper time but it drives me batty that it should keep showing the wrong time when all the signs are that the NTP should pick the proper time based on the time zone indicated.  sad

Offline

#18 2009-07-02 13:56:56

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: My hw clock is randomly off even though I set it right...

There's no such timezone as "US/New york". Use something from under /usr/share/zoneinfo - I suggest "US/Eastern" or "America/New_York".

Offline

Board footer

Powered by FluxBB