[ltp] Correcting clock after software suspend

Florian Weimer linux-thinkpad@linux-thinkpad.org
Sat, 15 Nov 2003 10:55:21 +0100


Marius Gedminas wrote:

> On Thu, Nov 13, 2003 at 05:51:41PM +0100, Florian Weimer wrote:
> > On my T40p, I use the software suspend feature from kernel 2.6, but when
> > the system is back up, the system clock is not updated.  Using an
> > external NTP server is not always an option.
> > 
> > Any ideas?  How can I detect that the system has been resumed?  Maybe
> > it's sufficient to restore the system clock from the hardware clock.
> 
> Debian's apm package has scripts in /etc/apm/event.d that perform a
> hwclock --systohc on suspend and hwclock --hctosys on resume.

I don't use APM (software suspend requires ACPI). 8-(