Auto-cpufreq
Version: 1.1.1 Web: https://github. com/adnanhodzic/auto-cpufreq
People who run Linux on laptops realise the importance of optimisations that help to manage battery usage and power states. Back in LXF250 we reviewed two Hotpicks that brought a lot of relief to such Linux installations: TLP and Ananicy.
However, we’re always looking for ways to make things even better for our readers, so here is another deserving OSS Hotpick for your laptop: Auto-cpufreq. This is a small set of Bash and Python scripts that enable the ‘performance’ CPU governor when the power cable is plugged in, and switch to ‘powersave’ when the battery is discharging. So far, so not very innovative – TLP works in a similar manner – but Autocpufreq doesn’t stop there. In addition to switching governors, this tool considers more conditions. For instance, Auto-cpufreq monitors CPU load and enables Intel’s Turboboost mode when it’s needed the most. If the load is low (and even if you’re charging), it will set Turboboost to off. The same logic applies to adjusting CPU frequencies.
Auto-cpufreq has some useful command-line options, including some for monitoring, running in-place and working as a Systemd service. The last option is perhaps the best one provided that you fully trust Autocpufreq (and are ready to purge TLP). Install it this way:
$ sudo auto-cpufreq --install
After that, you’ll be able to monitor the service with the following command:
$ auto-cpufreq --log
The service uses the five-second interval for updating the power state. If you stress test your CPU – run some encoders or image filters – Auto-cpufreq will adjust CPU governor, frequencies and Turboboost usage within 10 to 15 seconds. This will help those readers who carry out productivity tasks on their laptops. Autocpufreq saves battery life, but it also ramps up your CPU when you expect it to be fast, even if it costs extra watts.