LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-21-2005, 03:44 AM   #1
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Rep: Reputation: 15
System Clock Way Off


I'm having a strange problem with my system clock in Linux. Whenever I boot into Linux after shutting the computer off, the system clock is way behind. The longer the computer is off, the greater the error -- up to 24 hours or more. This problem does not occur in Win98, only Linux.

I believe I've read that the system clock adjusts itself when you change the time, in an attempt to be accurate. It must store this information in a file somewhere, so does anyone know what file I can edit to remove that information, allowing the clock to start from scratch?

I'm running SuSE Linux 8.1/KDE 3.0 on an IBM ThinkPad 600E.

Thanks!
 
Old 05-22-2005, 01:04 AM   #2
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
^^^
 
Old 05-22-2005, 01:15 AM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,889
Blog Entries: 28

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
ntpd
http://linuxcommand.org/man_pages/ntpd1.html

I had a similiar problem back when I dualbooted. Make sure your Time Zone is set correctly. And that you have ntpd installed and configured properly.
 
Old 05-22-2005, 02:41 AM   #4
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by craigevil
ntpd
http://linuxcommand.org/man_pages/ntpd1.html

I had a similiar problem back when I dualbooted. Make sure your Time Zone is set correctly. And that you have ntpd installed and configured properly.
The time zone is (and was) set correctly. I didn't know about ntpd, so I have started that and will see if it helps.

Thanks!
 
Old 05-22-2005, 08:17 PM   #5
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
You should probably also make sure "Hardware Clock" is set to local (I think). This will prevent problems between Windows and Linux.
 
Old 05-22-2005, 08:48 PM   #6
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by gd2shoe
You should probably also make sure "Hardware Clock" is set to local (I think). This will prevent problems between Windows and Linux.
OK, thanks -- didn't think about that. I've now done "hwclock --localtime" hoping that will help.
 
Old 05-27-2005, 09:47 AM   #7
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
5/20/05: I've tried all of the above and nothing has changed. :-(

So the question remains: Is there a file I can edit/delete that will wipe out all the correction data for the clock, so it will be as it was when first installed? Or are there any other suggestions?
 
Old 05-30-2005, 01:20 AM   #8
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
hmmm?

Quote:
Originally posted by JazzMastaJim
5/20/05: I've tried all of the above and nothing has changed. :-(

So the question remains: Is there a file I can edit/delete that will wipe out all the correction data for the clock, so it will be as it was when first installed? Or are there any other suggestions?
If you've "tried all of the above" and the clock still slows down in linux, then ntpd isn't doing it's job. It would be nice to know what is causing the problem, but ntpd should be constantly updating the time to keep it correct.
 
Old 05-30-2005, 09:24 PM   #9
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Re: hmmm?

Quote:
Originally posted by gd2shoe
If you've "tried all of the above" and the clock still slows down in linux, then ntpd isn't doing it's job. It would be nice to know what is causing the problem, but ntpd should be constantly updating the time to keep it correct.
The clock doesn't drift while Linux is running. It loses time -- lots of it -- whenever the computer is rebooted or shut off. But only when booted into Linux, not Windoze, which makes me think it is a Linux software/configuration problem, as opposed to a hardware problem.
 
Old 05-31-2005, 03:27 PM   #10
tremor_tj
LQ Newbie
 
Registered: Aug 2003
Location: Kansas City, KS
Distribution: SuSE 9.1
Posts: 9

Rep: Reputation: 0
Sounds like it MIGHT be time for a new CMOS battery.
 
Old 05-31-2005, 03:56 PM   #11
ithawtewrong
Member
 
Registered: Jul 2004
Location: Mile High
Posts: 161

Rep: Reputation: 30
You may also want to flash your BIOS. I had the same problem with a Gigabyte board and AMIBIOS (don't recall what release) a while back. The time issue was resolved for several months, however just recently it occurred again. I had replaced the battery and setup ntp previous to doing the BIOS.
What kind of h/w. I'm simply curious to see if we share anything in common.
I don't have the specifics in front of me, but I'm pretty sure it was the Gigabyte G7XE, Athlon 800Mhz, Voodoo 3000.
 
Old 10-08-2005, 03:55 AM   #12
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Gee, how old is this thread?

Well, in case anyone is still subscribed to it, here's what happened:

The CMOS battery was definitely bad, so I replaced it -- and the system clock was still way off. Apparently, losing the CMOS battery threw the clock off so badly that, once the battery was replaced, it couldn't compensate, even after a couple weeks of resetting the hardware clock several times a day.

After a lot of research, I finally read that the clock drift compensation can be reset by deleting the file /etc/adjtime. So I deleted it. Problem solved!

Last edited by JazzMastaJim; 10-08-2005 at 11:14 PM.
 
Old 10-08-2005, 10:26 AM   #13
tremor_tj
LQ Newbie
 
Registered: Aug 2003
Location: Kansas City, KS
Distribution: SuSE 9.1
Posts: 9

Rep: Reputation: 0
Great job, Jim! This thread will be a good one for those poor frustrated people looking for an obscure answer. Glad you got it fixed!
 
Old 10-10-2005, 03:06 AM   #14
JazzMastaJim
Member
 
Registered: Jun 2004
Location: Deep in the woods of southern NJ
Distribution: Pendrivelinux 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by tremor_tj
Great job, Jim! This thread will be a good one for those poor frustrated people looking for an obscure answer. Glad you got it fixed!
Thanks, tremor_tj. I didn't want to leave the thread hanging, in case someone else had the same problem.

BTW, I got the CMOS battery from www.AtBatt.com, which had by far the cheapest prices I could find. I had it within 3-4 business days.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
system clock alma Linux - Newbie 2 10-30-2005 02:06 PM
system clock,hardware clock varunbihani Linux - Newbie 2 07-23-2005 09:04 AM
system clock Gollum78 Linux - Hardware 0 05-04-2005 04:00 AM
system clock vs. CMOS clock dtamajka Linux - General 7 12-11-2003 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration