org.freedesktop.PowerManagement

Richard Hughes hughsient at gmail.com
Thu Mar 22 12:36:30 PDT 2007


On Thu, 2007-03-22 at 15:14 -0400, David Zeuthen wrote:
> On Thu, 2007-03-22 at 13:37 +0000, Richard Hughes wrote:
> > > > boolean GetLowPowerMode (void)
> > >
> > > This method, is it the same as the one exported by HAL? I mean, the one
> > > that comes from pm-utils?
> > 
> > No, it's a user preference version of it. Imagine this method
> > returning false when we are on AC, or > 50% on battery, but returning
> > true when <50% of battery. That point where the system is "low" is
> > probably best defined in the session, so KDE can make it configurable,
> > and gnome can hardcode something semi-sane. ;-)
> 
> It might be better to call it something else than GetLowPowerMode() as
> what you really want to do is to give applications a hint whether they
> should operate in a mode that makes the system as a whole consume less
> power. Perhaps call it GetPreferPowerSavings() instead and do give
> examples in the docs for where this is useful e.g. a) desktop search; b)
> media playback; c) screensaver; d) sound server; and so on and so on.

Sure, GetLowPowerMode sucks as a name. GetPreferPowerSavings isn't much
better tho :-)

What about:

GetPowersaveStatus
GetPowerModePreference
GetUseLowPower
GetSavePowerPreference

> FWIW, perhaps off-topic here, I think we _do_ want g-p-m to provide an
> option here. Personally, I don't want g-p-m to try to be "smart" and
> guess what _I_ as an user want. Btw, I know 2.16 had this
> 
>  http://people.freedesktop.org/~david/g-p-m-prefer-power-savings.png
> 
> but for some reason it's missing in 2.18 which is a regression but the
> maintainer never responded to me
> 
>  http://bugzilla.gnome.org/show_bug.cgi?id=414436
> 
> Hint hint, nudge, nudge :-)

Heh. I'll add it back to the UI when we get some common interfaces that
things will actually use. ;-)

> (Justification: suppose Totem/gstreamer used this, which I think we
> want, and that it chose the video decoder accordingly; e.g. if
> GetLowPowerMode()->TRUE the video quality is superb but makes my CPU run
> at 1.8GHz. If ->FALSE then the video quality would be worse but in
> return the CPU would run at 1.2GHz and I would get 30 minutes more
> runtime; you know so I could actually finish watching the damn movie.
> Morale: I, as an user, really don't want g-p-m to make this decision;
> for me, and I guess, lots of other people it's a real user preference.
> To me at least.)

Well, this is a implementation detail of the session service, rather
than an API constraint. I agree the name sucks tho.

Richard.





More information about the xdg mailing list