Moving PowerDevil to kdereview

Friedrich W. H. Kossebau kossebau at
Thu Sep 4 14:18:09 BST 2008

Hi Dario,

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. :)

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?

> 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.

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.

> 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.

> It still needs 
> an usability review, 

The KCModule really needs some, I found it very confusing, pardon me :)
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.

Okteta - KDE Hex Editor, coming to you with KDE 4.1

More information about the kde-core-devel mailing list