[Pm-utils] [patch] userspace-suspend, revisited

Tim Dijkstra newsuser at famdijkstra.org
Tue Mar 27 01:38:40 PDT 2007


On Tue, 27 Mar 2007 09:58:58 +0200
Stefan Seyfried <seife at suse.de> wrote:

> On Mon, Mar 26, 2007 at 08:04:40PM +0100, Richard Hughes wrote:
> > On Mon, 2007-03-26 at 21:03 +0200, Tim Dijkstra wrote:
> > > 
> > > BTW, in pm-action REVERSE is set as "resume" or "thaw" depending on
> > > the method. With `hybrid' we can get back from both s2ram or s2disk,
> > > did you think about what to choose for REVERSE from hybrid?
> > 

> Somebody will come up with a name, i won't go into naming details. You know,
> if it was me, we would not have "suspend" and "hibernate" but technically
> correct terms... ;-) I really no longer care about the names, i'll just use
> what's implemented.

I wasn't talking about the name, but about indeed what path to choose

> > Ideally, we should do the resume action when we come back from RAM for
> > hybrid, and do the thaw action when we come back from DISK for hybrid.
> > 
> > That is assuming we can tell... ;-)
 
> It's probably not hard to implement in uswsusp. However, i need to e.g.
> remove my grub-preset after resume no matter if i came back from disk or
> from RAM for hybrid, so we need to know that it was a hybrid suspend
> anyway.

You could build in the logic in the hook itself, something like: 
[ -f menu.lst.bak ] && mv menu.lst.bak menu.lst

> I thought about this already, and came to the conclusion that it depends
> on the hook if you need to take the suspend or the hibernate path (or
> both) for a hybrid suspend.

But I guess it also depends on what we came back from... 

I just checked all the hooks we have so far. Only the ??video ones and
the 01grub (which is distro specific BTW) differentiate between s2ram
and s2disk. Which means if you're using uswsusp on debian there is no
difference at all;) 

Anyway, I would say the most sane thing to do is to let the s2both
process report what we're resuming from. Other things that don't fit
this approach can most likely be worked around in the hooks themselves,
they can however never find out what they resumed from...

grts Tim


More information about the Pm-utils mailing list