Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] system clock has its own will
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wimbo
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Fri Sep 10, 2004 4:45 pm    Post subject: [SOLVED] system clock has its own will Reply with quote

hello,

my system clock just doens't want to display the right time. whenever i adjust it, the next day it's earlier (or sometimes) later on my computer than in real life. i'm getiing a bit tired of this.
:cry: what can i do?

greetz,

wimbo


Last edited by wimbo on Tue Sep 14, 2004 3:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54845
Location: 56N 3W

PostPosted: Fri Sep 10, 2004 4:58 pm    Post subject: Reply with quote

wimbo,

Do you dual boot with Windows?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
wimbo
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Fri Sep 10, 2004 5:07 pm    Post subject: Reply with quote

no. i work only with gentoo. always booting the same kernel (2.6.8)

greetz,

wimbo
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Sep 10, 2004 5:10 pm    Post subject: Reply with quote

I have the same problem on all my gentoo boxes. If I don't sync with a time server my clock drifts like 30 minutes (behind) in three days.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
weltraumfahrer
Apprentice
Apprentice


Joined: 17 Dec 2002
Posts: 195
Location: Karlsruhe, Germany

PostPosted: Fri Sep 10, 2004 5:25 pm    Post subject: Reply with quote

Hi,
Code:

rm /etc/adjtime
/etc/init.d/clock stop
/etc/init.d/clock start

should fix it.

Frank
Back to top
View user's profile Send private message
fls
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2003
Posts: 111
Location: Germany

PostPosted: Fri Sep 10, 2004 5:30 pm    Post subject: Reply with quote

can you please post the output of
Code:
ls -l /etc/localtime
grep CLOCK /etc/rc.conf


Thanks :)
_________________
First they ignore you, then they laugh at you, then they fight you, then you win. Mahatma Ghandi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54845
Location: 56N 3W

PostPosted: Fri Sep 10, 2004 5:37 pm    Post subject: Reply with quote

wimbo,

The PC contains two clocks. The BIOS clock, which actually has a pretty good crystal, so it keeps good time. This maintains the time while the PC is off.

When the PC is on, the OS reads the time from this source, then uses the much poorer CPU clock to keep time. Its an interrupt dtiven service and its possible to lose interrupss, which equates to lost time ticks. That doesnt account for your clock being fast ever.

Linux, thinks it knows the time better then the BIOS, and it sets the BIOS clock to system time as it shuts down. This makes the BIOS time wrong. The fix as others have said, is to run ntp as a cron job to sync your time with a time server.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Sep 10, 2004 7:54 pm    Post subject: Reply with quote

I thought that was the problem as I actually worked on this very problem about 10 years ago on a different unix based os.

Quote:
That doesnt account for your clock being fast ever.


If the crystal is running the clock at a frequency that is too fast you can gain time but it is more likely that you will loose.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
wimbo
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Fri Sep 10, 2004 9:25 pm    Post subject: Reply with quote

fls wrote:
can you please post the output of
Code:
ls -l /etc/localtime
grep CLOCK /etc/rc.conf


Code:
  ls -l /etc/localtime
ls: /etc/localtime: No such file or directory
 grep CLOCK /etc/rc.conf
# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time).  If your clock is set to the local time, then set CLOCK
CLOCK="UTC"


i find it very strange that my clock is set to UTC again, although i set it to CEST (western Europe > Brussels) during installation

greetz,

wimbo
Quote:
Back to top
View user's profile Send private message
wimbo
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Fri Sep 10, 2004 9:28 pm    Post subject: Reply with quote

[quote="weltraumfahrer"]Hi,
Code:

rm /etc/adjtime
/etc/init.d/clock stop
/etc/init.d/clock start

should fix it.

that didn't really help. nothing changes. it justs stops and starts again.

greetz,

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


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Fri Sep 10, 2004 9:31 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Linux, thinks it knows the time better then the BIOS, and it sets the BIOS clock to system time as it shuts down. This makes the BIOS time wrong. The fix as others have said, is to run ntp as a cron job to sync your time with a time server.


i find this very strange. i used redhat, mandrake and suse before and never had the problem. how come?

and more important: i don't really now how to set an ntp as a crn job. i suppose i can google for a belgian ntp server but what then?

greetz,

wimbo
Back to top
View user's profile Send private message
tarkus
n00b
n00b


Joined: 08 Jul 2004
Posts: 27

PostPosted: Fri Sep 10, 2004 10:54 pm    Post subject: Reply with quote

emerge ntp && rc-update add ntpd default && rc-update add ntp-client default

I think there's a /etc/conf.d entry too...
Back to top
View user's profile Send private message
wimbo
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Tue Sep 14, 2004 3:01 pm    Post subject: Reply with quote

seems still to be a problem. seems that ntpd is running, but it's adjusting my clock to UTC instead of CEST.

greetz,

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


Joined: 19 Aug 2004
Posts: 110
Location: Ninove - Belgium

PostPosted: Tue Sep 14, 2004 3:45 pm    Post subject: Reply with quote

:P :P i solved it! i made a symlink in /etc/localtime to my timezone. (thought i did it that while installing, but may be i forgot)

thx all

wimbo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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