VOOZH about

URL: https://ubuntuhandbook.org/index.php/2023/10/command-cpu-power-mode-ubuntu-22-04/

โ‡ฑ


  1. Home/
  2. Howtos/
  3. Single Command to Change CPU Power Mode in Ubuntu 24.04 | 22.04

Single Command to Change CPU Power Mode in Ubuntu 24.04 | 22.04

Last updated: January 28, 2025 โ€” 2 Comments

๐Ÿ‘ Image

This simple tutorial shows how to switch CPU power mode between โ€˜Performanceโ€™, โ€˜Balancedโ€™, and โ€˜Power Saverโ€™ using Linux command in Ubuntu 22.04, Ubuntu 23.10, and Ubuntu 24.04.

GNOME has options in both โ€˜Settingsโ€™ and top-right system status menu to change CPU frequency by switching between โ€˜Performanceโ€™, โ€˜Balancedโ€™, and โ€˜Power Saverโ€™.

Itโ€™s useful for saving battery life while being able to get better performance when gaming or doing heavy work.

๐Ÿ‘ Image

For users who want to bind the options to keyboard shortcuts, or make the function into script or even application, hereโ€™s the single command to switch the power mode.

Single command to change Power Mode in Ubuntu

NOTE: This tutorial is only tested in Ubuntu (GNOME ONLY) with Intel CPU, though it should also work in Fedora workstation and Debian 12 with GNOME desktop.

The power mode setting option is handled by the power-profiles-daemon. It has a command line tool powerprofilesctl to check current and switch power profile.

To switch power mode to โ€˜power-saverโ€™ for example, just press Ctrl+Alt+T on keyboard to open terminal and run command:

powerprofilesctl set power-saver

In command, replace power-saver with balanced or performance as you want.

After making change, verify by running command:

powerprofilesctl

In the output, the one with an asterisk โ€˜*โ€™ in the beginning is the power profile currently in use.

๐Ÿ‘ Image

For those who want to do the job through D-Bus interface, run the single command below instead:

gdbus call --system --dest net.hadess.PowerProfiles --object-path /net/hadess/PowerProfiles --method org.freedesktop.DBus.Properties.Set 'net.hadess.PowerProfiles' 'ActiveProfile' "<'power-saver'>"

Also, change power-saver in command with balanced or performance as need.

๐Ÿ‘ Image

View CPU Speed / frequency in Real Time

As mentioned, you can verify CPU power mode by simply running powerprofilesctl command.

For choice, you may also see CPU frequency (aka clock speed) in real-time by running command in terminal:

watch -n 1 "grep \"^[c]pu MHz\" /proc/cpuinfo"

It will show you the speed for all CPU cores, and update every 1 second. As you want, you may replace number 1 in seconds (e.g., 2 for 2 s, or 0.5 for 500 ms).

๐Ÿ‘ Image

Enable this blog? Please spread the world :)

Ji m

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

2 responses to Single Command to Change CPU Power Mode in Ubuntu 24.04 | 22.04

  1. Thank, helped very a lot searched for this command 2-3 hours.

Leave a Reply Cancel reply

ยฉ 2026 UbuntuHandbook โ€” Privacy Policy โ€” Standard by 8BIT
We use cookies to ensure you get the best experience on our website.