can_suspend_to_{x}

David Zeuthen david at fubar.dk
Mon May 8 09:31:46 PDT 2006


On Fri, 2006-05-05 at 21:16 +0100, Richard Hughes wrote:
> In the spirit of making everything consistent [1] I think the:
> 
>   power_management.can_suspend_to_disk
>   power_management.can_suspend_to_ram
> 
> keys should be:
> 
>   power_management.can_hibernate
>   power_management.can_suspend
> 
> As we already call the methods Suspend() and Hibernate() and I'm trying
> to make this a little more sane with all the power stuff for all the
> overlapping nomenclature.

OK to add a patch that adds

  power_management.can_hibernate
  power_management.can_suspend

keys but please keep the old ones

  power_management.can_suspend_to_disk
  power_management.can_suspend_to_ram

around too - mention in the spec they are deprecated and can be removed
in the future but not before "May 1st 2007" (to pick a random date one
year from now).

>  I'm sending similar emails to other projects
> as I want to make this as standardised as possible.

So, HAL is just an API for desktop developers, nothing more, nothing
less. If some desktop wants to call it what they want so be it and I
don't think we should force them to change.

The meaning should be well-defined in HAL (and we really need to
document the method interfaces in the spec too! Patches please!)

 - Suspend(): puts the system in a state where little power is consumed.
   The system is not operational while in this state.
   Latency for the system to return to an operational state is on the
   order of magnitude of 5 seconds.

 - Hibernate(): puts the system in a state where no power is consumed.
   The system is not operational while in this state.
   Latency for the system to return to an operational state is on the
   order of magnitude of 30 seconds.

   (adjust wording, timings yourself)

and that's it. The point is that these are the semantics that HAL
guarantees and we don't give a damn about how it's implemented. Notably,
pm-utils works on both ACPI, PMU and APM and that's fine and all.

Some thoughts:

If some distro or hacker with too much spare time wants to implement
Suspend() or Hibernate() by suspending to the network or use some
experimental kernel patches from some tree, so be it.. they can patch
pm-utils to do the right thing.

If it becomes mainstream to suspend to a networked server, then, sure,
we can add a SuspendToNetwork() method, maybe it even takes the network
address of the server to suspend too. The operational thing here is "if
it becomes mainstream". 

    David




More information about the hal mailing list