Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Time problem [solved]
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
eelke
Guru
Guru


Joined: 17 May 2004
Posts: 406
Location: Earth, Netherlands, Friesland

PostPosted: Sun Jul 10, 2005 7:46 pm    Post subject: Time problem [solved] Reply with quote

I have a problem with the clock on my notebook. When linux boots it doesn't seem to get the right time from the hardware clock. For instance this afternoon i set the date and time correctly and did a halt and power off. I turned my notebook on and entered the BIOS setup. BIOS gave right time, booted linux and it was 4 minutes ahead (reading back the time with hwclock gave me also a time 4 minutes ahead). The problem seems to be worse when the notebook is off for a longer period.

The clock works fine with Windows XP and used to work fine when I still used SuSE.

The notebook is an Asus 1 GHz PIII with an i830 chipset.


Last edited by eelke on Sun Jul 17, 2005 6:33 am; edited 1 time in total
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sun Jul 10, 2005 10:27 pm    Post subject: Reply with quote

try to setup the time with ntpdate via some ntpd server.
Code:

ntpdate ntp.someserver.int


then use "hwclock --systohc" to set the hw clock with the precise time.
_________________
linux: #232767
Back to top
View user's profile Send private message
eelke
Guru
Guru


Joined: 17 May 2004
Posts: 406
Location: Earth, Netherlands, Friesland

PostPosted: Mon Jul 11, 2005 10:49 am    Post subject: Reply with quote

Using a ntpd server is not a solution because I do not allways have a connection.

I had a look at my notebook this morning. It had been of about 9 hours. I switched it on and checked the time in the BIOS. The time in the BIOS was ok. However after I booted linux, linux was about 35 hours ahead.
Back to top
View user's profile Send private message
glin
n00b
n00b


Joined: 23 Sep 2003
Posts: 12

PostPosted: Mon Jul 11, 2005 9:25 pm    Post subject: Reply with quote

ikaro wrote:
try to setup the time with ntpdate via some ntpd server.
Code:

ntpdate ntp.someserver.int


then use "hwclock --systohc" to set the hw clock with the precise time.


I had a similar problem as eelke. I had wrong time in bios (hw clock) and I thought, that
Code:

ntpdate ntp.someserver.int

is enough to set it correctly, but I didn't know about
Code:

hwclock --systohc

so after reboot, the time was again wrong.

So thank you, ikaro, for this, your advice to elke helped me.
Back to top
View user's profile Send private message
eelke
Guru
Guru


Joined: 17 May 2004
Posts: 406
Location: Earth, Netherlands, Friesland

PostPosted: Sun Jul 17, 2005 6:28 am    Post subject: Reply with quote

I found the problem. The system is correcting the time from the hardware clock using the information found in the /etc/adjtime file. The information in this file however was wrong. Removing the file solved the problem.
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