/cpufreq

Gnome CPU Frequency Monitor and Governor Manager

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

CPUFREQ - Gnome Power Manager. cpufreq

Project website

https://extensions.gnome.org/extension/1082/cpufreq/

This is a lightweight CPU scaling monitor and powerful CPU management tool. The extension is using standard cpufreq kernel modules to collect information and manage governors. It needs root permission to able changing governors.

Features

  • Compatible with many hardware architectures (x86, x64, arm ...);
  • CPU Frequency monitoring;
  • CPU Governor management;
  • CPU Frequency speed limits;
  • CPU Boost supporting;
  • CPU Power on/off supporting;
  • Saving/Restoring settings;
  • User Profiles;
  • More.

A Few Reasons Why You Should Not Want To Use Single Core For Powersaving mode:

  • Modern OS/kernel works better on multi-core architectures.
  • You need at least 1 core for a foreground application and 1 for the background system services.
  • Linux Kernel is changing CPU cores to avoid overheating, thermal throttle and to balance system loading.
  • Many CPUs have enabled Hyper-Threading (HT) technology. So there is no big sense to run 0.5 physical CPU core.
  • ...

Phoronix Benchmarks

Optional you can install cpufrequtils or cpupower package:

  • Debian/Ubuntu
sudo apt-get install cpufrequtils

or for modern kernels:

sudo apt-get install linux-cpupower
  • Arch Linux
sudo pacman -S cpupower
  • Fedora
yum install kernel-tools

Install

Dependencies

  • Gnome Shell 3.14+;
  • supported cpufreq modules.

Official repository extensions.gnome.org

You should select Install.../Install Updates... in the extension menu after installation/updating to finish the configuration.

Install from GitHub branch (default master)

  1. Run install script
./install.sh

or for info branch to example

./install.sh info
  1. Restart Gnome to reload extensions by:
  • user's Log-out / Log-in (X11/Wayland)
  • Alt+F2 and enter r command (X11 only)
  • or just reboot PC (X11/Wayland)

From source zip archive (manual method)

  1. Download zip archive from GitHub page cpufreq-master.zip.
  2. Extract cpufreq-master.zip archive and copy all to the ~/.local/share/gnome-shell/extensions/cpufreq@konkor folder.
  3. Optionally, check/fix the executing bit:
  • chmod +x ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl
  1. Restart Gnome to reload extensions by:
  • user's Log-out/Log-in (X11/Wayland)
  • Alt+F2 and enter r command (X11 only)
  • or just reboot PC (X11/Wayland)
  1. Enable the cpufreq extension by:

PS: I'd recommend you the installing through the extensions.gnome.org repository and just update files from the GitHub archive. That's how you could avoid a few steps of the manual method.

From source zip archive (gnome-tweak-tool method)

Download zip archive from GitHub page. Run gnome-tweak-tool go to extensions tab, click Install Shell Extension from a drive and select cpufreq-master.zip. Detailed steps below:

wget https://github.com/konkor/cpufreq/archive/master.zip
gnome-tweak-tool # Select 'Install Shell Extension' button on the Extensions Tab.
chmod +x ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl

Now close gnome-tweak-tool and restart gnome-shell Log Out or just enter 'r' command in 'Alt-F2' prompt.

gnome-tweak-tool # Turn on the extension.
cpufreq extension => ⚠ Install...

From git source

git clone https://github.com/konkor/cpufreq
cd cpufreq

mkdir -p ~/.local/share/gnome-shell/extensions/cpufreq@konkor
cp -r * ~/.local/share/gnome-shell/extensions/cpufreq@konkor/
chmod 0755 ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl

The following command requires super user/Administrator/Root access. Using the same Terminal window, run the following command will allow you to change the governors from the Cpufreq applet.

  1. sudo ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl install
  2. You will be prompt to enter your password
  3. Cpufreq applet is now installed and its menu is now displayed in GNOME top toolbar
  4. Done. You have successfully installed Cpufreq.

Optionally, if you need to install Cpufreq for an additional GNOME user(s), but that user(s) do not have super user/Administrator/Root access, here are the steps that will allow that user to change the governors from the Cpufreq applet

  1. Login that additional GNOME user(s)
  2. Run all the same command lines as that section above
  3. Open GNOME Tweak Tools (gnome-tweak-tool). Click on Extensions vertical tab.
  4. Click on the toggle button next to Cpufreq row to turn it ON
  5. Restart GNOME by pressing "Alt+F2' keys. When prompt type in "r" without the quotes. Press "Enter" key. Wait a few seconds for GNOME to refresh.
  6. Cpufreq applet is now installed and its menu is now displayed in GNOME top toolbar
  7. Done. You have successfully installed Cpufreq.

Updating the existing extension from git source

  1. wget https://github.com/konkor/cpufreq/archive/master.zip
  2. Extract cpufreq-master.zip.
  3. Copy/Replace all files in the ~/.local/share/gnome-shell/extensions/cpufreq@konkor folder.
  4. Restart GNOME by pressing "Alt+F2' keys. When prompt type in "r" without the quotes. Press "Enter" key.

You should fix executing bit after installation through the gnome-tweak-tool or git clone to able to run the extension.

chmod +x  ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl

If you want change governors or/and frequencies You have to install it.

sudo ~/.local/share/gnome-shell/extensions/cpufreq@konkor/cpufreqctl install

Complete uninstall and removing of stored settings.

It can be useful if you have saved broken settings values or to clean up previous installation. You can check this values in the dconf-editor at /org/gnome/shell/extensions/cpufreq/

dconf reset -f "/org/gnome/shell/extensions/cpufreq/"
sudo rm /usr/share/polkit-1/actions/konkor.cpufreq.policy
sudo rm /usr/bin/cpufreqctl

If you want reset the extension's values to defaults just run it and restart gnome-shell.

dconf reset -f "/org/gnome/shell/extensions/cpufreq/"

Source and packages

How-to disable Intel pstate driver

(default for Intel Sandy Bridge and Ivy Bridge CPUs on kernel 3.9 and upper) To change back to the ACPI driver, reboot and add to the kernel line intel_pstate=disable Then execute modprobe acpi-cpufreq and you should have the ondemand governor available.

You can make the changes permanent by adding to /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable"

Then update grub.cfg

sudo update-grub

or

sudo grub-mkconfig -o /boot/grub/grub.cfg

Follow the instructions for Arch kernel module loading and add the acpi-cpufreq module.

Troubleshooting

Missing symbols

If you have missing symbols you are, probably, missing some fonts, try to install TTF Freefonts, DejaVu or/and Droid font packages to fix it.