You are not logged in.

#1 2014-06-13 08:29:15

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

First suspend, then hibernate?

Hi there,

I am wondering if it is technically possible to put a machine first into suspend by systemctl suspend and let the machine subsequently go into hibernation after a certain amount of time.

I first thought that hybdrid-sleep is what I am looking for but it just puts the machine into both states at the same time, thus taking the same amount of time than hibernation, which is not what I want.

Thanks ahead!

Offline

#2 2014-06-13 08:45:51

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: First suspend, then hibernate?

I think this is possible with pm-utils (if that's what ubuntu uses), which has its own hybrid-suspend implementation.

I used this method before I switched my laptop to arch. Your system fist suspends and hibernates after configurable delay.
Never bothered to try to set it up on arch, but it should be possible one way or another. Let me know if you get it working :)

Offline

#3 2014-06-13 09:10:11

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: First suspend, then hibernate?

Thanks!

I will definitely test it. Does someone know if it is also possible with pure systemd?

I would definitely prefer systemd over pm-utils.

Offline

#4 2014-06-27 09:28:45

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: First suspend, then hibernate?

It seems that this is a shortcoming that first needs to be addressed in the kernel.

So you mean that we should check if after wakeup the time is within a
5min window or so around the time we set our timer to, and if that's the
case, then we assume we woke up because of this timer-hybrid-sleep
thing? That sounds awfully black-magicy to me. If people happen to
manually resume the machine precisely in that 5min window then the
machine will immediately go to hibernation. That sounds really wrong to
me.

I am really not a fan of mechanisms that usually work, but sometimes
don't. That's nothing I want to support. Sorry.

If you can provide me with a kernel API or so that precisely tell us
that one specific timerfd or so caused a resume, then I am all ears, but
otherwise this is not going to happen. Sorry.

If there's value in implementing something like this, then fix the
kernel first, and we will make use of it. But we will not work-around
lack of support from the kernel for this kind of thing.

http://lists.freedesktop.org/archives/s … 20319.html

Offline

#5 2014-06-27 10:40:00

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,596

Re: First suspend, then hibernate?

I read that thread on the list, and I think they are right, but, if the machine was resumed by opening the lid, or by pressing a button, wouldn't it be a different scenario.
In that case,I guess!, there is user intervention, the process would not be on auto pilot, just my 2 cents, although, I can't program, so I have no real right to speak;)
Maybe someone can enlighten this, as I'm a bit curious about this too.

Offline

Board footer

Powered by FluxBB