Click to See Complete Forum and Search --> : Laptop Hibernation Loses Track of Time
Has anyone else had this problem? Every time I set my computer to "hibernate" lately, it seems that it completely stops tracking time. I'm using whatever hibernation system is the default in a vanilla 2.6.7 kernel. If I hibernate at 5 PM, and boot the system back up at 8 AM, it tells me the time is about 5:01 PM yesterday. I'm running Slack 10, like I said, vanilla kernel, stock everything else, etc. The machine is an Averatec 3150P (sweet little notebook with pretty good Linux hardware supportability, outside the display adaptor).
I'm not sure if laptops have motherboard batterys, but it could be that yours is dead. Does it do the same thing if you shut it down cold and reboot an hour or later?
I don't have time to try for longer than a few minutes (I will tonight), but powering off for 10 minutes doesn't affect the time- it's perfectly well kept.
While shutting down, I noticed that it said it was writing local time to hardware clock. Could it be that the hardware clock was keeping its own time seperate of whatever "software clock" my system is using? Is there a way for my system to refer to the hardware clock instead of keeping its own time? I figure if it's keeping software time, that clock freezes while I'm hibernated, which borks my clock (and timestamps, etc.... good thing the only database type stuff I do on the laptop is for experimentation, and it's not the actual machine, or I'd be in TROUBLE!!).
Icarus
08-04-2004, 02:03 PM
Originally posted by nko
While shutting down, I noticed that it said it was writing local time to hardware clock. Could it be that the hardware clock was keeping its own time seperate of whatever "software clock" my system is using? Is there a way for my system to refer to the hardware clock instead of keeping its own time? That could very well be the case, but I'd think you would have the same problem when rebooting, unless it doesn't do a sync at shutdown/startup...
Manualy sync the clocks and see if it persists
To do this it depends on what you want the 'correct' time to be, software clock is the time you get from the 'date' command.
"hwclock -w" - to sync software (or system) clock to the hardware (BIOS)
"hwclock -s" - to sync hardware to the software
Is there any way to only deal with the hardware clock? What's the purpose of a software clock? I've had ALL kinds of problems in addition to this one with the software clock.
I'm hibernating now, and I'm going to let it sit over my lunchbreak. Hopefully (or maybe not?) it'll be slow by 1 hour when I come back (in an hour) and syncing will restore accuracy.
Overall, I must say, power management is still very rough around the edges, but it shows a LOT of promise. I can't figure out how to completely prevent the machine from scaling the CPU frequency above the minimum speed in Windows (and so the noisy fan is on half the time), but in Linux, the fan only comes on once in a blue moon. And since the lowest frequency my machine can do (400MHz) still gives pretty good performance (I've got a decent amount of RAM, and I think that has a lot to do with it), I really don't need to go in to territory where the fan keeps buzzing.
While I'm here, is there a way to launch a script every time the machine comes out of hibernation? I'm hoping to automatically sync the clock every time, if this works, instead of constantly having to perform a chore.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.