I understand from this question that Ubuntu is now using "Intel P-State", and that as a result, there are only two governor options: performance, and powersave.
But is it possible to automatically switch to powersave when on battery, and performance when a charger is connected? I'm surprised that this functionality isn't already implemented by default.