Forge Sprint 2011: Power Management and its future
Hello from Madrid. Forge Sprint is about to end, and it’s indeed time for me to blog. I have been lucky enough to get food poisoning the day my flight was scheduled – although, nothing serious: I have been able to recover quite quickly and I rescheduled my flight for day 2, and I managed to get here and do quite a lot of work.
It has been an extremely productive sprint for every Solid component, but of course I am going to put the focus back on Power Management. So here’s what we did:
Crazy bug fix
My first target for this sprint was closing as much bugs as possible. I managed to close quite a lot of them, and hopefully before the 4.7.2 tag. Some of them include DPMS, inhibition, console switching, and general reliability. You can check kde-workspace tree to have a better outlook of what happened, or simply enjoy your updated version without caring too much 🙂
Power Management + KRandR = ❤
Bug fixes are not that exciting, huh? Ok, I have something better for you. Me and Alex got together and tried to improve KRandR experience even more, by hooking it up with Power Management. The result I am explaining here is demonstrated in a video Kevin will hopefully upload soon. Bottom line, now KRandR will make Power Management aware more than 1 screen is configured: hence, if you have an external screen connected and you close your laptop lid, the PC will not suspend anymore even if it’s configured, allowing you to show your movie/presentation without caring about it. Isn’t it awesome? You can try this feature with this commit you can find in kde-workspace.
Future changes in Power Management
We have been lucky enough to have Bjorn here at our sprint. We had a huge conversation on how to improve Power Management, make it easier, less intrusive and more useful. And we came up with something which might surprise you.
It’s a completely new concept I will try to explain now. To begin, we removed the possibility of creating new profiles manually, and removed the “warning state” of the battery, which was not used by default from 4.6 on anyway. This means now there are just 3 static profiles: one for AC, one for Battery, one for Low Battery. You can still configure thresholds for low and critical batteries of course. To reflect this change, we also removed the profile combo box chooser from the battery applet. This is not exactly a new approach, but we have done that to prevent handling profiles in a bad way.
The new things start here: the battery applet lost a combo box, but gained a new button: “Inhibit”. Have you ever missed the presentation profile, that thingie which was around in KDE 4.1 times? Now you have something better. When you press the “Inhibit” button, everything related to Screen power management and session power management will be, surprise, inhibited. This means your brightness won’t change, your screen will not turn off, your PC will not suspend, no matter your configuration. So, if your favorite video player or presentation did not trigger an inhibition itself, now you’re 1 click away from a 0-annoyances experience. Of course, just turn up the extender of the applet and click on “Uninhibit” to get back to your profile.
And it doesn’t stop here. In the near future, activities will also be able to affect power management. This means you can alter settings, trigger special inhibitions and more depending on which activity you are in. This opens up to endless possibilities: suppose you like to watch TV in your bed before falling asleep. What about creating a “Before sleep” activity? Here, you can add a configuration to let your PC go to sleep after 90 minutes of idling, so that when you’ll be asleep, your PC will follow you. Or you can decide how to handle your screen and everything in each activity you are in. This will allow you to be always productive, always trusting your PC to have the perfect settings for the task you are performing.
To make everything clearer, I have done a short screencast. Unfortunately, I am still not able to showcase activity configuration as it’s under development at the moment, but really wanted to show you how the UI and the battery applet have changed. Enjoy!
UPDATE: Apparently Vimeo does not like my video. I am trying to fix this problem, in the meanwhile you can still download it from Vimeo´s page and watch it.
(if you can’t see the embed, video is on Vimeo, here)