Power-profiles aware software

My idea is about (one of):

  1. Allow OS to reload library, for example depending on the power profile, to deliver better performance or do not waste power. It could been hard. We cannot made data types differ in different version of library
  2. Allow to create something like fat elf, which contains performance code and environment preserving code. It will listen to power profile daemon and exchange function pointers on power profile switch. It will be simpler than first. We cannot made data types differ, but it is rather simple. It will be more memory hungry.

Why? To made more KDE software environment good. There should been compiler changes. User could select to software should be more powerful or do not drain battery.

Applications can already observe the current power profile via D-Bus. If an application does indeed have two different mechanisms to do its work, powerful or light on battery use, then it can do that.

Most applications and libraries don’t have this though. Why? Because either work needs to be done, or it does not need to be done. If it doesn’t need to be done, it doesn’t need to be done either on battery or on AC power.

The most common battery optimization is to do the same work, except with a lower CPU clock speed. This doesn’t need changes in the program itself, and we do have a global setting for it in the “Power and Battery” applet.

For me, the best battery optimizations are turning down display brightness when possible, and not closing Discord when I don’t need it. Discord could be way more battery friendly, but the company doesn’t care. It’s the same with most battery-draining programs: even if we give developers lots of fancy ways to save battery, they still have to use them. The worst offenders are always the ones that don’t even try. No amount of fancy technology will help if programs like Discord voluntarily waste CPU cycles like there is no tomorrow.