Software & AppsOperating SystemLinux

How To Set CPU Power Management to Powersave Governor Permanently

Ubuntu 9

In this article, we will guide you through the process of permanently setting your CPU power management to the powersave governor. This is a useful technique for managing your system’s power usage and reducing heat generation.

Quick Answer

To set the CPU power management to the powersave governor permanently, you need to install the cpufrequtils package, modify the configuration file to set the governor to ‘powersave’, and disable the ondemand service. This will keep your CPU frequency at a lower level, reducing power consumption and heat generation.

Introduction to CPU Governors

CPU governors are crucial components of the Linux kernel that manage the frequency of your CPU. They help balance power consumption, heat generation, and computational performance. The ‘powersave’ governor is one of these governors that keeps the CPU running at the minimum frequency, thereby saving power and reducing heat.

Prerequisites

Before we begin, make sure you have administrative or sudo privileges on your system. You will need to install packages and modify system files, which require these permissions.

Step 1: Install cpufrequtils

The cpufrequtils package provides us with utilities to manipulate the CPU frequency. You can install it using the following command:

sudo apt-get install cpufrequtils

In this command, sudo is used to run the command with root privileges. apt-get is the package handling utility in Debian-based systems, and install is the command to install a new package. cpufrequtils is the name of the package we want to install.

Step 2: Modify the cpufrequtils Configuration File

Next, we need to modify the configuration file for cpufrequtils to set the governor to ‘powersave’. The configuration file is located at /etc/default/cpufrequtils.

Open the file in a text editor with root privileges:

sudo nano /etc/default/cpufrequtils

In the file, find the line that starts with GOVERNOR=. Change its value to "powersave" so it looks like this:

GOVERNOR="powersave"

Once you have made the change, save the file and exit the text editor.

Step 3: Disable the ondemand Service

The built-in service that sets the governor to ondemand needs to be disabled. This step is only necessary for Ubuntu 16.04 or later. Use the following command to disable it:

sudo update-rc.d ondemand disable

Or, for Ubuntu 18.04 or later:

sudo systemctl disable ondemand

The update-rc.d and systemctl commands are used to manage services on Debian-based systems. The disable option is used to prevent the service from starting at boot.

Conclusion

After following these steps, your CPU power management should now be permanently set to the powersave governor. This will keep your CPU frequency at a lower level, reducing power consumption and heat generation.

Remember, if you have an overheating processor, you can also limit the maximum possible speed by adding MAX_SPEED="2GHz" (or your desired value) to the /etc/default/cpufrequtils file.

Managing your CPU power settings is a crucial aspect of system administration, and understanding how to do so can help you maintain the health and longevity of your system.

What is the purpose of setting the CPU power management to the powersave governor?

The purpose of setting the CPU power management to the powersave governor is to save power and reduce heat generation. The powersave governor keeps the CPU running at the minimum frequency, which helps balance power consumption, heat generation, and computational performance.

How do I install the cpufrequtils package?

You can install the cpufrequtils package by running the following command in the terminal:

sudo apt-get install cpufrequtils

Make sure you have administrative or sudo privileges on your system before running this command.

How do I modify the cpufrequtils configuration file?

To modify the cpufrequtils configuration file, you can use the following command:

sudo nano /etc/default/cpufrequtils

This will open the file in the nano text editor with root privileges. You can then find the line that starts with GOVERNOR= and change its value to "powersave". Save the file and exit the text editor.

How do I disable the ondemand service?

To disable the ondemand service, you can use one of the following commands depending on your Ubuntu version:For Ubuntu 16.04 or later:

sudo update-rc.d ondemand disable

For Ubuntu 18.04 or later:

sudo systemctl disable ondemand

These commands will prevent the ondemand service from starting at boot.

How can I limit the maximum possible speed of my processor?

If you have an overheating processor, you can limit the maximum possible speed by adding MAX_SPEED="2GHz" (or your desired value) to the /etc/default/cpufrequtils file. This will restrict the processor’s speed to the specified value.

Leave a Comment

Your email address will not be published. Required fields are marked *