s2both

David Zeuthen david at fubar.dk
Mon Mar 12 14:22:53 PDT 2007


On Mon, 2007-03-12 at 21:42 +0100, Danny Kukawka wrote:
> On Montag, 12. März 2007, David Zeuthen wrote:
> > 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. 
> 
> Do they? KPowersave for example depend on *.can_* property == TRUE && 
> org.freedesktop.Hal.Device.SystemPowerManagement.method_names contain the 
> needed entry 

Relying on HAL internals (the latter) like that probably isn't good.

> Maybe we need a new key for the info that the underlaying tools really 
> allow (e.g. if s2ram know that the machine is suspendable).

Why would we need a new key? The .can_* properties can be used for this
and frankly, their current definition (is the kernel able to suspend
etc.) aren't really that interesting. What applications want to know is
simply whether the machine can be suspended/hibernated or not.

(of course, we still don't make any guarantees that suspend and/or
resume actually works - that's impossible.)

> No. But maybe it make more sence to have a methode to get the info 
> if needed always actual (what if a hook get installed to pm-utils and
> the machine can/can't suspend now or the swap partition get enabled/
> disabled) and not as a static information via a property
> which already represent a static info. 

I hear what you're saying and, yes, we could add methods CanSuspend()
etc. but I don't think there are any realistic use cases that warrants
this... I'm not opposed to a patch for this though, but not before we
have the requisite support in pm-utils e.g. the pm-is-supported tool.

     David





More information about the hal mailing list