How can I make my linux system (ubuntu) automatically choose the performance governor when it works with ac and switch automatically to ondemand when it is on battery (and vice versa)?
Is it also possible to switch to the lowest CPU frequency if the battery state drops below a certain value?
I am looking for a solution which is independent of the used desktop environment.
The solution may interfer with another cpu scaling mechanism installed in ubuntu by default. For example there is a file
/etc/init.d/ondemand which sets the CPU to ondemand...
Are there other pitfalls like this one?