Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: time

On Fri, Nov 05, 1999 at 12:32:08AM +0900, Stephen J. Turnbull wrote:
>     John> The hardware clock in my laptop has an annoying habit of
>     John> losing time from, uh, time to time.
> How much time?  And does it happen while you're running, or only when
> you have a suspend/crash?

It usually happens when I have a suspend-crash, which fortunately doesn't
happen all that often. Well, ok, once I managed to make it drift 10-15
minutes by playing quake for a couple of hours, but fortunately, I almost
never play games. The crashes lose enough time (1, 2 hours) to be annoying.
Sometimes I suspend and it wakes up but takes 2 or 3 minutes for it to
start responding to input.  Sometimes it's fine, other times it never wakes
up at all.  After that, the time is mysteriously set back, apparently at
random, an hour or two. Even if I only suspended for 10 minutes or so
before the crash. 

> Running?  Or booting?

Either. I'd rather not have to reboot, but that's usually what I end up

> In general I think you're probably wrong; no matter what you do to
> change the time, there's probably an app out there you can screw up
> by doing it.

That's what I was afraid of. 

I think it's actually the system clock that's getting hosed *first*, and
then my running system is resetting the hardware clock to match the system
clock's odd time. The problem I'm having is this: There's a weird suspend
crash and then maybe the system comes back up (no reboot), running, only
both the system date and the hardware clock are set back an hour or more. I
can't reset the hardware clock and then reboot, because there's a script
that's called in /etc/rc[06].d that resets thehardware clock to the system
date. I guess I could remove this script, but not sure if that's a good
idea. My guess is that the first thing that gets hosed when there's apm
weirdness is the system date and the hardware clock gets set to match it a
minute or two later when I try to gracefully shut down the system.  If I
reboot, I can usually reset the time by setting the time in the bios.  But
I know that this can't be good for file dates, and it's probably not good
for anacron, either.

[ On the other hand, I don't really know what I'm talking about, that's why I
was asking ;-) ]

So, would it be safe to drop the system into single-user mode (cron gets
stopped on the way down and doesn't get started until I enter a multiuser
runlevel), reset the hwclock and the system date, and then take the system
back up to my default runlevel? There's already a script that gets called
in rcS.d that does a hwclock --hctosys, so it doesn't seem all that

Thanks for the advice,
Next Technical Meeting: November 13 (Sat), 13:30 place: Temple Univ.
* Network Security                               speaker: Steve Baur
Next Nomikai: December 17 (Fri), 19:00 Tengu TokyoEkiMae 03-3275-3691
more info:        Sponsor: Global Online Japan

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links