[Pm-utils] Re: s2both
david at fubar.dk
Mon Mar 12 12:52:29 PDT 2007
On Sun, 2007-03-11 at 01:13 +0100, Tim Dijkstra wrote:
> Both suspend.sf.net and suspend2 have a notion of s2both. That is,
> before suspending to ram, the state of the system is saved to disk just
> like would happen for hibernate.
> This has the obvious benefit of being able to resume in case you
> deplete your batteries while you laptop is suspended.
> I think it would really be useful to have the possibility to do that
> instead of plain s2ram when one suspends. We can of course just make
> use of the possibility in pm-utils when it is available, but I guess a
> checkbox in g-p-m would be nice. For that to work we also need another
> attribute in hal.
This is really just a third sleep mechanism so what I think we need is
- a new method on HAL called SuspendHybrid() - this is on the same
interface as Suspend() and Hibernate()
- a new property on HAL called
to go with .can_suspend and .can_hibernate
Now, there's a bug in HAL already in how we compute the .can_suspend
and .can_hibernate values. For example, here on Fedora, HAL says that my
system can hibernate just fine but that's a LIE since at least on Fedora
this doesn't work when using a swap file instead of a swap partition. I
think this works on other distros though.
Anyway, since pm-utils is the mechanism for HAL, we want to pm-utils to
report all this HAL. FWIW, this is even more needed when we want to do
things like hybrid suspends. But unless someone actually makes a
pm-utils release _this week_ with such a tool for reporting what the
machine can do  I'm afraid this can't go into HAL 0.5.9. That means
it would be good to start writing patches for both HAL and pm-utils and
getting them past these maintainers.
Peter, is this something you can look at / comment on? (Btw, we _need_ a
pm-utils upstream release this week.)
As to presenting these options in the UI, I'll add my two cents and say
it's a useless option to present to the casual user - just always use
hybrid sleep if available (am not terribly interested in discussing the
UI on these lists either - I think the g-p-m and kpowersave guys can
figure this out themselves).
 : it could be called pm-is-supported and would be called by HAL like
More information about the Pm-utils