Moving PowerDevil to kdereview

Dario Freddi drf54321 at gmail.com
Thu Sep 4 16:07:32 BST 2008


> Hi Dario,

Hi Friedrich,

>
> kdeutils coordinator here, sorry for the delay, here my short comments so
> far.
>
> Let's start with that I am really happy to see you working on giving power
> management a deeper integration with the basic KDE desktop. :)

No problem, thanks :)

>
> Am Freitag, 29. August 2008, um 19:45 Uhr, schrieb Dario Freddi:
> > Hello everyone,
> >
> > I am writing this mail to inform you I have moved PowerDevil from
> > playground/utils to kdereview. PowerDevil is a Power Management system
> > for KDE4.
> >
> > PowerDevil's aim is to be lightweight, feature-full, configurable, based
> > on Solid only and fully integrated with the Desktop Environment. It is
> > splitted into various components, a KDED module, a KCModule, a KRunner, a
> > Plasma Engine and a Plasma Applet.
> >
> > The core is the KDED module. Polling was removed thanks to a system that
> > sets the polling time to the next upcoming idle event. Every time the
> > polling function is called PowerDevil calculates the minimum time for an
> > idle event to come, and sets the timer accordingly. For example, in a
> > scenario where you have a lot of events in a small amount of time,
> > PowerDevil polls the system every minute. For detecting system activity,
> > it uses the same grabbing system used previously in KDE4Powersave.
>
> Please tell me where I am wrong:
> So this is a per-user/session demon, right? But shouldn't this be a
> per-system demon? How are things supposed to work if two or more users are
> logged in at the same time, perhaps even running different environments
> (KDE3, KDE4, GNOME, ...) which all try to react to system changes?

You have a point here. The behaviour of PowerDevil here is strictly connected 
to KDED behaviour. Anyway, I think the problem can't be avoided, since even if 
it was a system-wide daemon, it would conflict anyway with KPowersave, gnome-
power-manager or whatever. I don't have any ideas for this, but I think it's 
the quirk about all power managers. The good point is that very rarely on 
laptops we have multiple users logged in at the same time, so this shouldn't 
be a huge issue.

>
> > The KCModule handles configuration of the Daemon. Having a dedicated
> > application for it seemed to me redundant, since you can have it by using
> > kcmshell4. PowerDevil has 2 kind of configuration: a general one, and a
> > profile-based one. You can create new profiles and assign them to
> > particular events, PowerDevil will take care of kicking them in at the
> > right time.
>
> Cannot comment on the Plasma dependant parts, still:
> > The KRunner acts like a shell of PowerDevil. By typing set-profile, set-
> > governor and so on, you can change on the fly what you need.
> >
> > The Plasmoid should be what the system tray was for old Power managers,
> > and it should basically have the same features as the KRunner.
>
> It would be great if one could control the currently used profile from it,
> like possible with KPowerSave.

It is already possible, if you type "power profile" KRunner lets you choose 
the profile you want to set. About the Applet, already planned ;)

>
> Minor idea related to the code:
> The code inside PowerDevilApplet::paintBattery could be made more OO-like
> by introducing AbstractBatteryDrawer and subclass to OxygenBatteryDrawer
> and ClassicBatteryStyle, but that would be just me.

That code belongs to the battery plasmoid, so probably you could forward this 
suggestion to the guys maintaining it. Consider that PowerDevilApplet is just 
a battery plasmoid now, it will probably be removed, and the current 
dataengine+applet in kdebase improved (checkout previous messages in the 
thread)

>
> > The code I'm putting in kdereview includes the KDED module, the KCModule,
> > the KRunner and the Plasma Engine. I'm not so good with Plasma, so I
> > tried to backport the current battery plasmoid and extend it, but with no
> > luck. I'd really need some help on this side.
> >
> > Though the core is already working and it's fully-functional: it's being
> > tested since a pair of months by KDEmod users, and they're pretty
> > satisfied with it. The KRunner is also stable and functional.
> >
> > The code has no Krazy issues, compiles with no warnings and it's fully
> > i18n'ed. I'd like to move it to kdeutils trunk, if approved.
>
> I agree with those who would rather move this into kdebase/workspace as
> interfacing with the power management is rather something elementary IMHO.

Yeah, I agree too.

>
> > It still needs
> > an usability review,
>
> The KCModule really needs some, I found it very confusing, pardon me :)

Don't worry, I know I suck at GUI designing, that's why I asked a review :DD

> For example I would group everything which is about "On X do Y" in one tab,
> that means Dim display, Battery Actions and Profiles Assignement. All edit
> fields (battery percents, minutes) should not stretch all they can to the
> right, but have a useful max length. And I would rename "Profile" to
> something more descriptive, like "Energy consumption profile" or better.

I'll try to implement your suggestions, though if somebody could give some 
help and a detailed review of things to change, I'd really appreciate it.

>
> Cheers
> Friedrich

Cheers
Dario





More information about the kde-core-devel mailing list