UPower 0.99.0

Bastien Nocera hadess at hadess.net
Thu Nov 14 01:01:27 PST 2013


On Thu, 2013-11-14 at 00:48 +0100, Àlex Fiestas wrote:
> On Tuesday 29 October 2013 12:53:30 Richard Hughes wrote:
> > Released: 2013-10-29
> > 
> > Notes:
> >  - This version contains major API changes. Use the 0.9.* versions if
> > you want to keep using the old API.
> > 
> > New Features:
> >  - Add WarningLevel and IconName properties to all devices (Bastien Nocera)
> >  - Add DisplayDevice composite battery (Bastien Nocera)
> >  - Enforce critical battery policy on the daemon side (Bastien Nocera)
> 
> Hi there
> 
> Lukáš (CC'd) has ported the KDE bits to UPower 0.99, we are discussing it and 
> apparently we have only one concern, which is with the "Enforce critical 
> battery policy on the daemon side".
> 
> We see in the added api a method called "GetCriticalAction" but we see no way 
> of setting this critical action. We let the user configure this behavior and 
> apparently we won't be able to do that with UPower 0.99.
> 
> Maybe we can add some kind of supressing api ?  For example in systemd we use 
> the inhibition api to prevent systemd from doing the default action on Lid 
> close and it works great.

That sounds like API over-engineering. You could write a simple polkit
helper to edit the config file (ie. change that one variable) over
D-Bus. Adding an API for this isn't in my plans.

2 things though:
- there's no code to re-read the configuration file when it changes
- I question that configuring this is even required. When the battery is
critically low, you could either shutdown, or hibernate. If hibernation
is available but broken on your machine, you should disable it for all
users in logind.conf, and that leaves you with just one option. I'm not
sure users need to configure anything if there's only one option.

Cheers



More information about the devkit-devel mailing list