Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Clock slipping
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
d0wn_under
Guru
Guru


Joined: 13 Mar 2003
Posts: 300
Location: Sheffield, England

PostPosted: Sat May 24, 2003 10:19 pm    Post subject: Clock slipping Reply with quote

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
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Sat May 24, 2003 11:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gnufsh
Guru
Guru


Joined: 28 Dec 2002
Posts: 400
Location: Portland, OR

PostPosted: Sun May 25, 2003 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Tue May 27, 2003 8:46 am    Post subject: Reply with quote

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
View user's profile Send private message
d0wn_under
Guru
Guru


Joined: 13 Mar 2003
Posts: 300
Location: Sheffield, England

PostPosted: Tue May 27, 2003 7:15 pm    Post subject: shouldn't need rdate Reply with quote

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
View user's profile Send private message
Krookednek
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2003
Posts: 78

PostPosted: Wed May 28, 2003 1:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
zolxd
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2003
Posts: 92

PostPosted: Sat Jan 10, 2004 11:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
d0wn_under
Guru
Guru


Joined: 13 Mar 2003
Posts: 300
Location: Sheffield, England

PostPosted: Sun Jan 11, 2004 2:36 pm    Post subject: here here! Reply with quote

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
View user's profile Send private message
julot
n00b
n00b


Joined: 27 Aug 2003
Posts: 55
Location: Mexicus

PostPosted: Fri Jan 16, 2004 8:14 am    Post subject: You All are Missing something. Reply with quote

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. :roll:
_________________
"Sine ira et studio" Tacitus. (c.56-c.177 AD).
(With neither anger nor partiality).
Back to top
View user's profile Send private message
Mitzi
n00b
n00b


Joined: 16 Dec 2003
Posts: 45
Location: Cheshire, UK

PostPosted: Fri Jan 16, 2004 9:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Hazzl
n00b
n00b


Joined: 03 Dec 2003
Posts: 27
Location: Berlin, Germany

PostPosted: Fri Jan 16, 2004 11:45 am    Post subject: Reply with quote

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 :D

HTH
Back to top
View user's profile Send private message
zolxd
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2003
Posts: 92

PostPosted: Tue Jan 27, 2004 8:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Vishruth
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2002
Posts: 138
Location: India

PostPosted: Mon Feb 16, 2004 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vishruth
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2002
Posts: 138
Location: India

PostPosted: Tue Feb 17, 2004 8:50 am    Post subject: Reply with quote

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
View user's profile Send private message
BlackHatRob
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2005
Posts: 140

PostPosted: Fri Jun 30, 2006 3:04 am    Post subject: Date\Time skew Reply with quote

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
View user's profile Send private message
cyblord
Guru
Guru


Joined: 22 May 2006
Posts: 424

PostPosted: Fri Jun 30, 2006 3:09 am    Post subject: Reply with quote

check this out:

http://gentoo-wiki.com/HOWTO_NTP
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 835
Location: NY, USA

PostPosted: Fri Jun 30, 2006 3:43 am    Post subject: Reply with quote

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
View user's profile Send private message
arwing
n00b
n00b


Joined: 21 Feb 2004
Posts: 61

PostPosted: Fri Jun 30, 2006 9:44 am    Post subject: Reply with quote

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
View user's profile Send private message
BlackHatRob
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2005
Posts: 140

PostPosted: Fri Jun 30, 2006 5:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 978
Location: The Village, Portmeirion

PostPosted: Fri Jun 30, 2006 6:26 pm    Post subject: Reply with quote

Not having the correct IDE drivers enabled can also cause this.

As strange as it may sound.
Back to top
View user's profile Send private message
BlackHatRob
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2005
Posts: 140

PostPosted: Fri Jun 30, 2006 7:00 pm    Post subject: Reply with quote

I know that's not the problem...
I do believe you though
Back to top
View user's profile Send private message
BlackHatRob
Tux's lil' helper
Tux's lil' helper


Joined: 20 Feb 2005
Posts: 140

PostPosted: Mon Jul 03, 2006 5:18 am    Post subject: Reply with quote

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
View user's profile Send private message
cyblord
Guru
Guru


Joined: 22 May 2006
Posts: 424

PostPosted: Mon Jul 03, 2006 5:22 am    Post subject: Reply with quote

once it's synchronized, it's synchronized.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum