How to Set CPU Power Mode on FunOS

FunOS, like other Ubuntu-based Linux distributions, supports CPU frequency scaling. This feature allows the system to adjust the processor’s operating frequency according to the current workload, helping balance performance and power consumption.

Changing the CPU power mode can be useful when you want maximum performance for demanding tasks or lower power consumption when using a laptop on battery. In this guide, you will learn what CPU power modes are, how to check the available modes, how to switch between them, and how to make your preferred setting persist after a reboot.

What Is CPU Power Mode?

In Linux, a CPU power mode usually refers to the CPU frequency scaling governor. A governor is a kernel-level policy that determines how the processor’s frequency changes in response to system activity.

The governors available on your system depend on your processor, CPU driver, and kernel configuration. Common governors include:

GovernorDescription
performancePrioritizes performance by requesting the highest frequency allowed by the CPU frequency driver.
powersavePrioritizes power efficiency by requesting the lowest frequency allowed by the CPU frequency driver.
ondemandIncreases the CPU frequency when the system is busy and quickly reduces it when the workload decreases.
conservativeWorks similarly to ondemand, but changes the frequency more gradually.
schedutilUses information from the Linux CPU scheduler to adjust the frequency according to the current workload. It is commonly used as the default governor on modern systems.
userspaceAllows a user or program to select a specific CPU frequency manually.

Not every governor will be available on every computer. Always check which governors your system supports before attempting to select one.

How to Set CPU Power Mode on FunOS

Step 1: Open a Terminal

Open a terminal using one of the following methods:

  • Click Menu in the lower-left corner of the screen, then click Terminal.
  • Click the Terminal icon in the Tray.
  • Press Ctrl + Alt + T.

Step 2: Install cpufrequtils

cpufrequtils is a lightweight collection of command-line tools for viewing and managing CPU frequency scaling settings.

First, update the package list:

sudo apt update

Then install cpufrequtils:

sudo apt install cpufrequtils

Step 3: Enable the cpufrequtils Service

Enable the cpufrequtils service so that a configured governor can be applied automatically when the system starts:

sudo systemctl enable cpufrequtils

Step 4: Display the Available Power Modes

Before selecting a governor, check which ones are supported by your system:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Example output:

bustami@komputek:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave performance schedutil

In this example, the processor supports six governors. The available list may be different on your computer.

Step 5: Check the Current Power Mode

To display the governor currently being used by the first logical CPU, run:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Example output:

schedutil

In this example, the current governor is schedutil.

Step 6: Set a Power Mode

To change the governor, use cpufreq-set followed by the governor name. For example, run the following command to select performance:

sudo cpufreq-set -g performance

The change takes effect immediately.

This command changes the current setting, but the selected governor may not remain active after a reboot. Complete the next step to configure it as the persistent setting.

You can replace performance with another governor shown in the list from Step 4. For example, to select powersave, run:

sudo cpufreq-set -g powersave

Step 7: Make the Power Mode Persistent (Optional)

To apply your preferred governor automatically whenever FunOS starts, configure the cpufrequtils service.

Open the configuration file in Mousepad:

sudo mousepad /etc/default/cpufrequtils

Add the following line to select the performance governor:

GOVERNOR="performance"

To use a different governor, replace performance with one of the governors supported by your system.

Save the file and close Mousepad. The cpufrequtils service will apply the configured governor during startup.

How to Return to the Default Power Management Behavior

To stop cpufrequtils from applying a custom governor at startup, disable its service:

sudo systemctl disable cpufrequtils

Then reboot the computer:

sudo reboot

After the reboot, the system should return to the governor selected by its default CPU power management configuration, which is commonly schedutil on modern systems.

Conclusion

CPU frequency scaling allows FunOS to balance processor performance and power consumption. By using cpufrequtils, you can check which governors your processor supports, view the currently active governor, switch to another mode, and optionally apply your preferred setting automatically at startup.

The best governor depends on your hardware and how you use the computer. The performance governor may be useful for demanding workloads, while powersave or the system default may be more suitable when reducing power consumption is a priority.

Leave a Reply

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