[Pm-utils] [PATCH] userspace suspend (s2disk/s2ram) support

Stefan Seyfried seife at suse.de
Fri Nov 3 06:16:43 PST 2006


On Tue, Oct 31, 2006 at 05:52:51PM -0500, Peter Jones wrote:
> On Tue, 2006-10-31 at 18:04 +0100, Stefan Seyfried wrote: 
> > On Tue, Oct 31, 2006 at 11:33:51AM -0500, Peter Jones wrote:
> > > OK, what do you think of this for the INHIBIT stuff:
> > 
> > Looks good.
> > the do_$1 trick might even buy us something in the future if we need to
> > provide a third method (something like do_both was already requested, but
> > i was able to reject it :-) in the future.
> 
> Yeah.  There's another feature we need to think about here -- "suspend
> to hibernate" is what ThinkPad BIOSes call it.  Basically, set a timer

Yes, i remember this as "RediSafe" on the old TP600 and T20 machines back
when we all were running APM :-).

> on suspend, and if we wake up _from the timer_, we go to hibernate.
> 
> But before we actually start trying to solve the logistical problems of
> "which script runs when", I want good, solid support for:
> 
> 1) wake up on timer
> 2) how to know that our reason for waking up was timer without calling
> out to acpid/hal

Yes. In userspace suspend, it is implemented like "always write the image to
disk, but then only suspend to RAM instead of switching off".
This is not exactly the same, but at least gives some protection for:

   - battery runs out during suspend to RAM
   - machine does not resume but hangs in BIOS (it does not help the "machine
     resumes but video stays off case though, because the kernel will already
     have abandoned the disk image in this case).

> > Maybe we can even get gnome-power-manager and kpowersave or whatever to
> > look if there is a $INHIBIT file after a suspend attempt and present its
> > content to the user? But that is something for "later", and maybe there are
> > better ways to communicate this error up the caller chain.
> 
> Yeah.  And when we do that (and the above), we also need to worry about
> knowing that hibernate works (or fails) -- because if hibernate fails,
> we want to go back to suspend after we wakeup in suspend-to-hibernate.

Well i'll think about that once we have working support for 1) and 2) on
more than a handful of machines :-)

Have a nice weekend

    Stefan

-- 
Stefan Seyfried
QA / R&D Team Mobile Devices        |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg  | "Well, surrounding them's out." 


More information about the Pm-utils mailing list