Skip to content

Serverket/cpugov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Governor

CPU Governor

A modern GTK4/libadwaita application for controlling your Linux CPU frequency scaling governor.

License Platform

Features

  • Toggle CPU governors — Switch between performance, powersave, and other available governors with a single click
  • Persistent across reboots — Your chosen governor is saved and automatically restored on boot
  • Real-time monitoring — Live per-core frequency display updated every 2 seconds
  • Secure privilege management — Uses Polkit for authorization, no running the GUI as root
  • Modern GNOME design — Built with GTK4 and libadwaita, supports dark/light themes
  • Multilanguage — English, Spanish, Portuguese, Japanese, Chinese, and Italian

Architecture

CPU Governor follows a secure system service architecture:

graph TD
    User["GTK4 GUI (User context)"] -- "D-Bus System Bus" --> Daemon["cpugov-daemon (System Service)"]
    Daemon -- "Writes/Reads" --> sysfs["CPU scaling governor (/sys)"]
    Daemon -- "Saves/Loads" --> Config["/var/lib/cpugov/config.json"]
    Polkit["Polkit"] -- "Authorizes Methods" --> Daemon
Loading
Component Description
cpugov-daemon A D-Bus system service (runs as root) that manages CPU governors via sysfs
cpugov-gtk A GTK4/libadwaita GUI (runs as user) that communicates with the daemon via D-Bus

Persistence

When you select a governor, the daemon saves your choice to /var/lib/cpugov/config.json. On the next boot, cpugov-daemon.service automatically restores your preferred setting.

Installation

Native Installation (Recommended)

The easiest way to install CPU Governor on Debian-based systems (Debian, Ubuntu, Parrot, etc.) is using the all-in-one .deb package which includes both the GUI and the system daemon:

  1. Download the latest .deb from the Releases page.
  2. Install it using apt:
    sudo apt install ./cpugov_0.3.1-1_all.deb

Uninstallation

Option A: Remove Debian Package (.deb)

To remove the application but keep your configuration settings:

sudo apt remove cpugov

To remove everything, including your configuration settings:

sudo apt purge cpugov

Option B: Remove Manual Installation

If you installed via the script or built from source, run these commands to remove the files:

sudo rm -f /usr/local/bin/cpugov /usr/local/bin/cpugov-gtk /usr/local/bin/cpugov-daemon
sudo rm -rf /usr/local/share/cpugov
sudo rm -f /usr/local/share/applications/io.github.serverket.cpugov.desktop
sudo rm -f /usr/local/share/metainfo/io.github.serverket.cpugov.metainfo.xml
sudo rm -f /usr/local/share/dbus-1/system.d/io.github.serverket.cpugov.conf
sudo rm -f /usr/local/share/polkit-1/actions/io.github.serverket.cpugov.policy
sudo rm -f /usr/local/lib/systemd/system/cpugov-daemon.service

To also remove your configuration settings:

sudo rm -rf /var/lib/cpugov

Development

Prerequisites: Python 3, PyGObject, D-Bus, Polkit, systemd (Daemon), GTK4 & libadwaita (GUI).

Building from Source

# Build and install daemon + GUI locally
meson setup builddir
meson compile -C builddir
sudo meson install -C builddir

# Run the daemon service to test
sudo systemctl start cpugov-daemon

License

GPL-3.0-or-later

Acknowledgments

"Whoever loves discipline loves knowledge, but whoever hates correction is stupid."

About

A modern GTK4/libadwaita application for controlling your Linux CPU frequency scaling governor.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors