Technically, powerdevil is designed to integrate with KDE’s platform-independant infrastructure. So while the actual tasks are very close to the hardware’s capabilities, powerdevil is not bound to Linux for example. The code is very portable, thanks to the Solid hardware abstraction. Naturally, PowerDevil uses knotify to tell the user about anything she needs to know, fine-grained control about all notifications is available in the System Settings module.
PowerDevil consists of the following parts:
… power. As Dario has already blogged, we have a great new application in kdebase, scheduled to be released with KDE 4.2 in january. PowerDevil is actually not an application in the traditional sense. PowerDevil delivers the infrastructure for power management in KDE. This means it’ll notify you when your battery is running out, it dims your screen a bit when you’re idle to save some battery life, it switches to a lower power consumption state when you unplug the AC Adapter, it automatically suspends, hibernates or shuts down when your battery is (near) empty, that kind of stuff. For a user, it’s not a real application, but much more a service that handles some tasks for you and doesn’t get in the way.
- A configuration dialogue in System Settings
- A kded module that does the background work
- A KRunner for command-line access to most functions
- A Plasmoid for quick access to some popular functionality
During the last week, I’ve done some work on the plasmoid corresponding to powerdevil, and it starts to work nicely. In current KDE’s SVN trunk/, you can click on the battery plasmoid and you’ll see the dialogue in the screenshot. The idea (should be pretty clear, eh) is that you check some details on the battery status, quickly switch profile (when you want full performance on the road, for example), or re-adjust your brightness. The button at the bottom opens the PowerDevil settings module. The plasmoid still needs some polishing, but thanks to the input from Riccardo, Celeste and others, I think we’re pretty close to a smooth UI.
I’d also like to add a “do not suspend or screensave my system while I’m doing this presentation / watching this movie” button. We could implement that with a profile in powerdevil (but that wouldn’t cover the screensaver), or — and I think I prefer that option — with a “[x] Presentation Mode” checkbox. I figured, we should only prevent the system from suspending after an idle time. The system should still suspend (/ hibernate / shutdown / …) at the critical battery level. This critical level suspend should also go with some kind of count-down dialog, so you still have the opportunity to ‘… cancel that damn thing’ when you really do not want it to go away. Well, on the TODO. :)
- screen brightness 80 to set the brightness of your display
(between 0 and 100)
- suspend for various suspend methods
- power profile to switch to a different profile
- power governor for a list of CPU governors
- power scheme for different schemes (note to self: find out what the difference between scheme and profile is ;-))
- screen brightness (without number) to turn off and dim the screen
We should probably collect this knowledge on UserBase …In other power management news, we’ve also come quite far. Various people (among them Lubos) have done an awesome job making KDE suck less power. I’ve done some tests over the last months. Around KDE 4.0, the machine caused 700 – 900 wakeups per second, idle. Most of that (but not all) was caused by an issue in xine when using certain functions in phonon. Right now, we’re pretty much there. My idle system is down to around 100 wakeups per second, most of that caused by hardware (wifi, usb, sata, …). Something the kernel developers are working on. KDE (plasma + apps) accounts for 5 wakeups a second, the first KDE app comes in as 10th. To put those numbers in perspective: 100 wakeups per second is already pretty low. Everything below it is probably highly optimized. Even in compositing mode, when you’re not moving your windows KWin doesn’t suck extra power. Good news for mobile KDE users. :)