[ltp] Correcting clock after software suspend

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Thu, 13 Nov 2003 21:04:25 +0200


--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> 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.
Apparently this is needed for some systems.  (On my T23 it was not
necessary, *and* it caused frequent crashes a couple of seconds after a
resume.  So far I haven't found out why hwclock crashes my system; I
just commented out that line in the apm script.)

Marius Gedminas
--=20
C gives you enough rope to hang yourself. C++ also gives you the tree
object to tie it to.

--PEIAKu/WMn1b1Hv9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/s9W5kVdEXeem148RAlldAJ4sByOydN9xCCuOYLOjEZFrkXgoiwCfe+kr
5oWGS0Mu1QVv8RXNpgI5TUE=
=KRV4
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--