There are tools, like TLP, Laptop Mode Tools and powertop, available to help reduce power consumption and improves overall Laptop battery life on Linux. Another way to reduce power consumption is to limit the frequency of your CPU. While this is something that has always been doable, it generally requires complicated terminal commands, making it inconvenient for the noobs. But fortunately, there’s a gnome extension that helps you easily set and manage your CPU’s frequency - CPU Power Manager. CPU Power Manager uses the intel_pstate frequency scaling driver (supported by almost every Intel CPU) to control and manage CPU frequency in your GNOME desktop.
Another reason to use this extension is to reduce heating in your system. There are many systems out there which can get uncomfortably hot in normal usage. Limiting your CPU’s frequency could reduce heating. It will also decrease the wear and tear on your CPU and other components.
Install CPU Power Manager On Linux
To install a GNOME extension, first you need to install the GNOME Shell integration browser extension that provides integration with GNOME Shell and the corresponding extensions repository https://extensions.gnome.org. If you are on Google Chrome or Chromium, go to GNOME shell integration extension page and add it your browser.
And then you MUST install native connector for this extension to work.
On Arch Linux, EndeavourOS, Manjaro Linux:
$ sudo pacman -S chrome-gnome-shell
Debian, Ubuntu, Linux Mint, Pop OS:
$ sudo apt install chrome-gnome-shell
$ sudo dnf install chrome-gnome-shell
After installing the GNOME Shell integration browser extension and the native connector, go to the CPU Power Manager extension’s page, and install the extension. To do so, click the "ON" button next to the CPU power manager.
A pop window will appear and prompt if you want to download and install the "CPU Power Manager" extension from gnome extensions page. Click Install button.
Once the extension has installed, you’ll get a CPU icon at the right side of the Gnome top bar. Click the icon, and you get an option to install the extension:
If you click “Attempt Installation”, you’ll get a password prompt. The extension needs root privileges to add policykit rule for controlling CPU frequency. Enter the sudo password and click “Authenticate”, and that finishes installation. The last action adds a policykit file - mko.cpupower.setcpufreq.policy at /usr/share/polkit-1/actions.
After installation is complete, if you click the CPU icon at the top right, you’ll see the CPU power manager actual interface as shown in the below screenshot:
Control And Manage CPU Frequency Using CPU Power Manager In Linux
CPU power manager requires zero configuration. It will automatically adjust the recommended minimum and maximum CPU frequencies for you. You can verify it by unplugging the power source from your Laptop. Once the Laptop is in battery mode, CPU power manager will automatically adjust minimum and maximum frequency levels accordingly to improve the battery performance.
Here is the list of available options in the CPU power manager interface.
- See the current CPU frequency: Obviously, you can use this window to see the frequency that your CPU is running at.
- Set maximum and minimum frequency: With this extension, you can set maximum and minimum frequency limits in terms of percentage of max frequency. Once these limits are set, the CPU will operate only in this range of frequencies.
- Turn Turbo Boost On and Off: This is my favorite feature. Most Intel CPU’s have “Turbo Boost” feature, whereby the one of the cores of the CPU is boosted past the normal maximum frequency for extra performance. While this can make your system more performant, it also increases power consumption a lot. So if you aren’t doing anything intensive, it’s nice to be able to turn off Turbo Boost and save power. In fact, in my case, I have Turbo Boost turned off most of the time.
- Built-in profiles: By default, CPU power manager offers four default profiles namely High Performance, Multimedia, Quiet, Energy Saver. The suitable CPU frequency will be automatically adjusted based on the profile you choose. You can also make profiles with max and min frequency that you can turn on/off easily instead of fiddling with max and frequencies.
- Auto Switch: Once it is enabled, it will automatically choose the profile you set in the Preferences window. See the next section for more details.
You can also customize the extension via the preferences window:
As you can see, you can set whether CPU frequency is to be displayed, and whether to display it in Mhz or Ghz in the "General" section. You can also set default AC and battery profiles here. Remember the "Auto Switch" setting in the CPU power manager main interface? If the Auto Switch setting is enabled, CPU power manager will pick the relevant frequency for the default AC and battery profiles automatically.
In the second section i.e. Profiles, you can adjust minimum and maximum frequencies and set turbo boost for each default profiles. It is also possible to create a new profile and delete the profiles that are no longer needed:
The last section is Installation section. In this section, you can get the path details of cpufreqctl and policy kit rule.
Uninstall CPU power manager
CPU power manager can be directly removed from gnome extensions page or from the "Installation" section in the main interface.
Power management on Linux is not that best compared to Windows and Mac OS, and many people are always looking for an easy way to improve battery performance on their Linux laptop. If you are one of them, check out CPU power manager extension. This is an unconventional method to save power, but it does work. I certainly love this extension, and have been using it for a few months now.
What do you think about this extension? Put your thoughts in the comments below!
Featured image by Pok Rie from Pexels.