Optimizing KDE’s energy profiles
In my last posting, I mentioned that my notebook eats by far more battery when running Linux / KDE than running Windows 7. Even though I identified (and fixed) that this was due to the switchable graphics (both cards were running and sucking power), I was eager to optimize the power consumption. After some research, I came up with the following solution.
I put several energy-savign tweaks into a script, saved it to /usr/local/sbin/powersave.sh and added an entry in sudoers for it because it requires root privileges. I can run the script now with sudo but without having to enter the root password thus allowing the KDE energy manager Powerdevil to run the script automatically. Therefore, I added the following custom call to the Powersave profile in Powerdevil‘s settings:
This makes KDE call the optimizations automatically as soon as the notebook switches to the Powersave profile.
I adapted the optimizations to a max_performance.sh script that reverts all changes done by the powersave script. This script needs an entry in sudoers, too, and should be added to the Performance energy profile.
You find my scripts below. Please note, that you will most probably need to change some things in the scripts to make them fit your notebook, especially if you do not have a hybrid ATI graphics adapter or a CPU with 4 cores.
[UPDATE] Scripts re-uploaded because Pastebin.com lost them [/UPDATE]