[Pm-utils] Re: s2both

David Zeuthen david at fubar.dk
Mon Mar 12 13:18:09 PDT 2007


Hi,

Please don't cut Cc's.

On Mon, 2007-03-12 at 21:02 +0100, Danny Kukawka wrote:
> On Montag, 12. März 2007, David Zeuthen wrote:
> > 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.
> 
> No, this is not a lie since the property only say the kernel provide the
> capability to e.g. suspend to disk/ram and not that you are really able
> to suspend. See the spec:
> 
> 	If suspend support is compiled into the kernel.
>         NB. This may not mean the machine is able to suspend
>         successfully.

I know perfectly fine what HAL reports. The thing is, applications today
rely on the .can_hibernate method to actually do something useful like
presenting the user with an option to use Hibernate. That's what they do
and it's their only reliable way of knowing. So if we know a'priori this
is going to fail that's just stupid. So this change is justified I
think. 

So if we do this, and we should, the documentation of that property will
have to be slightly revised to match the semantics. And that's fine; we
can, and should, change small semantics things like that (without
breaking API).

This is one of the occasions where such a change in the semantics is
justified. It's not like it's going to break things. Do you disagree?

    David




More information about the Pm-utils mailing list