The problem
When trying to lower power consumption on my Debian8 laptop I was paying closer attention at powertop and noticed that kicker has too many interrupts. CPU being constantly waked up will not allow the CPU longer stay in deeper C sleep modes. First I cleaned all unnecessary applets like docker and some other. And then remove interrupt events from applets I want to continue to use. In this post I will focus on kima, I tackled with 3 approaches:
- Remove unnecessary sensors, it's handy to have battery charge meter and all aux information, but after all I can have battery readout from kpowersave, My system found many temperature sensors, it's nice to have so many of them, but in practice, I don't know even where they are located and what they are monitoring. Or I don't need them, after upgrading to SSD I don't need to watch HDD temperatures, ended up with 3 important temperatures (CPUs combined, ATI gpu, battery temperature). If my understanding of the source code is correct, each sensor even from same driver will case separate fetch call (in case of sensing frequency on a multi core CPUs will case separate fetch for each core)
- Increase sleep times for each source, for example updating uptime is with 30s intervals, even 120s should be grand. Battery refreshes every 5s (10s should be grand). Acpi thermal is 1s and maybe 5s or 10s should be grand, it doesn't sound as much, multiply it by dozens of sensors for each source and it will add up. Majority of sources have 1s refresh time where probably only cpu frequency is the only from 15 sources which really needs it. Then recompile package
- Remove unnecessary sources completely from the code so you will not be tempted to enable them again. Do you need to have uptime displayed on your laptop desktop environment? I disabled 12 sources, almost all except IbmAcpiThermalSrc, IbmAcpiFanSrc and SysFreqSrc. Added not into authors page to know it's my modified version (in case I will upgrade version of desktop environment, this way it will quickly show me if i'm running my modified version). Recompiled package.
Download
For people who like download binaries from unknown sources here is compiled package and source folder used for this build.
kima-trinity14.0.1pre3-0debian8.0.00amd64.deb
Building own package
This went surprising well. I'm using Debian 8 with Trinity (kde 3.5) as desktop environment. Getting sources and build dependancies ready for compilation:
apt-get source kima-trinitysudo apt-get build-dep kima-trinit
addSources(UptimeSrc::createInstances(this));
aboutData->addCredit("Trimmed custom build");
dpkg-buildpackage -rfakeroot -b -nc -uc -us
sudo dpkg -i kima-trinity_14.0.1~pre3-0debian8.0.0+0_amd64.deb