org.freedesktop.PowerManagement

Holger Macht hmacht at suse.de
Thu Mar 22 03:03:04 PDT 2007


On Tue 20. Mar - 21:50:20, Richard Hughes wrote:
> I want to restart discussion on the previously discussed session power
> management interface: org.freedesktop.PowerManagement
> 
> I'll outline something rough (and similar to what is already being used
> in gnome-power-manager) and we can argue / discuss about names or
> features.
> 
> If we get the obvious bits sorted, then we can work on descriptions, API
> subtleties and that sort of thing.

I fully agree on this. Let's get something small and stable and we can
discuss details later on.

> == Methods ==
> void Suspend (void)
> void Hibernate (void)

ACK.

> void Reboot (void)
> void Shutdown (void)
> 
> gboolean AllowedSuspend (void)
> gboolean AllowedHibernate (void)
> gboolean AllowedReboot (void)
> gboolean AllowedShutdown (void)

Just curious why we need this Reboot and Shutdown related methods in this
API at all.

Yes, generally they're somehow related to Suspend and Hibernate, but isn't
this something that should be available regardless of power management?
I'm not quite sure how this is handled in KDE and GNOME these days. The
desktop has to provide these methods with no regard on any power
management applications. If there's no gnome power manager or kpowersave,
you still want the user to shutdown or reboot, no? Shouldn't they be in
the desktop base somewhere?

> int GetBacklightBrightness (void)
> SetBacklightBrightness (int)

ACK.

> boolean GetLowPowerMode (void)

This method, is it the same as the one exported by HAL? I mean, the one
that comes from pm-utils? If so, I think we shouldn't duplicate it
here. In the future, KDE 4 or gnome 3.x should be tied as close as
possible to HAL IMHO. So every application in either desktop session
should have a very easy way to query capabilities on HAL provided by the
desktop anyway. Why the duplication?

> boolean GetAcState (void)

Just to clarify that I understand that this one isn't a duplication of HAL
and that you might have more than one AC adapter or an UPS and the desktop
application providing the API has to logically sum them up.

> string GetDescription (void)

Can you give an example of what this method might return?

> string GetIcon (void)

Can you elaborate a bit on this please? It still seems to be misplaced to
me. Shouldn't those icons be defined by the theme? And shouldn't one be
able to query its details anyway?

> == Signals ==
> int BrightnessChanged
> boolean AcStateChanged
> boolean LowPowerModeChanged
> string DescriptionChanged
> string IconChanged
> 
> The inhibit stuff, the statistics stuff (and any other crazy random
> stuff) can wait until later, I would really like to standardize on
> something, so we can get some sort of standard sorted.

ACK. I also think that some of the discussions taken place here are going
too much into detail. We should really agree on a minimum set and can
extend it later on.

Regards,
	Holger



More information about the xdg mailing list