This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Linux and KDE are power hogs, why and how to fix it?

Tags: None
(comma "," separated)
Alexander van Loon
Registered Member
Posts
9
Karma
0
OS
Please read my weblog post for an elaborate explanation. Not only does Linux consume a lot more power than Windows Vista, KDE (Kubuntu 9.10) consumes significantly more power than GNOME (Ubuntu 9.10).

My questions are:
  1. Why is KDE’s power consumption so much higher than GNOME?
  2. Are the KDE developers aware of this?
  3. Do they consider this a problem which should be fixed, is work being done to fix it?
  4. Being a non-developer myself, can I make any modifications to my installation to remedy the problem?
  5. Do bug reports already exist, if not, for which products should I file bug reports?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I would recommend you list the items powertop highlights in bold in the table in the lower half of its screen.

Note that HAL has been deprecated, and Linux applications are moving over to libudev now, which relies on the Kernel sending events rather than polling for changes which will be more power efficient.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Alexander van Loon
Registered Member
Posts
9
Karma
0
OS
The following measurements are taken with Kubuntu 10.4. I got tired of Kubuntu 9.04 so I decided to switch to that. Nevertheless, power consumption is still 12 Watt.

Top causes for wakeups:
64.4% (23.4) [iwlangn] <interrupt>
04.0% ( 1.4) kwin
04.0% ( 1.4) [kernel core] hrtimer_start (tick_sched_timer)
03,9% ( 1.2) [kernel scheduler] Load balancing tick
02.9% ( 1.0) events/0

There are more causes for wakeups which have at least one wakeup per second, but they don’t appear in the list permanently. Also, moving the cursor with the touchpad will cause massive wakeups, 150 per second. But I assume that’s normal.

Average amount of wakeups per second is somewhere around 25. If I disable WiFi it decreases to 7 wakeups, but power consumption still remains ridiculously high at 10.8 Watt. If WiFi is disabled, [iwlangn] disappears from the causes for wake ups, of course.

The switch to udev will also benefit GNOME, right? So it’s not going to close the huge gap in power consumption between KDE and GNOME, will it?

I get a feeling that PowerTOP is not showing everything (note that I always start it as root). Even if the wakeups decrease to 7 per second when WiFi is disabled, power consumption still remains at a huge 10.8 Watt. How can that be? Is something hidden which PowerTOP doesn’t show consuming a lot of power?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This means that system wakeups are not causing the power usage ( ie. its outside the processor )
KDE ships with integrated desktop effects which are activated if your hardware supports them. GNOME may possibly not have Compiz enabled by default.

Try deactivating them ( System Settings > Desktop > Desktop Effects ).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Alexander van Loon
Registered Member
Posts
9
Karma
0
OS
After disabling compositing I still get 10.6 Watt. Disabling compositing thus seems to have a very marginal effect. The measurements on Ubuntu 9.10 were made with Compiz enabled if I recall correctly.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
While this is specific to Thinkpads, it may offer some general tips for your issues: http://www.thinkwiki.org/wiki/How_to_re ... onsumption


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Alexander van Loon
Registered Member
Posts
9
Karma
0
OS
Thanks for all your help and advice, I’ll certainly read the information on the ThinkPad wiki. But I’d like to see the problem fixed at the root instead of having to resort to all these kinds of tweaks to be done by the user afterwards. KDE should consume less power out of the box.

So I want to bring this issue to the attention of the KDE developers. What would be the best way to do this? Which KDE developers would be responsible? To which mailing list should I send a message? Or should I file a bug report on bugs.kde.org? If so, for which component?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The problem is you need to identify the KDE application or component at fault before you can do anything. Things to look for are CPU Usage / Wakeups, GPU Usage / Wakeups and Disk IO.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Asraniel
Registered Member
Posts
49
Karma
0
there was a recent benchmark by phoronix, and kde was actually sligthly better than gnome in power consumption. which means it would be interesting to find the problem in your particular case
Alexander van Loon
Registered Member
Posts
9
Karma
0
OS
Asraniel, that’s interesting. Could you please give me a link? I tried searching on Phoronix myself, but I didn’t find that benchmark you mention.

I have some new interesting findings to report. I decided to apply PowerTOP’s suggestions for power saving measures, which made a significant difference. I quickly pressed the relevant buttons to apply all suggestions which came up, so I don’t recall all the modifications done by PowerTOP exactly, but I know they were the following:

  1. USB autosuspend
  2. WiFi power saving
  3. APM something
  4. HD audio power saving

I think something is terribly wrong with the way KDE or Kubuntu handles the audio devices on my notebook. While PowerTOP suggested HD audio power saving, it also mentioned that an (I’m not sure but I think it mentioned multiple) audio device were active 100% or more than 50% of the time. Maybe it’s a bug in Kubuntu or KDE which is responsible for the sick power consumption? I think this question I get when I start up KDE is related:

Image

I get this warning on Kubuntu 10.04 which I’m currently using, but that also happened when I was using Kubuntu 9.10. On Kubuntu 9.10 it would also mention the output device of the ALC269 after the capture device.

I’m sure it’s not my hardware. Audio worked fine on Ubuntu 9.10, and Ubuntu didn’t nag me with questions asking me if devices were removed. Possibly this also explains Ubuntu’s significantly lower power consumption.

If I’m correct Solid is reponsible in KDE for interaction with hardware, right? Whatever it might be, I’m going to do the following: install Kubuntu 9.10 again and file a bug report on Launchpad concerning the audio device removal question.

Let me show some PowerTOP screenshots made after applying it’s modifications. I’m not sure why power consumption was higher with WiFi off, probably a measurement anomaly due to some other activity going on.

WiFi on:

Image

WiFi off:

Image
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Keeping devices in capture mode will keep them awake, so disabling capture will definitely reduce power usage.

This indicates that KDE ( or Kubuntu's modifications ) probably wakes everything up when it probes everything, while GNOME doesn't do this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]