DeviceKit-power and latency control

Richard Hughes hughsient at
Tue Nov 11 06:53:12 PST 2008

On Tue, 2008-11-11 at 08:54 -0500, David Zeuthen wrote:
> On Tue, 2008-11-11 at 12:08 +0000, Richard Hughes wrote:
> > > Why wouldn't the admin just use the same method? I'm not sure why we
> > > need two separate methods. I mean, with a CancelLatencyRequest() and
> > > proper user interface the admin can just remove requests that way.
> > 
> > Nahh, the admin interface is "sticky" i.e. the admin can issue the
> > request, disconnect and the the setting is persistent across reboots and
> > sessions. The user request gets cleaned up on disconnect.
> It sounds somewhat useful that the admin can define such "sticky"
> requests.

Yes, I think it's important.

> why not just a single one
>  RequestLatencyGuarantee(string type, int value, bool is_sticky)
> requiring different polkit authorization depending on whether
> is_sticky==TRUE.

Yes, that would work too.

> As discussed on IRC, I'm going to commit a few changes to make that
> easier to achieve, the main one being moving the objects around e.g. /
> -> /org/freedesktop/DeviceKit/Power and so forth. This probably means a
> small change in gnome-power-manager's devkit-power branch but I think
> it's pretty much worth the change.

Don't worry about g-p-m just yet -- the devkit branch is proof of
concept only.

> Anyway, when it comes to configuration files (once we get around to add
> this) we need to diligently point out that such a file is just an
> implementation detail and that it might go away / change format / change
> location. This is actually not far fetched; since this is a
> configuration value you really want something like GConf's stacking to
> store it, e.g.
>  o system-mandatory
>  o site-mandatory
>  o org-mandatory
>  o factory-mandatory
>    (normally you'd have per-user here but this is a system daemon)
>  o system-defaults
>  o site-defaults
>  o org-defaults
>  o factory-defaults

Wow, sure. I guess.

> Of course it's not reasonable to use GConf from a system daemon but one
> of these days we'll have things like GSettings/DConf in the glib stack
> where it's suitable for system daemons. And then we want to change our
> implementation to use that. Then, in some star trek universe many light
> years away, the admin might change all the latency requests for the
> whole site or organization.

I guess it makes sense to tie into FreeIPA or something then.

> In particular we need to say that the D-Bus interface should be used to
> change these values, editing the config file will never reliably work.

Totally agree.

> No problemo. Can you upload the new interface when we've got the changes
> in? Since it's public API and all, another round of review might be
> good.

Will do. I'll update things this afternoon.


More information about the devkit-devel mailing list