Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hardware clock not syncing
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
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Sun Dec 07, 2003 10:04 pm    Post subject: Hardware clock not syncing Reply with quote

I have an interesting problem. My boot sequence hangs when syncying with the hardware clock. It does this even off of the LiveCD. I have to ctrl-c to kill it and resume booting. It's rather annoying to have to do this. It will not shut down properly because of this either. Then when I reboot I have to "rm /var/run/dhcpcd-***" in order to bring eth0 up becuase it is never brought down on shutdown (shutdown hangs on syncing the hardware clock and ctrl-c just kills the whole shutdown). Everything else works ok but this is really annoying and I have tried just about everything from flashing the BIOS to recompiling the kernel to attempting to remove it from the boot sequence altogether. I tried "rc-update del clock boot" but this did not stop it. What is the script that syncs the clock if this is not it? Is there anyway to use ntp and have it sync with that at boot? I am emerging it right now.

By the way, my computer is a Dell Latitude L400 with a PhoenixBIOS which I just flashed to revision A09. I have APM compiled into the kernel. Turning apm off on the LiveCD did not help so I haven't tried eliminating APM altogether in the kernel yet.
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Dec 08, 2003 11:06 pm    Post subject: Re: Hardware clock not syncing Reply with quote

/etc/init.d/clock is indeed the script that syncs the clock.

What happens when you try to use the hwclock command? Have a read of the man page, and note the --debug option. That may give you more of a clue about what is going wrong.

Then again, if clock is definitely removed from all your run levels, you can be pretty certain that the problem is actually nothing to do with the hardware clock.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Mon Dec 08, 2003 11:24 pm    Post subject: Reply with quote

The problem is that when I remove the /etc/init.d/clock script it still attempts to set the clock. It makes no sense to me. I completely removed the script from the boot runlevel yet the script still starts up at boot time. I would really just like it to work but I think that's a lost cause because the BIOS clock does not move after I set it. I can't image how the battery could be shot already because this computer is newer than the one I just put to rest. I just looked at hwclock and it doesn't seem to work, so I guess that is the problem. Any clues on how to get it working? At least it wouldn't hang on boot even though the time would still be wrong.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Mon Dec 08, 2003 11:38 pm    Post subject: Reply with quote

It seems that the broken BIOS clock is the problem. When I "hwclock --debug" it hangs saying "waiting for clock tick". I'm assuming since it never ticks that it will never sync.
Back to top
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Dec 08, 2003 11:39 pm    Post subject: Reply with quote

I've never done anything more than briefly look at hwclock (I had problems with my adjtime file getting out of control), so I don't think I can help with that problem.

You should pursue getting hwclock out of your boot sequence. Then you'll have a faulty clock, but at least the rest will work ok. Once you get that far, go back to hwclock and try to get it working again. Even if you can't, you can still use a network time server to set the software clock when you boot, so the hardware clock isn't essential. (Incidently, if you have a Windows partition, does the clock work in that?)

So go back to /etc/init.d and nuke the clock file. If the system still goes about setting the hardware clock on boot, you'll know it's getting it from some other file. If that is the case, use something like
Code:
# grep -R hwclock *
to find out where it is coming from.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Tue Dec 09, 2003 12:55 am    Post subject: Reply with quote

I got the clock to sync using an ntp time server at boot but i still can't seem to get rid of the hardware clock sync. I even changed the permissions so it wasn't executable and it still tried to sync. I guess i'm going to try and completely destroy the file and see what happens. Maybe something depends on it? That still wouldn't explain why it would attempt to sync when the permissions were set to read only but we'll see.

I care more about not having to manually unmount my filesystems and shutdown eth0 at shutdown or reboot than actually having the right time. So of course I fix the time accuracy problem but not the hardware clock sync problem.
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Tue Dec 09, 2003 1:23 am    Post subject: Reply with quote

That was the problem. /etc/init.d/bootmisc /etc/init.d/vcron and /etc/init.d/metalog all need /etc/init.d/clock. I took them out of the scripts and everything works fine now.
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