You are not logged in.

#1 2009-06-11 05:46:09

naren5050
Member
From: Pune, India
Registered: 2009-06-11
Posts: 12

[SOLVED] ArchLinux system not keeping time!

Hello,

I have configured the /etc/rc.conf to use localtime (My timezone is  Asia/Calcutta), however, when Arch boots, it resets my clock arbitrarily behind by 30 mins to 3 hours. I have confirmed that my hardware clock is fine. I have confirmed this by checking the time in BIOS just before booting Arch and I find the clock reset immediately after booting. I find that the clock being reset when I even boot to console (telinit 3), so the problem is not with the KDE (my default desktop). I installed Arch about three weeks before and the problem is occuring since last one week, which may have happened due to some updates (I update daily).

Please help.

Below is the relevant section of my rc.conf.

LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Asia/Calcutta"

TIA,
Narendra

Last edited by naren5050 (2009-07-10 08:19:44)

Offline

#2 2009-06-11 06:43:39

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: [SOLVED] ArchLinux system not keeping time!

A worried to death advice: openntpd. Search function is here for a reason smile .

Last edited by Llama (2009-06-11 06:45:26)

Offline

#3 2009-06-11 06:52:31

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

Re: [SOLVED] ArchLinux system not keeping time!

I had similar problem. My clock is slower then the real time. When I set it in the morning, in the afternoon it is more then an hour behind. I put 'nptdate pool.ntp.org' in my cron to set the clock every hour smile You can put that in your rc.local. It is not a solution of your ploblem, but it can work.

Offline

#4 2009-06-11 13:01:22

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

Re: [SOLVED] ArchLinux system not keeping time!

Not sure if this applies in your case, but you might try this one, too: http://bbs.archlinux.org/viewtopic.php? … 16#p545016


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

Offline

#5 2009-06-11 13:23:58

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

Re: [SOLVED] ArchLinux system not keeping time!

Look in /var/lib/hwclock/adjtime. If the first number on the first line is large (bigger than 10 or so), delete this file, set your clock again, and reboot. (The file will be recreated with a small number.)

This number is supposed to show how many seconds your hardware clock drifts each day. It's not too hard to accidentally compare the software clock with the hardware clock when they're not set up right yet, which tricks the system into believing your hardware clock is very inaccurate, and overcompensating.

Offline

#6 2009-06-12 07:02:04

naren5050
Member
From: Pune, India
Registered: 2009-06-11
Posts: 12

Re: [SOLVED] ArchLinux system not keeping time!

Thanks all for the replies, but I guess, I didnt write the problem clearly.

1) Before I boot my Laptop, I check/set the clock in BIOS.
2) I boot Arch (either to console or to GUI mode), which takes me few seconds.
3) _Immediately_ after boot, I find my (system) clock to be behind either by 30 min, 1 hr, 1.5 hr, 2 hrs, 2.5 hrs or 3 hrs (the time lag may be different with each reboot).
4) When I reboot (immediately or at the end of the day) and again check the BIOS, I find that the hardware clock is also running behind by the above mentioned duration.
5) My hardware clock is working fine and is accurate. As mentioned, earlier, the problem has cropped up only about a week before. Whereas, I have installed Arch about 3-4 weeks before and didnt have the problem then.
6) I also have Mandriva installed, (infact, I am switching from Mandriva to Arch) and I have no problem with it.
7) I know that I can use NTP (in office), but when I'm at home (where I dont have internet connection), I will still need to adjust my clock everytime I boot!

I hope I'm clear now.

TIA,
Narendra

Offline

#7 2009-06-12 11:13:29

lseubert
Member
From: Maryland, USA
Registered: 2009-05-18
Posts: 141

Re: [SOLVED] ArchLinux system not keeping time!

Troubleshooting time. smile It would help to narrow down this problem.

When you boot into Mandriva, and there are no problems with your system clock, execute:

cat /etc/timezone

It should come back with "Asia/Calcutta", just like you set it.

Then, boot into Arch. If the time has changed as mentioned in your posts, check your timezone setting and compare it to the time difference. See if it has changed. Also, do a quick read of the tzset manpage to see if that reveals any helpful ideas.

If your /etc/timezone has changed under Arch, then something somewhere is changing your timezone setting. If /etc/timezone has not changed, but your hardware clock's time has been changed, then something somewhere is changing your hardware clock.

Either one is a little creepy - both changes require root privileges. I am wondering if you should install chrootkit and rkhunter to check over your system for a rootkit?


"To the question whether I am a pessimist or an optimist, I answer that my knowledge is pessimistic, but my willing and hoping are optimistic."
    -- Albert Schweitzer

Offline

#8 2009-06-15 04:36:03

naren5050
Member
From: Pune, India
Registered: 2009-06-11
Posts: 12

Re: [SOLVED] ArchLinux system not keeping time!

Hi,

Thanks all for your updates. The problem has now been solved, thanks to bernarcher. I followed suggestions in this post: http://bbs.archlinux.org/viewtopic.php? … 16#p545016 and now my system time is fine.

Narendra

Offline

#9 2009-06-15 06:55:27

rocknrolf77
Member
From: Oslo, Norway
Registered: 2007-05-07
Posts: 68

Re: [SOLVED] ArchLinux system not keeping time!

I have the problem that I get that ntp support is not installed, even though I have tried with both opentp and ntp, when trying to synchronize with time server.

Offline

Board footer

Powered by FluxBB