{"id":13562912,"url":"https://github.com/vagnum08/cpupower-gui","last_synced_at":"2025-04-04T22:05:07.533Z","repository":{"id":41506640,"uuid":"91719290","full_name":"vagnum08/cpupower-gui","owner":"vagnum08","description":"cpupower-gui is a graphical program that is used to change the scaling frequency limits of the cpu, similar to cpupower.","archived":false,"fork":false,"pushed_at":"2023-08-11T13:34:27.000Z","size":3947,"stargazers_count":508,"open_issues_count":32,"forks_count":33,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T21:07:08.838Z","etag":null,"topics":["gnome","gtk3","gui","linux","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vagnum08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T17:15:39.000Z","updated_at":"2025-03-21T10:21:21.000Z","dependencies_parsed_at":"2024-08-01T13:18:49.036Z","dependency_job_id":"9eab6a10-59f4-448b-acad-708ef3a7095f","html_url":"https://github.com/vagnum08/cpupower-gui","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagnum08%2Fcpupower-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagnum08%2Fcpupower-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagnum08%2Fcpupower-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagnum08%2Fcpupower-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vagnum08","download_url":"https://codeload.github.com/vagnum08/cpupower-gui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256110,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gnome","gtk3","gui","linux","python3"],"created_at":"2024-08-01T13:01:13.323Z","updated_at":"2025-04-04T22:05:07.519Z","avatar_url":"https://github.com/vagnum08.png","language":"Python","funding_links":[],"categories":["HarmonyOS","Applications"],"sub_categories":["Windows Manager","Utilities"],"readme":"cpupower-gui\n--------------------\nThis program is designed to allow you to change the frequency limits of your cpu and its governor. The application is similar in functionality to `cpupower`.\n\n[![GitHub release](https://img.shields.io/github/release/vagnum08/cpupower-gui.svg)](https://GitHub.com/vagnum08/cpupower-gui/releases/)\n[![latest packaged version(s)](https://repology.org/badge/latest-versions/cpupower-gui.svg)](https://repology.org/project/cpupower-gui/versions)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/vagnum08/cpupower-gui/blob/master/COPYING)\n[![GitHub repo size]( https://img.shields.io/github/repo-size/vagnum08/cpupower-gui.svg)](https://github.com/vagnum08/cpupower-gui/archive/master.zip)\n[![Github all releases](https://img.shields.io/github/downloads/vagnum08/cpupower-gui/total.svg)](https://GitHub.com/vagnum08/cpupower-gui/releases/)\n\n# Screenshots\n\nIf Intel P-state driver is used and the energy preferences are available a drop-down will be available.\n\u003cimg src=\"screenshots/desktop.png\" alt=\"Desktop window\" width=\"500\"/\u003e\n\n`cpupower-gui` is also mobile friendly and will adapt the interface based on the window size.\nBelow is an example from [pinephone](https://www.pine64.org/pinephone/) with phosh running on [mobian](https://mobian-project.org/).\n\u003cimg src=\"screenshots/mobile.png\" alt=\"mobile view\" width=\"844\"/\u003e\n\n# Table of Contents\n1. [Packages](#packages)\n2. [Usage](#usage)\n    - [Graphical](#graphical)\n    - [Console](#command-Line)\n3. [Configuration](#system-configuration)\n4. [Manual Installation](#manual-installation)\n\n# Packages\nCpupower-gui is available on the official repositories for a few distributions.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/cpupower-gui.svg)](https://repology.org/metapackage/cpupower-gui/versions)\n\n\n## Repositories:\n\n### Arch Linux and derivatives\nPackages exist in AUR as [`cpupower-gui`](https://aur.archlinux.org/packages/cpupower-gui/) ([`cpupower-gui-git`](https://aur.archlinux.org/packages/cpupower-gui-git/)), built from this repo.\n\n### blackPanther OS\nTo install `cpupower-gui` run `updating repos` to update the repositories and install by running `installing cpupower-gui`.\n\n### Debian/Ubuntu and derivatives\nYou can install `cpupower-gui` from the software manager or from the terminal by running:\n```bash\nsudo apt install cpupower-gui\n```\nHowever, the version on Debian/Ubuntu repositories is way out of date. \n\nYou can get the debian package of the latest version from the github releases page.\n\n### Fedora/OpenSUSE\nYou can install `cpupower-gui` by adding the repository from [openSUSE Build Service](https://software.opensuse.org//download.html?project=multimedia%3Aproaudio\u0026package=cpupower-gui).\n\nFor example, in Fedora 38 run the following as root:\n```bash\ndnf config-manager --add-repo https://download.opensuse.org/repositories/multimedia:proaudio/Fedora_38/multimedia:proaudio.repo\ndnf install cpupower-gui\n```\nFor OpenSUSE Tumbleweed:\n```bash\nzypper addrepo https://download.opensuse.org/repositories/multimedia:proaudio/openSUSE_Tumbleweed/multimedia:proaudio.repo\nzypper refresh\nzypper install cpupower-gui\n```\nNote: The package repository is located at https://build.opensuse.org/package/show/multimedia:proaudio/cpupower-gui and the binaries for Fedora and Suse are built from the latest git revision of `cpupower-gui`.\n\n### OpenMandriva\nYou can install `cpupower-gui` from the official repository.\n```bash\ndnf install cpupower-gui\n```\n\n\n# Usage\n## Graphical\n\nTo change the frequency settings, select the CPU from the drop-down menu, adjust the sliders and click `Apply`.\nAdditionally, the cpu governor can be changed by selecting a governor from the drop-down menu.\nLast, to apply the same settings to all CPUs, toggle the `All CPUs` switch (square icon on the top left).\n\nThere are two governor profiles available, `Performance` and `Balanced`.\nThe performance profile sets the governor for all CPUs to `performance`.\nSimilarly, the balanced profile set the governor to either `powersave` (if available) or to a scalling governor such as `ondemand` or `schedutil`.\n\nThese profiles can be selected either from the desktop icon or the tray icon actions.\n\nThere is an option to enable or disable a specific cpu.\nThis can be controlled via the the `Online` checkbox next to the `CPU` drop-down menu.\nInitially, the checkbox displays the state of the cpu, i.e. if it is online or offline.\n\nNote: If this checkbox is greyed-out, it means that this cpu is not allowed to go offline.\n\n## Command-line\n\nThe governor profiles can be used from the command line.\nThe CPU settings can be applied from the command line using the appropriate subcommands.\nThese commands are: `config`, `frequency`, `energy` (system dependent), `profile`, `online/offline`.\nSorter aliases are indicated in square brackets in the help menu.\n\n```bash\n$ cpupower-gui -h\nusage: cpupower-gui [-h] [--version] [-b] [-p] [--gapplication-service]\n                    {[co]nfig, [freq]uency, [ene]rgy, [pr]ofile, [off]line,\n                    [on]line} ...\n\ncpupower-gui - Set the scaling frequencies and governor of a CPU\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --version             show program's version number and exit\n  -b, --balanced        Change governor to balanced\n  -p, --performance     Change governor to performance\n  --gapplication-service\n                        Start gui from gapplication\n\nsubcommands:\n  Configuration commands\n\n  {[co]nfig, [freq]uency, [ene]rgy, [pr]ofile, [off]line, [on]line}\n                        Change the settings from the command line\n\n```\n\nFor example to switch all governors to performance run `cpupower-gui -p`.\nAlternatively, the application actions can be executed via `gapplication`.\n\n```bash\n# Switch to balanced profile\ngapplication action org.rnd2.cpupower_gui Balanced\n\n# Switch to performance profile\ngapplication action org.rnd2.cpupower_gui Performance\n\n```\n\nThe `config` subcommand apply the default configuration as defined in the configuration files.\n\n```bash\n$ cpupower-gui co -h\nusage: cpupower-gui config [-h]\n\npositional arguments:\n  apply       Apply cpupower configuration\n\noptional arguments:\n  -h, --help  show this help message and exit\n\n$ cpupower-gui config\n\nApplying configuration...\nSetting CPU: 0\n    Minimum Frequency: 400.0 MHz, Maximum Frequency: 2300.0 MHz\n    Governor: Powersave, Online: True\n\nSetting CPU: 1\n    Minimum Frequency: 400.0 MHz, Maximum Frequency: 2300.0 MHz\n    Governor: Powersave, Online: True\n\nSetting CPU: 2\n    Minimum Frequency: 400.0 MHz, Maximum Frequency: 2300.0 MHz\n    Governor: Powersave, Online: True\n\nSetting CPU: 3\n    Minimum Frequency: 400.0 MHz, Maximum Frequency: 2300.0 MHz\n    Governor: Powersave, Online: True\n\n```\nThe `frequency` subcommand can be used to query or set the minimum and maximum frequencies of one or more CPUs.\n\n```\n$ cpupower-gui freq -h\n\nusage: cpupower-gui frequency [-h] [--max MAX] [--min MIN] [LIST OF CPUS]\n\npositional arguments:\n  LIST OF CPUS  set CPUs frequency\n\noptional arguments:\n  -h, --help    show this help message and exit\n  --max MAX     maximum frequency\n  --min MIN     minimum frequency\n\n$ cpupower-gui freq\n\nCPU0:\n\tFreqs (MHz): (400.0, 2300.0), Limits: (400.0, 2300.0)\nCPU1:\n\tFreqs (MHz): (400.0, 2300.0), Limits: (400.0, 2300.0)\nCPU2:\n\tFreqs (MHz): (400.0, 2300.0), Limits: (400.0, 2300.0)\nCPU3:\n\tFreqs (MHz): (400.0, 2300.0), Limits: (400.0, 2300.0)\n\n$ cpupower-gui freq --min 600 --max 1200 1-3\n\nSetting CPU1 frequency...\nOK\nOK\nCPU1:\n\tFreqs (MHz): (600.0, 1200.0), Limits: (400.0, 2300.0)\nSetting CPU2 frequency...\nOK\nOK\nCPU2:\n\tFreqs (MHz): (600.0, 1200.0), Limits: (400.0, 2300.0)\nSetting CPU3 frequency...\nOK\nOK\nCPU3:\n\tFreqs (MHz): (400.0, 2300.0), Limits: (400.0, 2300.0)\n\n$ cpupower-gui freq --max 12000 1\n\nSetting CPU1 frequency...\nFrequency out of range: 400.0 \u003c freq \u003c 2300.0\nCPU1:\n\tFreqs (MHz): (600.0, 1200.0), Limits: (400.0, 2300.0)\n```\n\nThe `profile` subcommand applies the configuration based on the user-defined profiles.\n```bash\n$ cpupower-gui pr -h\n\nusage: cpupower-gui profile [-h] [-l] [PROFILE]\n\npositional arguments:\n  PROFILE     Apply a cpupower profile\n\noptional arguments:\n  -h, --help  show this help message and exit\n  -l, --list  List available cpupower profiles\n\n$ cpupower-gui pr # Running profile without arguments is equivalent to `-l`\n\nThe available profiles are:\n\t- Balanced\n\t- Custom\n\t- Performance\n\n```\nThe `online` and `offline` subcommands set the specified CPUs on or off.\n\n```bash\n$ cpupower-gui on -h\n\nusage: cpupower-gui online [-h] [-l] [LIST OF CPUS]\n\npositional arguments:\n  LIST OF CPUS  Set CPUs online\n\noptional arguments:\n  -h, --help    show this help message and exit\n  -l, --list    List online CPUs\n\n$ cpupower-gui on\nThe following CPUs are online: [0, 1, 2, 3]\n\n$ cpupower-gui off 3\nSetting CPU3 offline...\nOK\n\n$ cpupower-gui off\nThe following CPUs are online: [3]\n```\n\nThe `energy` subcommand is only available on Intel systems and it can be used to query or set the energy performance preferences.\n```bash\n$ cpupower-gui energy -h\n\nusage: cpupower-gui energy [-h]\n                           [--pref {default,performance,balance_performance,balance_power,power} | --list-energy-preferences [LIST OF CPUS]]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --pref {default,performance,balance_performance,balance_power,power}\n                        set a global energy profile\n  --list-energy-preferences [LIST OF CPUS]\n                        list available energy performance preferences\n                        (Default: all cpus)\n```\nHere is an example of setting the preference to `default`.\n```bash\n$ cpupower-gui ene --pref default\n\nSetting energy performance preference to: default\nSet CPU 0 to default\nSet CPU 1 to default\nSet CPU 2 to default\n```\n\n### Profiles and configuration\nSince version `0.9.0` the command line supports setting the CPUs based on a configuration file and setting user-defined profiles.\n\nTo apply the default configuration just run `cpupower-gui config`.\nTo apply a profile run `cpupower-gui profile Performance`.\nIf the name of the profile contains spaces use quotes, e.g. `cpupower-gui profile \"Custom profile\"`.\n\n### Intel P-State energy performance preferences\nThe last two options (`energy-performance-preference`, `list-energy-preferences`) are only available\non Intel systems that use the `intel_pstate` driver.\n\nThe `cpupower-gui energy --pref` option changes the preference to one of the available preferences for all CPUs.\n\n\nThe `list-energy-preferences` option accepts a list of CPUs written in the following format.\nComma separated values for listing CPU and hyphen for specifying a range.\nFor example `0-3` and `0,2-5,8` become `0,1,2,3` and `0,2,3,4,5,8` respectively.\n\nIf no value is passed it will report the preferences for all available cpus.\nThe current preference is indicated inside the parentheses.\n\n```\n$ cpupower-gui ene --list-energy-preferences 0-3\nThe available energy performance preferences are:\nCPU 0:\n\t- default\n\t- performance\n\t- balance_performance (Current)\n\t- balance_power\n\t- power\nCPU 1:\n\t- default\n\t- performance\n\t- balance_performance (Current)\n\t- balance_power\n\t- power\nCPU 2:\n\t- default\n\t- performance\n\t- balance_performance (Current)\n\t- balance_power\n\t- power\nCPU 3:\n\t- default\n\t- performance\n\t- balance_performance (Current)\n\t- balance_power\n\t- power\n```\n\n\n# System configuration and User profiles\n## System configuration\n\nSince version `0.9.0`, `cpupower-gui` can be configured using configuration files. The system configuration file is located in `/etc/cpupower_gui.conf`.\nUsers can add `.conf` files in `/etc/cpupower_gui.d` to override the default behaviour. The settings in these files override the behaviour of `cpupower-gui` system-wide.\n\nAlternatively, users can add their configuration in `~/.config/cpupower_gui/`. The settings defined in that location take precedence over the ones defined in `/etc/`.\n\nCurrently, the only available settings are:\n- `profile` under the `Profile` section,\n\nand under the `GUI` section,\n- `allcpus_default`\n- `tick_marks_enabled`\n- `frequency_ticks`\n- `energy_pref_per_cpu`\n\nSpecifically,\n\n- `profile` option sets the name of the profile to use when using `--apply-config` option (Default: Balanced).\n - `allcpus_default` option controls the default state of the `To All CPUs` toggle of the GUI (Default: False).\n- `tick_marks_enabled` option controls if tick marks should be displayed on the sliders (Default: True).\n- `frequency_ticks` option controls if frequency is displayed above the tick marks (Default: True).\n- `energy_pref_per_cpu` option allows you to select different energy profiles per CPU (Default: False).\n\n\n## User profiles\n\nUser profiles are text files with a `.profile` suffix. These files should be placed either in `/etc/cpupower_gui.d/` or `~/.config/cpupower_gui/`.\nProfiles placed in `/etc/cpupower_gui.d/` are then available to all users.\n\nAn [example profile](data/cpupower_gui.d/my_profile.profile.ex) is available at `/etc/cpupower_gui.d/my_profile.profile.ex`.\nFor more information about the profile format see [here](data/cpupower_gui.d/README).\n\nBy default, there are two auto-generated profiles named `Balanced` and `Performance`.\n\n\n## systemd units\n\nSince version 0.9.0, two systemd units have been added; a \"system\" and a \"user\" one.\n\nThe `cpupower-gui.service` applies the configuration as defined in `/etc/cpupower_gui.conf` during boot.\nThe `cpupower-gui-user.service` applies the user configuration during login (see notes below).\n\nIn a single-user environment the system service is preferable.\n\nIn a multi-user environment, the user service gives each user the ability to customise the profiles based on their needs.\nWhen the user logs into the system, their settings will automatically apply.\n\nNotes:\n- The `cpupower-gui-user.service` currently depends on `graphical.target`. This is tested and works with Gnome Shell. If it doesn't work on a different display manager, open an issue.\n- To apply the settings during login the user must be active and local to the system. This means that the user must have access to the hardware, so it won't work when the user logs in through `ssh`.\n- To apply the settings over `ssh` the user will need root access.\n\n## Enabling extra governors\nBy default, `cpupower-gui` will only show the available governors for each cpu.\nTo enable additional governors, such as `conservative` or `userspace`, copy the `scaling-governors.conf` file over to `/etc/modules-load.d`.\nThis way the new governors will be available across reboots.\n\n\n# Manual Installation\nThis package uses the [Meson build system](https://mesonbuild.com/) for build configuration and [Ninja](https://ninja-build.org/) as the backend build system.\n\n## Clone the repository\n\n```bash\ngit clone https://github.com/vagnum08/cpupower-gui.git\ncd cpupower-gui\n```\n\n## Install build dependencies\nThe main build dependencies are `meson (\u003e=0.50.0)`, `ninja`, `glib2.0`, and `pkg-config`.\n\nTo install them,\n\n- On Arch and derivatives: `pacman -Sy pkg-config meson`\n- On blackPanther OS and derivatives: (TBD)\n- On Debian and derivatives: `apt update \u0026\u0026 apt install  meson ninja-build pkg-config libglib2.0-bin libglib2.0-dev`\n- On Fedora: `dnf install meson gettext pkg-config glib2-devel`\n- On openSUSE Tumbleweed: `zypper install meson gettext-tools`\n\nOptionally (for meson check) the following programs are needed:  `desktop-file-validate`, `appstream-util`, `glib-compile-schemas`.\n\nTo install them,\n\n- On Arch and derivatives: `pacman -Sy desktop-file-utils appstream-glib`\n- On blackPanther OS and derivatives: (TBD)\n- On Debian and derivatives: `apt update \u0026\u0026 apt install appstream-util desktop-file-utils`\n- On openSUSE Tumbleweed: `zypper install glib2-devel`\n\n## Build cpupower-gui\n```bash\nmeson build --prefix /usr -Dsystemddir=\u003cpath-to-systemd-dir\u003e -Dpkla=\u003ctrue|false\u003e -Duse_libexec=\u003ctrue|false\u003e\nninja -C build\n```\n\n### Meson options\n\n#### `-Dsystemddir`\n\nThe `systemddir` option should point to the systemd directory.\nIf this option is not set the default is used (i.e. `/usr/lib/systemd`).\n\n- The default value is valid for Arch/Fedora/OpenSUSE and derivatives.\n- For Debian and Ubuntu based systems you should use `-Dsystemddir=/lib/systemd`.\n##### `-Dpkla`\nSince version **`0.9.0`** an additional option (**`-Dpkla`**) has been added for PolicyKit rules.\nThis option is set to **`false`** by default.\n\nWhen `pkla` is set to `false` a polkit `.rules` file is installed under `/usr/share/polkit-1/rules.d/`.\nWhen `pkla` is set to `true` a `.pkla` file is installed under `/var/lib/polkit-1/localauthority/10-vendor.d/`.\n\n- The default value works Arch/Fedora/NixOS/OpenSUSE and derivatives.\n- For Debian and Ubuntu based systems you should use `-Dpkla=true`\n\n##### `-Duse_libexec`\nSince version **`1.0.0`** an additional option (**`-Duse_libexec`**) has been added.\nThis option is set to **`false`** by default.\n\nWhen `use_libexec` is set to `false` the helper program is installed under `/usr/lib/`.\nWhen `use_libexec` is set to `true` the helper program is installed under `/usr/libexec/`.\n\n- The default value works Arch/Fedora/NixOS/OpenSUSE and derivatives.\n- For Debian and Ubuntu based systems you should use `-Duse_libexec=true`\n\n## Install\nTo install run `ninja -C build install`\n\n## Uninstall\n\nTo uninstall run `ninja -C build uninstall`.\n\n# Runtime Dependencies\n### Note:\nSince version 0.7.1, Python GObject version must be \u003e= 3.30\n\n## Arch Linux and derivatives\n`python` `gtk3` `hicolor-icon-theme` `polkit` `python-dbus` `python-gobject` `libappindicator-gtk3` `python-pyxdg` `libhandy`\n\n## blackPanther OS and derivatives\n`python3`, `gtk3`, `hicolor-icon-theme`, `polkit`, `python3-dbus`, `python3-gobject3` `gir1.2-handy-1` `xdg`\n\n## Debian and derivatives\n`libgtk-3-0` `gir1.2-gtk-3.0` `hicolor-icon-theme` `policykit-1` `python3-dbus` `python3-gi` `python3-xdg` `gir1.2-handy-1`\n\nSuggested for authentication dialogue: `policykit-1-gnome` or `mate-polkit` or `lxpolkit`\n\nFor the tray icon `gir1.2-appindicator3-0.1`.\n\n## Fedora and openSUSE\n### Fedora only\n`gtk3` `python3-dbus` `python3-gobject` `libhandy-1`\n\n### openSUSE only\n`libgtk-3-0` `typelib-1_0-Gtk-3_0` `python3-gobject` `python3-gobject-Gdk` `python3-dbus-python` `typelib-1_0-Handy-1`\n\n## Common\n `hicolor-icon-theme` `python3-pyxdg`\n\nA polkit agent such as `mate-polkit`, `polkit-kde-agent-5`, `policykit-1-gnome`, etc.\nFor reading/writing configuration from/to user's home directory: [`xdg`](https://repology.org/project/python:pyxdg/versions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvagnum08%2Fcpupower-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvagnum08%2Fcpupower-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvagnum08%2Fcpupower-gui/lists"}