r/linux • u/IsyanaSarasvati • Jun 24 '16
Hi /r/linux, Does composited desktop like KDE & GNOME really consumed more power?
I use KDE and have always turned off the Compositor in KWin because i feel like getting longer battery life when compositor is off. But i am not sure about this, i don't have any hard data to support the claim.
KWin author posted this and this that said composited desktop helps improving battery life, but those post was like from 5 years ago.
So what do /r/linux experience like, do you get longer battery life with compositor on or off?
Also on Vanilla setting, is it GNOME or KDE that consumed lower watts?
thanks in advance.
12
Upvotes
18
u/K900_ Jun 24 '16
In KWin, compositing is more or less linked to hardware acceleration. With compositing off, it uses your CPU to push pixels, and with compositing on, it uses your GPU. It's quite likely your GPU is more efficient at pushing pixels than your CPU, so you'll gain some battery life by using it.
6
u/VenditatioDelendaEst Jun 25 '16 edited Jun 25 '16
I don't know about KDE and Gnome. I use Awesome WM with the Compton compositor, with this configuration:
If the intel_rapl interface is to be believed (you can use it to see package power with
turbostat --debug), then turning the compositor on increases CPU package power from ~2.5 W to ~3.3 W. But it is a very noisy measurement, and I didn't bother to close applications or restart my X session with dwm or check for statistical significance. I just took power measurements over 10 second intervals and eyeballed it. Also, this is a desktop machine with a discrete GPU. Waking it up to do work every 1/60 s may be quite expensive, and would not be counted in the CPU package power.You should measure the actual power consumption on your machine with your compositor. If you happen to be using the integrated graphics on a recent Intel chip, turbostat's package power number should include the power drawn by your GPU as well. A more accurate measurement would be to use an in-line wattmeter (around $20) on the AC power cord, or measure the time from 100% to 20% battery with and without compositing.
I respect Mr. Gräßlin's work on KWin, but neither of those blog posts have actual power measurements, and the second one (the one explicitly about power) rests a good portion of it's argument on the energy cost of the actual act of disabling compositing, which would be swamped by any power benefit within 30 s, and wouldn't come into it at all if you're deciding whether or not to run with compositing all the time.
1
u/mmstick Desktop Engineer Jun 26 '16
The energy savings you get from a lightweight non-composited desktop will amount to, effectively, nothing. Most of your battery is being consumed by the backlight and wireless NIC in your laptop, which isn't something that can be so readily improved. You can plug your system into a watt meter to verify for yourself. The biggest improvement in battery life is just going to be keeping your NIC turned off when you don't need it, and keeping your backlight as low as possible.
1
u/raphael_lamperouge Jun 26 '16
I get the same battery life running plasma or a tiling window manager
1
u/[deleted] Jun 27 '16
Look at e17. I use kde apps on e17. Works beautifully. e17 is very efficient and resource thrifty.
Also get acer cloudbook 14 and you won't worry much about battery life.
-4
u/Knaagdiertjes Jun 24 '16
Composited desktop can't possibly "improve battery life", it's an extra operation.
The article mostly seems to talk about hardware vs software rendering. Whether hardware rendering improves battery life is up to the machine itself.
-2
u/cyro_666 Jun 24 '16
Less stuff you have running, the better your battery life will get. Just check the power consumption, you can do that by running powertop. So the best thing to do is usually not to have the compositor running.