On Fri, Jun 20, 2014 at 4:24 PM, Lennart Poettering <lenn...@poettering.net> wrote: > On Fri, 13.06.14 18:54, Tom Sherpen (tomsher...@mail.com) wrote: > >> Hi, >> >> I am wondering if hybrid-sleep could support a hibernation delay, similar >> to what is found in pm-utils [1] >> >> Thus, you would be able to first suspend, with the machine going >> automatically into hibernation after a certain amount of time. >> >> Is support for such a hibernation delay planned for the future? > > This is currently not implemented. We could certainly add something like > this to the systemd-sleep binary, however, I am not entirely sure how to > do this reliably: if we do this in userspace, and first set up a timer > that will resume the machine, then go to suspend, how do we figure out > after resume whether we resumed because of this timer (and hence we > should go to hibernation, immediately) or because of some user activity?
I think this is usually done by comparing if the clock after wakeup == (clock before wakeup + hibernation delay + ...maybe clock drift?). [In other words, ugly hack from before s2both days.] -- Mantas Mikulėnas <graw...@gmail.com> _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel