[ltp] Resume from S3 if battery runs out

Daniel Maier linux-thinkpad@linux-thinkpad.org
Thu, 27 Jul 2006 23:35:09 +0200


--VbJkn9YxBvnuCH5J
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline

Hi,

after playing with /proc/acpi/alarm I am setting the wakeup time at
suspend to now + 60min and on resume I check wether the current time
is now + 60min + some tolerance. This is done to avoid running out
of battery while in suspend to ram.

Actually, this is a bad hack, because I would also have to check
on suspend wether the battery can give power for s3 for 60min and a
resume and a suspend to disk. There is also a problem with resuming
manually after 60min.

So the question is, if it is possible to resume if the battery runs
out?
Also, is it possible to check the event which caused a resume
(LID/fn/alarm)?

Regards, nusse.

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

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

iD8DBQFEyTGNjcCaBV47tD0RAu+fAKDVWtLgELCY0wzm5lAb7wq5xr6EKACcDI2g
7lgK2y6WC1OqxIkFRnV76Wc=
=lpcn
-----END PGP SIGNATURE-----

--VbJkn9YxBvnuCH5J--