View previous topic :: View next topic |
Author |
Message |
d0wn_under Guru
Joined: 13 Mar 2003 Posts: 300 Location: Sheffield, England
|
Posted: Sat May 24, 2003 10:19 pm Post subject: Clock slipping |
|
|
Ages ago when I installed a different distro I had problems with the clock losing time when in Linux, the problem was fixed by deleting the file /etc/adjtime.
Since I've put Gentoo on all was fine till British Summer Time kicked in and now the clock seems to be running slow and loses a lot of time when I go into Windows and then back into Gentoo. I've tried deleting the adjtime file and that hasn't fixed it.
I have the following link:
lrwxrwxrwx 1 root root 33 May 1 00:31 /etc/localtime -> /usr/share/zoneinfo/Europe/London
Has anyone else had this problem and managed to fix it?
Ta
Robin |
|
Back to top |
|
|
di1bert l33t
Joined: 16 May 2002 Posts: 963 Location: Oslo, Norway
|
Posted: Sat May 24, 2003 11:31 pm Post subject: |
|
|
Have you considered installing something like rdate / ntp and using that to sync your time ?
Code: |
rdate -s ntp2b.mcc.ac.uk
|
That's what I do and it works a treat.
Anyhoo...just my 0.02p worth _________________ choff. |
|
Back to top |
|
|
Gnufsh Guru
Joined: 28 Dec 2002 Posts: 400 Location: Portland, OR
|
Posted: Sun May 25, 2003 8:45 am Post subject: |
|
|
The clock on my laptop seems to be loosing time, a lot of time. In the past coiple days I've losdt about 15 minutes. I'd like to see a solution to this problem that doesn't involve connecting to ntp servers, as I m rarely connected to the internet. |
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Tue May 27, 2003 8:46 am Post subject: |
|
|
This sounds like a problem I have been trying to chase down on 1 of my machines. The linux clock slowly looses time and the hardware clock keeps time. The worst I have seen so far is 1 second for the kernel taking 5 seconds of real time.
At the moment every couple of days I 'hwclock --hctosys' to set the linux clock the same as the hw clock. Have considered making this a cron job. When I can be bothered I use rdate just to make sure the clock is still what it should be. This is a vanilla 2.4.20 kernel. I think (but not completely sure) that I have had the problem since I changed to this kernel.
My plan of attack to try another kernel sometime soon though I have stayed with this kernel because it has not blown up with one of the amateur radio drivers like previous kernels have.
I am not sure about /etc/adjtime. I get the impression it is for a drifting hw clock not a drifting linux clock. |
|
Back to top |
|
|
d0wn_under Guru
Joined: 13 Mar 2003 Posts: 300 Location: Sheffield, England
|
Posted: Tue May 27, 2003 7:15 pm Post subject: shouldn't need rdate |
|
|
This has to be a software problem and so shouldn't need ntp to sort it out. Windows keeps time find it is just Gentoo that loses it. I've seen it before and that was just a simple software fix so it should be possible again.
Anyone else got any ideas??? |
|
Back to top |
|
|
Krookednek Tux's lil' helper
Joined: 20 Feb 2003 Posts: 78
|
Posted: Wed May 28, 2003 1:05 pm Post subject: |
|
|
I had the same problem, used the rdate thing as well, I know this is no help but for whatever its worth I have the same issue and would like a solution that doesnt involve syncing every time I turn my computer on. _________________ Linux n00b, beware! |
|
Back to top |
|
|
zolxd Tux's lil' helper
Joined: 14 Feb 2003 Posts: 92
|
Posted: Sat Jan 10, 2004 11:59 pm Post subject: |
|
|
Not going away.
The other threads implicitly conclude that Gentoo can't keep time, but instead requires additional programs and a network connection to keep polling systems that can.
There needs to be a document about timekeeping itself, rather than scraps about setting up other components that, incidentally, impinge on timing, or do something extra with it.
Do I really need ntp to
1) set sys time to hw time on boot.
2) assess sys time correspondence with hw time, and adjust timekeeping factors.
3) leave the hw clock alone on shutdown. _________________ core i7 + ati 5400 on GA-P55 |
|
Back to top |
|
|
d0wn_under Guru
Joined: 13 Mar 2003 Posts: 300 Location: Sheffield, England
|
Posted: Sun Jan 11, 2004 2:36 pm Post subject: here here! |
|
|
And if you find someone to write one let me know asap!
Actually it doesn't seem to bad at the moment but I did have a big problem when I was switching between windows and gentoo quite a bit, windows kept time fine but gentoo alway seemed to lose it. |
|
Back to top |
|
|
julot n00b
Joined: 27 Aug 2003 Posts: 55 Location: Mexicus
|
Posted: Fri Jan 16, 2004 8:14 am Post subject: You All are Missing something. |
|
|
The Clock skew, Mainly suggests a Low or defective Battery condition.
In computers aged (Like 2+ years), The Bios Battery may Drain, or start to loose Amperage.
Many new Motherboards in the market also are filled with aged bateries , And in Laptops/Notebooks that have the rechargeable types, It may show the Ni-MH battery usually used is in the end of the life.
(Remember that windows XP, connects to Time servers so the problem may look diminished in this OS architechture).
After any software complains. Change the batteries for a new replacement (CR-2032, CR-2025).
I change my client's batteries and mines usually at 2.5-3 years.
Other piece of advice, evade non Japanese Batteries, (Swiss, Chinese).
Usually drains first. _________________ "Sine ira et studio" Tacitus. (c.56-c.177 AD).
(With neither anger nor partiality). |
|
Back to top |
|
|
Mitzi n00b
Joined: 16 Dec 2003 Posts: 45 Location: Cheshire, UK
|
Posted: Fri Jan 16, 2004 9:36 am Post subject: |
|
|
I replaced my BIOS battery a couple days ago because the machine would loose about 2 weeks everytime it powered off! Since putting in a new battery its been fine.
Whilst it could be a software issue you are having I would encourage you to try a new battery too...after all they only cost a couple of quid and are freely available - It can't hurt to try! |
|
Back to top |
|
|
Hazzl n00b
Joined: 03 Dec 2003 Posts: 27 Location: Berlin, Germany
|
Posted: Fri Jan 16, 2004 11:45 am Post subject: |
|
|
The first thing everybody who's having this problem should do is to check whether it is hardware related (MoBo-Battery running low) or software related (kernel time out of sync with hw time).
zolxd wrote: |
Do I really need ntp to
1) set sys time to hw time on boot.
2) assess sys time correspondence with hw time, and adjust timekeeping factors.
3) leave the hw clock alone on shutdown. |
If it is a software problem, you can solve it either by running ntp (which is what Windows XP does). Or use adjtimex. adjtimex is an off-line tool that relies only on the hw-clock and sets kernel drift timers to keep hw and sw in sync.
Actually, what I used to do before I got DSL was that I set up adjtimex to set kernel time according to the hw clock at every boot-up and I used rdate to set the hw-clock automatically each time I diald up to the internet.
That way everything worked perfectly
HTH |
|
Back to top |
|
|
zolxd Tux's lil' helper
Joined: 14 Feb 2003 Posts: 92
|
Posted: Tue Jan 27, 2004 8:08 am Post subject: |
|
|
adjtimex sounds like what I'm after, which I what I expected would be the default behaviour.
Online syncronization is something that I tend to regard as a luxury, or at least a deliberate, separate choice beyond basic functionality.
I've overcome the issue for now simply by wiping adjtime.
A clean start works well enough ... at least until I next do whatever it doesn't like. _________________ core i7 + ati 5400 on GA-P55 |
|
Back to top |
|
|
Vishruth Tux's lil' helper
Joined: 25 Oct 2002 Posts: 138 Location: India
|
Posted: Mon Feb 16, 2004 8:34 pm Post subject: |
|
|
I've been having the same problem since the past 2 days. The problem started after I upgraded baselayout and inadvertently overwrote rc.conf. I did change the CLOCK setting to "local" again and reset the time to IST. But that didn't help. After rebooting, the system clock lags behind to about an hour from the actual time.
It seems that 'localtime' too is properly linked:
lrwxrwxrwx 1 root root 33 Sep 21 01:20 localtime -> /usr/share/zoneinfo/Asia/Calcutta
I am not too keen on believing that this has anything to do with the battery being weak (or not weak, for that matter) since this problem started so conspicuously exactly after emerge -Uv world upgraded the baselayout package. Any ideas on what exactly could be causing this problem?
Now I think I'll try removing /etc/adjtime and see if it helps. _________________ http://freeshell.in/~vish/ |
|
Back to top |
|
|
Vishruth Tux's lil' helper
Joined: 25 Oct 2002 Posts: 138 Location: India
|
Posted: Tue Feb 17, 2004 8:50 am Post subject: |
|
|
Vishruth wrote: | ...Now I think I'll try removing /etc/adjtime and see if it helps. |
Yep. That did it. _________________ http://freeshell.in/~vish/ |
|
Back to top |
|
|
BlackHatRob Tux's lil' helper
Joined: 20 Feb 2005 Posts: 140
|
Posted: Fri Jun 30, 2006 3:04 am Post subject: Date\Time skew |
|
|
I have installed Gentoo... and everything is fine except the date and time...
I have done the following:
Code: | cp /usr/share/zoneinfo/EST /etc/localtime
date <current date info> |
and everything is fine.
I also edited /etc/clock and set it to local
But when I reboot the machine, the date is incorrect. It is now like 4 or 5 hours ahead...
Any ideas? I've heard that using udev can cause this... i think[/code] |
|
Back to top |
|
|
cyblord Guru
Joined: 22 May 2006 Posts: 424
|
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Fri Jun 30, 2006 3:43 am Post subject: |
|
|
BTW it took me hours to get NTP to work right (my company does things by broadcast, which was not mentioned in the WIKI), the WIKI is decent, but not 100% dead on. Google NTP, the main sight is awesome, and look for NTP in the forums here, and you'll find a great thread with how you need to configure your kernel, etc...
BTW, use modules for common cabililites, and set USE=cap (might be caps) before emerging ntp. Im not on my box, so I can't remember the specifics. I builtin alternative security support, and used default/common Linux model as modules, then I added to /etc/modules.autoload.d/kernel-2.6.
##Security module, needed for ntp
commoncap
capability _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
arwing n00b
Joined: 21 Feb 2004 Posts: 61
|
Posted: Fri Jun 30, 2006 9:44 am Post subject: |
|
|
RazielFMX wrote: | WIKI is decent, but not 100% dead on. | Am I the only person who sees why a person should not complain about the completeness of a wiki?
Kernel configurations and use flag adjustement should not be necessicary when a person doesn't run ntpd, and for most people who aren't setting up a domain controller for a large corporate network will not need to run ntpd.
ntpdate should be all most people will use. |
|
Back to top |
|
|
BlackHatRob Tux's lil' helper
Joined: 20 Feb 2005 Posts: 140
|
Posted: Fri Jun 30, 2006 5:36 pm Post subject: |
|
|
I'll go ahead and try to get this set up, but why is the clock screwed up to begin with? I would rather fix the real problem than just have a workaround for it |
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 978 Location: The Village, Portmeirion
|
Posted: Fri Jun 30, 2006 6:26 pm Post subject: |
|
|
Not having the correct IDE drivers enabled can also cause this.
As strange as it may sound. |
|
Back to top |
|
|
BlackHatRob Tux's lil' helper
Joined: 20 Feb 2005 Posts: 140
|
Posted: Fri Jun 30, 2006 7:00 pm Post subject: |
|
|
I know that's not the problem...
I do believe you though |
|
Back to top |
|
|
BlackHatRob Tux's lil' helper
Joined: 20 Feb 2005 Posts: 140
|
Posted: Mon Jul 03, 2006 5:18 am Post subject: |
|
|
Well, for some unknown reason to me, the hardware clock was set to the incorrect time. Interesting... I changed that and now everything works great.
Still thinking about using NTP, but if I don't have a net connection at boot one day, will NTP screw things up? |
|
Back to top |
|
|
cyblord Guru
Joined: 22 May 2006 Posts: 424
|
Posted: Mon Jul 03, 2006 5:22 am Post subject: |
|
|
once it's synchronized, it's synchronized. |
|
Back to top |
|
|
|