One of the changes in KDE 4.8 was KWin’s new composition / effect toggle handling. As a side effect the power management profiles no longer turn off composition and effects when the AC cord is plugged out.
This behaviour may be fixed in the future, in the meantime, below is a simple workaround:
1. Create a shell script something like this:
#!/bin/bash if [[ $1 == "on" ]]; then if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "false" ]] ; then qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing fi elif [[ $1 == "off" ]]; then if [[ "$(qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive)" = "true" ]] ; then qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing fi else echo "Usage: $0 [on|off]" fi
2. Make the script executable (chmod +x) and test it from the command line
3. Go to ‘Energy Saving Settings’ and edit the default ‘On AC Power’ profile. Check ‘Run Script’ and type in:
/full path to your script/script_name on
4. Repeat the same for the “On Battery” profile, but this time pass the argument off
5. Finally test the script by disconnecting the AC power and note that KDE notifies that composition has been suspended. Also running the command:
qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive
Should return ‘false’
Now you can enjoy extended battery life.