org.freedesktop.PowerManagement

David Zeuthen david at fubar.dk
Thu Mar 29 09:52:26 PDT 2007


On Thu, 2007-03-29 at 16:08 +0100, Richard Hughes wrote:
> On 29/03/07, Holger Macht <hmacht at suse.de> wrote:
> > 1. Shouldn't we add a "time until wakeup" argument to the suspend call? I
> >    imagine a vcr application calling suspend with this argument to wakeup
> >    and start recording. Yes, something we can add later on.
> 
> Yes, but I don't know a single laptop this works correctly for. You
> could argue the same about Standby, Hibernate and Shutdown. Maybe
> another method TimedSleep or something?

No, just add it to Suspend() as a mandatory parameter. It doesn't really
make sense to add this for for Hibernate() or Shutdown(). If the value
passed is '0' it means you don't want to be waked up. Then Suspend()
need to throw AlarmNotSupported too in the event the hardware/mechanism
don't support this. Value passed is number of seconds; I think an Int32
should be enough :-)

> > 2. You are calling one section "compulsory basic interface". So in case
> >    you don't have a real power management application such as g-p-m or
> >    kpowersave on the desktop, but of course still need the shutdown and
> >    reboot interfaces, someone else (the desktop base) has to implement all
> >    of the others too? That seems unfeasible to me. Or am I getting
> >    something wrong here?
> 
> Hmm. I figured they could all be just stubs that return NoHardware or
> PermissionDeniedByPolicy or something like that. Maybe an error of
> NotImplemented should be added to the spec. A stub in python is only a
> few lines of code, and then we stop lazy XFCE (joke!) people from not
> implimenting the whole base spec.

Yes, I think any implementation should be allowed to throw NotSupported
or PermissionDenied. IMO, there's no need to add the superflous ByPolicy
to the latter and NoHardware is an implementation detail apps shouldn't
care about - just use NotSupported instead.

      David





More information about the xdg mailing list