org.freedesktop.PowerManagement

David Zeuthen david at fubar.dk
Thu Mar 29 12:22:42 PDT 2007


On Thu, 2007-03-29 at 19:50 +0100, Richard Hughes wrote:
> Sure, I think I'm agreeing with you. Do we need such an argument for
> Hibernate and Standby? I'm not thinking ACPI, I'm thinking ARM (and the
> future).

Maybe Standby(), definitely not, by definition, Hibernate(). Keep in
mind that the actual mechanism used might be very different from what
you expect. So some embedded device might have what technically is
SuspendToDisk but it's PM session daemon might advertise as suspend.

Please at least _try_ to keep the interface simple and come up with use
cases before adding useless API like "time to wake up after suspend":
Holger did for Suspend() (a mythical VCR app) and I think that's fine
although it's a bit far fetched / academic in some way,

For the record, I also think it's pointless to advertise Standby() as by
doing that you now force applications developers to make a choice
between two very similar mechanisms (ACPI S1 vs. ACPI S3). That's a bit
stupid I think, _we_ don't want app authors to even care about that.
It's just a slippery slope.

(as an aside we don't even advertise Standby() in the HAL mechanism; the
thinking is that HAL's Suspend() implementation might choose to do ACPI
S1 if ACPI S3 is known not to be working on the system)

The key here is to keep the interface as simple as possible. No needless
API. Thanks.

> >  1. Either we keep shutdown and reboot mandatory like the other o.f.pm
> >     methods, then all desktops have to make sure that _all_ those methods
> >     are actually always implemented in the desktop session no matter of
> >     any power management application. At least they have to return
> >     NotSupported or the like.
> 
> My favourite.

You can't force something like that. There are still plenty of people,
at least in my office (Red Hat), running twm. But that's fine;
applications trying to use the D-Bus session bus will just receive an
error that either a) there is no message bus; or b) there is no o.fd.P
service.

> >  2. We all, desktop and power management people, agree that a power
> >     management application is compulsory in every desktop session.
> 
> Well, the said application could literally be an 80 line python file.

What's the point? Just state that apps simply must be able to cope with
either a) no session bus; or b) no org.fd.P service. There's nothing new
in that; apps need to cope with errors.

     David




More information about the xdg mailing list