Power management: a new screencast

Hello everyone,

After my previous screencast, which somehow failed to upload on vimeo, I have made another one as I promised. The great news is I have implemented everything I’ve been talking about in my last blog post, and the whole thing is likely to hit 4.8 (aka master) very soon. I will probably merge everything onto master in a week; in the meanwhile, you can check out my branch dafre/new-powerdevil in kde-workspace. Have fun!

P.S.: I have switched to blip.tv thanks to a reader’s suggestion. Vimeo failed to process this video as well.

(if you cannot see the embed, direct link to video for you)

About these ads

~ by Dario on 4 October, 2011.

45 Responses to “Power management: a new screencast”

  1. Awesome screencast. I like that you speak instead of using text to explain – it makes it much more interesting, and your speech is clear and easy to understand.

    It was nice to see the small details you’ve already implemented, such as avoiding chains in the activity configuration, hiding GUI elements unless they’re needed etc.

    The only thing I would change is the “Enable power management” checkbox in the battery widget. A checkbox doesn’t feel as “definite” when you click on it (in KDE applications you often have to click on Apply before the change in the checkbox is reflected). I first imagined it as a switch but I don’t think KDE has any standard widgets for that, so I propose that it’s changed into a button instead: “Temporary disable power management” (with a nice icon). It would be very useful if the battery icon could show that power management has been disabled as well, so that you don’t forget about it.

    • Thank you for your nice feedback!

      You are indeed right about the checkbox, but I’m not really fond of the button: I tried it and it looks even worse. Your idea about a “switch” I think is the right way to go. I’ll put this up for discussion with my Plasma friends. And +++ to the idea of showing the inhibition in the applet icon, a killer Idea I didn’t think about.

      Thank you very much!

      • My two cents: I think the checkbox is fine, but I would reword what it “does” so that the layman knows. Without your video explanation, I would not have realized (without trial and error) what it actually did.

        I really like everything that you have done here. I am looking forward to using it!

    • I agree with Hans comment. How about using a button with the icon with is normally used for pause (e.g. in music players (II) ) and the description “disable power management” or “pause power management”.

      • If power-management is paused, then there would be a “play”-icon and the text “start power management”

  2. Hey!

    Great things :) One thing I see here (and also in at least one KGet settings page) is that the spacing screws up when you hide specific widgets. (You can obviously see that at the end of the screencast, between “Define special behavior” and “Use separate settings” there is a lot more space than it should be.)

    Did someone think about a fix for this already? (Especially in a clean way ;)) We couldn’t figure out how to do it well at DS either.

    Lukas

  3. Great features! this make the power management more easy (and advanced) to users.

    Keep going!

  4. ok…. so where is THE most important thing in power management – CPU FREQUENCY SCALING?

    in 4.7 I can have working cpufrequtils and there is no gui to set governors in KDE… this is a big inconvenience

    • In your Kernel – already doing the right thing for you. Nowadays, no userspace controls for cpu frequency are available anymore, neither in UI or in userspace tools. This is also true for other systems than Linux. So your best bet is to leave ondemand always on and let it save power for you.

      • > In your Kernel – already doing the right thing for you.

        Sorry, but this is not true. And I can show you two example:
        1) With VirtualBox I’m forced to use the “Performance” governor.
        2) Cpu temperature doesn’t matter for the “onDemand” governor , and the result is that in summer we will have to high cpu temperature. You are Italian (like me), so you can read this:

        http://forum.ubuntu-it.org/index.php/topic,477000.0.html

        I respect your work but, imho, you guys are simply turning a “power manager” in a “screen manager”. Probably with the next Power Management I could do the same thing that I actually do, but will be more difficult…

        Another thing: “Usability” is about make easier what USERS want to do, not force them to do what YOU want them to do.

      • You are missing the issue: there is NO way for managing cpu governors from the user session now. If you don’t believe me, go and check upower’s features and APIs. And I think you have some misconceptions about usability: this feature in particular can lead to misusage in 90% of the cases, so your interpretation does not really apply. I could easily argue there’s no easy way to “rm -rf /”, so KDE is lacking usability because it’s not providing access to something the user might want to do. Your system does so many things you don’t notice, and EXACTLY for this reason it’s usable.

        Also, the removal of the governor happened at least 1y and a half ago, so I don’t see what’s your complaint on the new changes.

        If you are experiencing bugs with the ondemand governor, you should report these to Kernel developers. In the meanwhile, you can use the “Run Script” feature we retained exactly for the purpose of taking specific actions which could not be taken in userspace.

        I would also like to draw your attention to the fact that KDE is the only environment where such a thing is possible, so we are actually giving out quite a lot of choices.

      • Dario we are really grateful for your (and others) work but you also missing something important here: 99.9% of computer users doesn’t know what script is, yes it’s better in linux world but still you can’t expect from everybody to write magic spells in shell, users doesn’t need to know what API is and what upower can do, users want to be able to set theirs system as they want

        PS so this is upower/kernel thing? is it going to change?

      • And this percentage of users who does not know how to use script is exactly the percentage of users who shouldn’t change governor. We are all smart enough to understand that this choice is preventing standard users from switching the governor, and since developers are not people who are stealing your freedom away but people who strive to improve your experience, you should also imagine there’s a reason (which i explained before ) behind our choices. Of course this option is not going to return anytime soon.

      • There are people in this world who are “thinking” for users i.e companies like microsoft or apple, they tell me and everybody else what you can and cannot do, I thought that open source is about choice and freedom.

        People can blow up theirs systems by doing other stuff too, not only by governor management, so this is not a good example. With hammer you can build house or kill somebody is it reason to pull of all hammer from the market? Ok, no hammers so shoes, you can kick someone with it right? so go ahead and melt all shoes in the world so everybody could feel safe… but wait, we steel need to chop off hands from all humans cause they also can lead to death… See my point?

        If my car is broken I don’t go under the hood with a sledgehammer. Thinking people don’t mess up with their system if they don’t have a clue. Windows have option to format drive, it’s like 3 clicks away for regular user but somehow world is still spinning around.

        If you want to know what’s happening when developers doesn’t listening to the users look at gnome3, (stupid things like: closing laptop lid = default suspend, to shutdown system you need to put finger on Alt, no mini/maximizing buttons etc… this kind of things should be optional not default, users should have options not be forced to change their habits)

        Back to power management and governors, it’s a shame but we can live with that, I guess (but still have hope to see this options in KDE someday)

        PS out of curiosity, how those plasmoids (lower linked by sfan) are working if you saying there is no GUI way to do this?

      • Your judgement is really unfair, and coming from a misunderstanding of the issue, sorry. I told you how to do that and you still blame us for taking your freedom away – this is non-sense. The average user, the one who doesn’t know what’s a script and what is a governor, will simply trust the kernel. A user who believes changing governor can help his system, has a way for doing it anyway, but *WE ARE NOT SUPPORTING THAT* because we know it might lead to troubles. Is it so hard to see? More than hiding a choice which is mostly dangerous but giving an option to achieve it anyway, I don’t really know what to do to please both sides.

        I should rephrase my sentence: there is no way for doing it *properly* from userspace. I didn’t even look at the code, but these applets are either relying on scripts, or on legacy methods such as changing the governor from HAL.

        Regarding having the option again in KDE, it’s way more likely you’ll find out you won’t need it anymore in the future.

      • I’m not trying to start a war, just pointing out user perspective (more from regular user point of view then my own – as I wrote earlier, this is not a big issue to me personally, but IT IS inconvenience and IT WOULD be great to be able just click this fricking governor in the profile from GUI)

        This kind of papercuts are just not helping to gather new people from windows/mac land where things just work

        I’m not blaming you guys, but sometimes I’m just tired – but hey, the situation is getting better and better with every year in Linux ;)

    • fasd,
      I have the same problem with kde 4.6. I resolved adding some scripts to the profiles. For example, for the “powersave” profile, I Added:
      sudo cpufreq-set -r -g powersave

      If you prefer, you can try this two plasmoids (I didn’t tried them):

      http://kde-look.org/content/show.php/PlasmaFreq?content=144599

      http://kde-look.org/content/show.php/plasmaCpuFreqUtility?content=144809

      • thanks sfan,

        for me personally it’s not a big deal to type it from terminal emulator, most of the time ‘conservative’ governor is fine (ondemand is to hot-headed for my taste) but there are other users where 99% of them don’t like or don’t know how to use CLI…

        just don’t get it why there is no GUI to set governor, why can’t I just set them in this new fancy power management it would be awesome to be able to do something like this:
        “performance governor” in ac mode,
        “conservative” on battery (or “ondemand”)
        “powersave” on low battery

        so if there are plasmoids for this why we can have this in mainstream KDE? this kind of things are really useful (and anticipated by regular users – most laptops with windows on them have software to manage cpu frequency scaling)

    • I really want to say something about this issue (maybe not an issue actually) . I’m an Arch linux user and when I updated to KDE 4.5 (or maybe 4.6? ) I found the CPU frequency config function have been removed because It is done by kernel.

      Kernel is right in most situations. But sometimes, like during hot weather, I really want to control it manually. Now I use laptop-mode-tools to do that but still miss the old, easier GUI way.

      I don’t mean you have to add back it or something. I want to say that we are simply users and just stand for users. We are not arguing but just trying to give some advice. If we are wrong, please don’t get angry.

      • The standard answer these days is that static frequency limits are the wrong tool for thermal management – see http://www.codon.org.uk/~mjg59/power/good_practices.html (CPU point four).

        IIRC there is now some kind of thermal management infrastructure in the kernel. So it might be that you simply need to file a bug to get it properly tuned for you. Or perhaps you need to do some configuration on your side to take advantage of it?

        Worst case if the kernel thermal management infrastructure isn’t enough for needs is that you need a dynamic thermal management tool. But maybe someone somewhere has written one?

      • Thanks for answering my reply. Of course laptop-mode-tools support dynamic frequency management. Actually I just worried about if the kernel really understand the danger. Windows 7 seems don’t care the temperature on my laptop and sometimes causes problems. But I believe Linux kernel will provide a better method. :-)

        The new KDE powermanagement applet has good features and I’m waiting for SC 4.8.

  5. Really nice :)
    So does this “Always Hibernate after 60 Minutes” hibernate 60 minutes after you switched to that activity or after 60 Minutes of inacitivity (couldn’t understand you properly there^^)
    And I think this “Run script” is not needed for Activities? You can associate applications to automatically launch with the Activity, no need for this in the Power Management (is there a UI for the activity auto-launch programs by now?)
    Will the tabs for the On AC/On battery/on low battery disappear when there is no battery available i.e. desktop PC? If they are kept I think it will add some clutter to the interface … And also I do not think it is a good idea to use the horizontal tabs for the Activities, it should be a vertical selection list like the profilese before because I have lots of activities and scrolling a horizontal tab bar is not very user-friendly :)

    • Hey,
      after 60 of inactivity in that activity (sorry for the pun) :)

      Yes, the tabs will grey out in that case

      About the horizontal bar – you are right indeed, I am already thinking about something better :)

  6. Looks awesome. Simple. Clear. Configurable. Great work!

  7. I think I see a bug…
    The “Use power management” check-box is only available through the plasmoid applet ? What If i check it and then remove the applet, Can’t I re-enable it through system-settings ?

  8. Awesome screen cast, i can’t wait to get my hands on this :)

    My only concern is that it is not entirely clear how the activity settings interact with the regular power profiles just by reading the check box options.

    For instance If i choose ‘don’t use special settings’ for my activity do the regular energy saving profiles apply to that activity? or have i just said don’t use any power profiles at all?

    I’d suggest changing the wording of the options to something like this;

    1) Enable custom power profile settings for this activity
    a) Copy settings from
    b) Override Energy Saving Settings
    c) Create a custom power profile for this activity

  9. 1) That’s not a direct link to the video, it leads to a webpage.
    2) I can’t see the video.

  10. Using QTabWidget to hold a page for each Activity’s settings is a bad idea – tabs in config widgets are static UI by convention. I’d do it using a label “Activity specific power management settings” and a combobox to select the Activity to configure.

    • Indeed, that was my first thought when I saw tabs used for Activities. It could be accessible from Activities UI? But otherwise very nice, thanks man, looks like 4.8 is going to be “polishing” version.

  11. Some suggestions for the UI.

    In the extender, I’d change “Enable power management: [X]” to “Power management: [X] Enabled” to balance the whitespace.

    In the profile config UI, it might be good to hide the options for disabled actions. For example, “Run Script” is disabled by default, so everything below it could be hidden to reduce clutter.

    If you want to give a hint that there are more configuration options available after enabling the action, you could add an ellipsis to the action title while it is collapsed. For example:

    [ ] Run Script…

    vs.

    [X] Run Script
    Script: …
    Run script: …

    • You could also set the font to non-bold when the action is disabled, but the ellipsis is probably more universally understandable.

  12. Unticking “Enable power management” sounds fairly alarming to me, and I know what is and isn’t part of powerdevil’s responsibilities. How will it sound to a user who doesn’t know that powerdevil can’t tweak system/kernel parameters?

    “Prevent”ing or (maybe) “suppress”ing screen/system power saving sounds a little better to me, but still not perfect. I think you might be better off trying to think of an intuitive way to present it

    - perhaps having the applet show what powersaving actions will be taken, and provide a button or switch to (temporarily) “Prevent”/”Suppress” it, e.g.:

    If left idle:
    SCREEN will POWER OFF — Prevent this –
    SYSTEM will SUSPEND — Prevent this –

    Obviously a UI expert could refine this a little.

    Even better would be a simple way to manually tie the inhibition to a process or (better) an application and only offer a timed inhibition otherwise – as I speculated in a comment to your earlier post, if the inhibition isn’t tied to an application and isn’t a one-off, it’s part of your workflow and should be tied to an activity. Like this awesome mockup:

    There is currently nothing preventing screen power saving.
    Keep screen awake while:
    [ ] some-third-party-video-player.desktop is running
    [ ] Amarok is running
    or:
    [ ] for the next (90 minutes)

  13. hi Dario, few old personal suggestions:
    1. I believe that there shouldn’t be a “Low battery level” status:
    plugged//unplugged//critical. that’s all
    2. I believe that event handling should be always the same:
    move “when laptop lid closed” and “when pressing power” to “Advanced” tab, and call it “General”
    3 Activities section is a bit difficult.

    no half way between gnome and KDE power UI, eh? ;)
    cheers!

  14. [...] http://drfav.wordpress.com/2011/10/04/power-management-a-new-screencast/ [...]

  15. [...] Parece ser que para la próxima versión de KDE 4.8 tendremos más opciones para el gestor de energía, concretamente mejoras en la gestión de energía en las Actividades. Podéis saber más viendo este vídeo explicativo en inglés: Más información: A quiet place [...]

  16. [...] a short heads-up, everything I have been talking about in my last blog posts about power management has been merged into master before the freeze. This means: all of this [...]

  17. As someone who hated what was happening with earlier versions of the widget, in respect of presentation mode and profiles, can I just say this is a great step forward after the many backwards ones. If it all works I only just updated :-)
    The toggle in the battery applet is really all that is required, though it feels a little clunky, this might just be the label text, which could be shorter and snappier maybe ?

    • Thanks for your positive feedback – I admit I share your same feelings about the checkbox, and I think it could be so much better. This is pretty much the best thing we could come up with for 4.8, but any suggestion is more than welcome for future releases

  18. [...] Power Management System Settings have been redesigned. The user interface has been simplified and the layout improved. Power management no longer relies [...]

  19. Ciao!
    You have done an amazing job! The power management it’s a lot better now.
    With the previous version i used a script that recognized an application running full screen, and if that application was one of the listed in the script (like a skype chat or youtube) it swithed to a profile with no power settings. Then, when i closed the application the profile went back to the previous one. I used a dbus command to switch between profile.
    Now everything has changed and my script doesn’t work (cannot switch profiles), which dbus command should i use to inhibit power management? I know i can do from the battery applet but then i always forget to switch it back to normal… I hope i am clear, and thaks for the help!

  20. [...] na której wyświetla multimedia (problem z przyciemnianiem ekranu podczas odtwarzania) [więcej...]. Można także zarządzać zasilaniem z poziomu plasmoidu, co ułatwi szybki dostęp do jego [...]

  21. Hi there and thanks for all your hard work. Would it be possible to add a way to use a keyboard shortcut to enable/disable power managment rather then just using the check box? This will make it much easier to use and will make the “change battery profile” key on the laptop useful again.
    cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: