[systemd-devel] [hybrid-sleep] hibernation delay
Mantas Mikulėnas
grawity at gmail.com
Fri Jun 20 06:32:21 PDT 2014
On Fri, Jun 20, 2014 at 4:24 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Fri, 13.06.14 18:54, Tom Sherpen (tomsherpen at 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 <grawity at gmail.com>
More information about the systemd-devel
mailing list