Coder Social home page Coder Social logo

deinstapel / cpupower Goto Github PK

View Code? Open in Web Editor NEW
524.0 19.0 68.0 991 KB

Manage the frequency scaling driver of your CPU (Intel Core and AMD Ryzen processors supported)

License: GNU General Public License v3.0

JavaScript 68.83% Shell 29.66% Makefile 1.52%
gnome intel-pstate-driver gnome-shell gnome-extension gnome-shell-extension intel-pstate cpu-frequency-scaling cpufreq amd-ryzen

cpupower's Introduction

CPU Power Manager for Gnome Shell

Screenshot
latest build release build Lastest release Gnome 42 License PRs Welcome
Gnome-Shell Extension for controlling the frequency setting of your CPU

PrerequisitesInstallationTranslatingPackagingDeveloping

Prerequisites

You need to have a CPU which is supported by the cpufreq or intel_pstate CPU frequency scaling driver of the Linux kernel. This applies for most modern CPU's. Furthermore, the following software needs to be installed to use this extension:

  • Gnome (since it's an extension)
  • Policykit (ships default with gnome)
  • For Intel Core CPU's intel_pstate needs to be enabled in the Linux kernel (should be the default in almost all Distros)
  • For AMD Ryzen CPU's no further requirements are needed
  • A POSIX compatible shell

Installation

Installing this extension can either be done via distribution packages provided by us (recommended) or via the Gnome extensions website (often outdated). Have a look at the options below to find the correct installation method for your system.

Info: The $ at the beginning of a line means that this line should be run as the user who is using the extension (most likely you). If you don't know what that means, just open up a terminal and use it as is. Commands are run as your user by default. So for the line $ echo Hello world you would type echo Hello world into your terminal and hit enter.

Info: The # at the beginning of a line means that this line must be run with root privileges (the name of the administrator account on Linux systems). So for the line # dnf update you would then e.g. run sudo dnf update in your terminal if your system uses sudo. Your system is most likely using sudo and if not you would know it.


click to expand

Any newer Ubuntu release or Ubuntu based distribution. If unsure do this!

To install the extension on any newer Ubuntu based system (e.g. PopOS) run the below commands.

WARNING: This will not work for ElementaryOS, Linux Mint, and any other Ubuntu which is not using the GNOME desktop environment. Running the below commands will likely break your system otherwise!

Info: It is safe to install this extension if only a single package is installed by the below apt-get install command. If more packages are to be installed, please stop doing so and if unsure create an issue asking for help!

$ sudo add-apt-repository ppa:fin1ger/cpupower
$ sudo apt-get update
$ sudo apt-get install gnome-shell-extension-cpupower

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-extensions enable [email protected]

The extension should now be enabled and ready to use!


click to expand

Ubuntu 18.04 (Bionic Beaver)

To install this extension on Ubuntu Bionic Beaver please run the following commands:

$ sudo add-apt-repository ppa:fin1ger/cpupower
$ sudo apt-get update
$ sudo apt-get install gnome-shell-extension-cpupower

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-shell-extension-tool -e [email protected]

The extension should now be enabled and ready to use!


click to expand

Debian or debian based distributions

To install the extension on any newer Debian based system run the below commands.

WARNING: This will not work when using any desktop environment other than GNOME. Running the below commands while using other desktop environments will likely break your system!

Info: It is safe to install this extension if only a single package is installed by the below apt-get install command. If more packages are to be installed, please stop doing so and if unsure create an issue asking for help!

# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D76A018A2B4E77F5
# add-apt-repository 'deb http://ppa.launchpad.net/fin1ger/cpupower/ubuntu hirsute main'
# apt-get update
# apt-get install gnome-shell-extension-cpupower

Note: Debian is not using sudo by default. If you do not have sudo, get a root shell by typing su in a terminal and entering your superuser password.

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-extensions enable [email protected]

The extension should now be enabled and ready to use!


click to expand

Fedora / CentOS / Mageia / OpenMandriva

To install this extension on most RPM based Linux distributions run the below commands.

WARNING: This will not work when using any desktop environment other than GNOME. Running the below commands while using other desktop environments will likely break your system!

Info: It is safe to install this extension if only a single package is installed by the below dnf install command. If more packages are to be installed, please stop doing so and if unsure create an issue asking for help!

# dnf copr enable fin-ger/cpupower
# dnf install gnome-shell-extension-cpupower

You need to have the package dnf-plugins-core installed. If the above commands are failing try installing them with dnf install dnf-plugins-core and rerun the above commands.

Caution: Due to a name change required by the Fedora admins of my Fedora account, the name of the copr also changed. fin_ger/cpupower has changed to fin-ger/cpupower.

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-extensions enable [email protected]

The extension should now be enabled and ready to use!


click to expand

OpenSUSE

Download the appropriate .repo file for your OpenSUSE release (most likely the latest version) and save it to /etc/zypp/repos.d/. Now run the following commands:

# zypper install gnome-shell-extension-cpupower

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-extensions enable [email protected]

The extension should now be enabled and ready to use!


click to expand

Install via the Gnome extension website (probably outdated)

Open the cpupower Gnome extensions website in your default webbrowser. Click on the blue slider to install the extension.

After installation, click on the CPU icon in the top bar of your Gnome shell and follow the instructions. You need to enter your root password to install a policy kit rule. This rule is used to set the clock frequency of your CPU.

You are now ready to use this extension!


click to expand

Your distribution is not listed?

Fear not! We have other options for installing this extension. Although, you will not receive automatic updates which might be dangerous if we encounter security issues in the extension and you miss the fix for that issue. If you regularly check for updates yourself you can of course still use this extension without any risk.

If your distribution is capable of installing DEB or RPM packages, have a look at the releases page of this repository for downloadable pre-built packages.

Another option is to install the extension zip file manually. To do so, download the latest zip from the release page. Now run the following commands:

$ gnome-extensions install /path/to/cpupower.zip

Now log out and back in again. Yes, this is really necessary thanks to Gnome. After logging back in, enable the extension with:

$ gnome-extensions enable [email protected]

After enabling, click on the CPU icon in the top bar of your Gnome shell and follow the instructions. You need to enter your root password to install a policy kit rule. This rule is used to set the clock frequency of your CPU.

You are now ready to use this extension!


You are a developer or sysadmin and are looking for ways to install this extension directly from the git repository? Read on! The section below will explain in detail how to do so.

Additional for prerequisites for Installation via Makefile

In order to use the Makefile you need the following packages:

  • make
  • gettext
  • glib2 tools
  • zip and unzip
  • tar

Installing for another (admin) user

Impersonate the (admin) user, clone the git repository, and run the following command:

Note: Cloning and installing the extension while impersonating the other user, enables this user to install updates for this extension from extensions.gnome.org.

$ sudo -u username bash
$ cd /tmp
$ git clone https://github.com/deinstapel/cpupower.git
$ cd cpupower
$ make install PREFIX=/home/username/.local

Restart the gnome-shell (log out and back in) to make the extension available.

The user can enable the extension in his settings and install the polkit rule and cpufreqctl tool by using the included installation guide.

Uninstalling

The user can uninstall the tools in the settings of this extension. The extension itself can be removed from withing the extension settings or with this command:

$ make uninstall PREFIX=/home/username/.local

Installing for another (non-admin) user

Impersonate the (non-admin) user, clone the git repository, and run the following command:

Note: Cloning and installing the extension while impersonating the other user, enables this user to install updates for this extension from extensions.gnome.org. However, the tool must be updated and installed by an administrator. The extension may stop working after the user installed an update and may need updating of the tool by an administrator.

$ sudo -u username bash
$ cd /tmp
$ git clone https://github.com/deinstapel/cpupower.git
$ cd cpupower
$ make install PREFIX=/home/username/.local

And with an admin user run the following commands:

$ sudo make install-tool TOOL_SUFFIX=username

Note: Also, use this command to update the tool for another user in an outdated installation.

Note: Using another PREFIX than /usr in this setup might include security risks and may not work.

Restart the gnome-shell (log out and back in) to make the extension available.

The extension will work out-of-the-box for this user only!

Uninstalling

$ sudo make uninstall PREFIX=/home/username/.local
$ sudo make uninstall-tool TOOL_SUFFIX=username

Installing for all users

Clone the git repository and run the following command:

$ sudo make install install-tool

This will install the extensions, polkit rule, and the tool for all users on the system.

Uninstalling

Run the following command to uninstall:

$ sudo make uninstall uninstall-tool

Translating

cpupower now uses crowdin for translation. You are free to choose from manually translating this extension with tools like Poedit or using the online service of crowdin.

Translating with crowdin

First visit the project page of cpupower on crowdin and select the language you would like to translate to. Now, click on Translate All and you're good to go.

Manual translation method

In order to translate this extension with Poedit you first need to install it. You may use your distributions package manager for installation.

When finished, fork this project and clone like described in the linked guide.

Creating a new translation

Open Poedit and select File / New From POT/PO File... and select cpupower/locale/template.pot. Select the language you want to translate to. Now start translating.

Edit or update an existing translation

Open Poedit and select Open. Navigate to the cpupower/locale folder and select the language file (.po) you want to edit/update. Now select Catalog / Update from POT File... and select cpupower/locale/template.pot. Now, you can start updating the translation.

Saving your work

When finished save the file into the locale folder and push your changes to your fork. Now, you can create a pull request to make your translation available in the main cpupower installation.

Packaging

You are a package maintainer and looking into packaging this extension? Great! Below is a short summary of how to properly install this extension (run as root):

# make install install-tool PREFIX=/usr

This will install a polkit rule to /usr/share/polkit-1/actions/mko.cpupower.setcpufreq.policy and an executable bash script to /usr/bin/cpufreqctl. The extension is installed to /usr/share/gnome-shell/extensions/[email protected]. It still includes the scripts folder, the policykit rule template in data/mko.cpupower.policy.in, a useless copy of the tool in the tool folder, and the Makefile. These are included in the distribution of the extension to enable user installation if the extension got installed over the GNOME extensions website. If you do not want to distribute those files in your package, you can safely remove them.

If you find any issues in packaging this extension, please don't hesitate to report them!

Developing

Option 1

Clone the repository and run:

$ make install PREFIX=/home/username/.local

and reload the extension by restarting your gnome-shell.

Option 2

Clone the respository to ~/.local/share/gnome-shell/extensions/[email protected] and reload the extension by restarting your gnome-shell.

You can now enable the extension in your extension settings.

Viewing log output

$ journalctl /usr/bin/gnome-shell -f

Creating a new release

Only core contributors to this project can make a new release. To create one, run:

$ make release

cpupower's People

Contributors

alex4401 avatar alexgluck avatar amivaleo avatar ankurkotwal avatar apyrgio avatar bryango avatar dalessan avatar fin-ger avatar guekho64 avatar honza-kasik avatar laurenttreguier avatar magnefire avatar marekpikula avatar martin31821 avatar martinpl avatar mastercaution avatar mokilcde avatar orhanenginokay avatar pgeorgiev98 avatar sisou avatar smartfinn avatar tclement0922 avatar thgeorgiou avatar uno20001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpupower's Issues

Reports 0 MHZ as current frequency

Whereas /proc/cpuinfo says :

cat /proc/cpuinfo |grep "cpu MHz"
cpu MHz     : 1422.851
cpu MHz     : 2302.539
cpu MHz     : 2299.609
cpu MHz     : 1470.410

Authentication required when multiple users use CPU Power Manager

The installation guide advises to copy the policy file from the users extension installation folder to /usr/share/polkit-1/actions/. The file contains a reference to the cpufreqctl binary in the users extension folder. The policy will apply to this binary only.

When a second user on the same system installs the extension and follows the installation procedure, the policy is overwritten by the version of the new user which point to his local version of cpufreqctl.

A the result the first user has to authenticate now on any change. Applying a profile may require multiple authentications.

I fixed the problem locally by copying the binary to /usr/local/bin/, setting cpufreqctl_path accordingly and changing <annotate key="org.freedesktop.policykit.exec.path"> in the policy file.

After installation, no icon is shown

I've installed your extension following your instructions. Tweak tools shows the extension is successfully installed, and the extension's configuration menu (from tweak tools) only shows me the chance of showing the current CPU freq. But anyway, I see no icons to change CPU governors.

Some data of my laptop: MSI GE60 422XES. Kernel 3.16.0-43, i5-4210H (governors available are only powersave and performance). gnome-shell version 3.10.4. Ubuntu 14.04.

The gnome-shell looking glass shows me no errors.

Add Settings window

Should be able to:

  • Set which frequency is displayed
  • Manage profiles
  • Setup startup/hibernation/dbus integration

Feature Request: Posting Error

Please, extend the notification by adding a submenu with 2 options:
1 - to present pidgin conversation window
2 - to show window list.

cpufreqctl min_perf_pct: No such file or directory in VMWare emulated box

.local/bin/cpufreqctl: line 54: /sys/devices/system/cpu/intel_pstate/min_perf_pct: No such file or directory

/sys/devices/system/cpu/
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0/cache
/sys/devices/system/cpu/cpu0/cache/power/control
/sys/devices/system/cpu/cpu0/cache/power/async
/sys/devices/system/cpu/cpu0/cache/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/cache/power/runtime_active_time
/sys/devices/system/cpu/cpu0/cache/index0/power/control
/sys/devices/system/cpu/cpu0/cache/index0/power/async
/sys/devices/system/cpu/cpu0/cache/index0/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/cache/index0/power/runtime_active_time
/sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_list
/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
/sys/devices/system/cpu/cpu0/cache/index0/physical_line_partition
/sys/devices/system/cpu/cpu0/cache/index0/ways_of_associativity
/sys/devices/system/cpu/cpu0/cache/index1/power/control
/sys/devices/system/cpu/cpu0/cache/index1/power/async
/sys/devices/system/cpu/cpu0/cache/index1/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/cache/index1/power/runtime_active_time
/sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_list
/sys/devices/system/cpu/cpu0/cache/index1/coherency_line_size
/sys/devices/system/cpu/cpu0/cache/index1/physical_line_partition
/sys/devices/system/cpu/cpu0/cache/index1/ways_of_associativity
/sys/devices/system/cpu/cpu0/cache/index2/power/control
/sys/devices/system/cpu/cpu0/cache/index2/power/async
/sys/devices/system/cpu/cpu0/cache/index2/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/cache/index2/power/runtime_active_time
/sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_list
/sys/devices/system/cpu/cpu0/cache/index2/coherency_line_size
/sys/devices/system/cpu/cpu0/cache/index2/physical_line_partition
/sys/devices/system/cpu/cpu0/cache/index2/ways_of_associativity
/sys/devices/system/cpu/cpu0/cache/index3/power/control
/sys/devices/system/cpu/cpu0/cache/index3/power/async
/sys/devices/system/cpu/cpu0/cache/index3/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/cache/index3/power/runtime_active_time
/sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list
/sys/devices/system/cpu/cpu0/cache/index3/coherency_line_size
/sys/devices/system/cpu/cpu0/cache/index3/physical_line_partition
/sys/devices/system/cpu/cpu0/cache/index3/ways_of_associativity
/sys/devices/system/cpu/cpu0/power/control
/sys/devices/system/cpu/cpu0/power/async
/sys/devices/system/cpu/cpu0/power/runtime_active_kids
/sys/devices/system/cpu/cpu0/power/runtime_active_time
/sys/devices/system/cpu/cpu0/crash_notes
/sys/devices/system/cpu/cpu0/crash_notes_size
/sys/devices/system/cpu/cpu0/topology/core_id
/sys/devices/system/cpu/cpu0/topology/core_siblings
/sys/devices/system/cpu/cpu0/topology/core_siblings_list
/sys/devices/system/cpu/cpu0/topology/physical_package_id
/sys/devices/system/cpu/cpu0/microcode
/sys/devices/system/cpu/cpu0/microcode/processor_flags
/sys/devices/system/cpu/cpu1
/sys/devices/system/cpu/cpu1/cache
/sys/devices/system/cpu/cpu1/cache/power/control
/sys/devices/system/cpu/cpu1/cache/power/async
/sys/devices/system/cpu/cpu1/cache/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/cache/power/runtime_active_time
/sys/devices/system/cpu/cpu1/cache/index0/power/control
/sys/devices/system/cpu/cpu1/cache/index0/power/async
/sys/devices/system/cpu/cpu1/cache/index0/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/cache/index0/power/runtime_active_time
/sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map
/sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_list
/sys/devices/system/cpu/cpu1/cache/index0/coherency_line_size
/sys/devices/system/cpu/cpu1/cache/index0/physical_line_partition
/sys/devices/system/cpu/cpu1/cache/index0/ways_of_associativity
/sys/devices/system/cpu/cpu1/cache/index1/power/control
/sys/devices/system/cpu/cpu1/cache/index1/power/async
/sys/devices/system/cpu/cpu1/cache/index1/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/cache/index1/power/runtime_active_time
/sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map
/sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_list
/sys/devices/system/cpu/cpu1/cache/index1/coherency_line_size
/sys/devices/system/cpu/cpu1/cache/index1/physical_line_partition
/sys/devices/system/cpu/cpu1/cache/index1/ways_of_associativity
/sys/devices/system/cpu/cpu1/cache/index2/power/control
/sys/devices/system/cpu/cpu1/cache/index2/power/async
/sys/devices/system/cpu/cpu1/cache/index2/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/cache/index2/power/runtime_active_time
/sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
/sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list
/sys/devices/system/cpu/cpu1/cache/index2/coherency_line_size
/sys/devices/system/cpu/cpu1/cache/index2/physical_line_partition
/sys/devices/system/cpu/cpu1/cache/index2/ways_of_associativity
/sys/devices/system/cpu/cpu1/cache/index3/power/control
/sys/devices/system/cpu/cpu1/cache/index3/power/async
/sys/devices/system/cpu/cpu1/cache/index3/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/cache/index3/power/runtime_active_time
/sys/devices/system/cpu/cpu1/cache/index3/shared_cpu_map
/sys/devices/system/cpu/cpu1/cache/index3/shared_cpu_list
/sys/devices/system/cpu/cpu1/cache/index3/coherency_line_size
/sys/devices/system/cpu/cpu1/cache/index3/physical_line_partition
/sys/devices/system/cpu/cpu1/cache/index3/ways_of_associativity
/sys/devices/system/cpu/cpu1/power/control
/sys/devices/system/cpu/cpu1/power/async
/sys/devices/system/cpu/cpu1/power/runtime_active_kids
/sys/devices/system/cpu/cpu1/power/runtime_active_time
/sys/devices/system/cpu/cpu1/crash_notes
/sys/devices/system/cpu/cpu1/crash_notes_size
/sys/devices/system/cpu/cpu1/topology/core_id
/sys/devices/system/cpu/cpu1/topology/core_siblings
/sys/devices/system/cpu/cpu1/topology/core_siblings_list
/sys/devices/system/cpu/cpu1/topology/physical_package_id
/sys/devices/system/cpu/cpu1/microcode
/sys/devices/system/cpu/cpu1/microcode/processor_flags
/sys/devices/system/cpu/cpuidle
/sys/devices/system/cpu/cpuidle/current_driver
/sys/devices/system/cpu/cpuidle/current_governor_ro
/sys/devices/system/cpu/power/control
/sys/devices/system/cpu/power/async
/sys/devices/system/cpu/power/runtime_active_kids
/sys/devices/system/cpu/power/runtime_active_time
/sys/devices/system/cpu/microcode

Cannot set < 22% as minimal?!

If I set the minimal frequency to 22% or higher all is fine - means the settings keep saved.
When I set to lower then 22% (0-21%) it always switch back to 22% ?! Directly when set (1 sec delay or so).
The same goes for the maximal frequence.. The minimal setting I can use is 22 %...

Any idea why or how to troubleshoot?

Not throttling since kernel 4.13.x on Fedora

Thank you for this great extension!

I just wanted to share, that throttling suddenly stopped to work on my device around a month ago, obviously since Fedora 26/27 updated their kernel packages to 4.13.x.

Since I downgraded to 4.12.12 kernel packages the extension behaves fine again.

I found this Reddit post and some kernel Git notes:

Linux 4.13 doesn't show the current frequency in /proc/cpuinfo anymore [...]

So maybe similar code as https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/pull/404/files would do?

Gnome-shell warning

When I type gnome-shell -r, I get:

CPU Power Manager-Message: 09:47:17.770: Inside cpupower.CPUFreqIndicator
Gjs-Message: 09:47:17.958: JS WARNING: [/home/piegames/.local/share/gnome-shell/extensions/[email protected]/src/indicator.js 169]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
Gjs-Message: 09:47:17.959: JS WARNING: [/home/piegames/.local/share/gnome-shell/extensions/[email protected]/src/indicator.js 173]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
CPU Power Manager-Message: 09:47:17.961: 21 100
Gjs-Message: 09:56:30.259: JS WARNING: [/home/piegames/.local/share/gnome-shell/extensions/[email protected]/src/indicator.js 205]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2

Hardware information:

  • CPU Model: Intel i7 7th Gen
  • Linux kernel version 4.17.2-1-ARCH
  • Gnome shell version: 3.28.2

The extension seems to be working fine though, it's just an annoying spam in my logs.

It hangs my GNOME 3.16

It hangs immediately after it, the TTY{X} works though. Moving the cursor works as well, nothing else does. GDM works too. Restarting doesn't help so I removed the extension from FS.

Gnome 3.26 on Arch Linux

I am the maintainer of this extension for Arch Linux, been debugging why it doesn't work in 3.26 and hoping this issue can help track that:

Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 67]: reference to undefined property "out"
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 67]: Too many arguments to function GLib.spawn_command_line_sync: expected 1, got 2
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 71]: Too many arguments to function GLib.spawn_command_line_sync: expected 1, got 2
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 75]: Too many arguments to function GLib.spawn_command_line_sync: expected 1, got 2
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 153]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 157]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
Oct 14 06:15:23 holodeck.local gnome-shell[8065]: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/src/indicator.js 189]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2

Blank name results in error in overview

Everything works correctly, but I accidentally added an entry without a blank name. This resulted in an error in which metadata information about the package is displayed instead of the name of the mode. Please see the attached screenshot.

screenshot from 2016-09-26 12-36-14

Installation doubts

If you get the same value as above, everything is working and you can proceed to the next step.

What's the next step? I did all steps, installed the extension and couldn't see any new icon in my toolbar. My model seems compatible:

$ ls /sys/devices/system/cpu/intel_pstate/
max_perf_pct  min_perf_pct  no_turbo

Doesn't the polkit action allow running any command as root ?

Correct if I'm wrong, but you polkit action authorizes running a script owned by the normal user without any authorization. A malicious agent which gains access to the computer (but does not know the root password) can edit that script, effectively being able to run any command. Perhaps I'm missing something ? Shouldn't you make the script only writable by root ?

Can not set frequency after suspending

After suspending, the extension does not retain the configuration, and loses the ability to change de CPU configuration. If I choose a profile, the extension apparently switches to that profile, but frequency never changes.

Version information:

Shell version: 3.14.4
Extension version: 4

reported by cplopez

Profile extensions

Some cool additional features for profiles would be:

  • switch devices on/off (bluetooth, hdd spin down time, etc.)
  • set display brightness

Option to not restore last setting

In my case before suspending , I use high performance profile on AC, then after resuming my system, I use slower cpu setting, set by TLP, but cpupower set it back to high profile. Please add option to not restoring last setting

Thanks

Feature suggestion: Complete uninstallation

Please add a 'Completely Uninstall' option to the CPU Power Manager applet that completely reverses any changes the applet may have done to the user's computer including remove and reverse the scripts installed by the applet to work properly.

This gives users peace of mind that in case the applet does not work for their needs, they can still reverse any changes, more than likely, that may have incurred.

Default profile for battery and AC modes in laptop

Hi, enjoying your extension for a while.
The only thing I wish it had is to set default profiles in battery and AC modes.

Does anyone knows an easy way to achieve this (preferably without dbus monitoring) ?

Currently I am running below commands in gdm startup. Would like to trigger scripts when adapter connect/disconnect...
thanks....

pkexec ~/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl min 0
pkexec ~/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl max 90
pkexec ~/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl turbo 0

cpupower extension doesn't work

It displays the frequency, but it won't change the frequency. When it tries to change the frequency, I have to enter the password four times (once for each core), but then nothing changes. Running any one of the following in terminal does, however, work on all cores:

sudo cpupower frequency-set -g powersave
sudo cpupower frequency-set -g conservative
sudo cpupower frequency-set -g ondemand
sudo cpupower frequency-set -g performance

All installation instructions were followed to the letter and the newest from GIT is installed. The names of governors in the list in preferences also do not match the names of those actually installed.

Running pkexec ~/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl max 100 gives the following error:

/home/XXXXXX/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl: line 47: /sys/devices/system/cpu/intel_pstate/max_perf_pct: No such file or directory

This is on a system running Fedora 23 Workstation, GNOME Shell 3.18.4. Processor is Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz

Extension does not appear in GNOME Shell 3.18.5

For no reason the widget does not appear anymore after turning on with the shell extensions website.

  • pstate is enabled

$ ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus
related_cpus
scaling_max_freq
cpuinfo_cur_freq
scaling_available_governors
scaling_min_freq
cpuinfo_max_freq
scaling_cur_freq
scaling_setspeed
cpuinfo_min_freq
scaling_driver
cpuinfo_transition_latency
scaling_governor

  • Intel Core i5-4200U CPU Haswell mobile
  • Ubuntu 16.04.3 LTS
  • Kernel: 4.4.0-104-generic
  • policykit 0.105-2ubuntu2
  • GNOME Shell 3.18.5

$ journalctl -xb | grep [email protected]
Dez 18 04:31:17 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: sed -i "s/xxxPATHxxx//home/tommy/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl/" /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy
Dez 18 04:31:17 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: Kindprozess »/home/tommy/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl« konnte nicht ausgeführt werden (Keine Berechtigung)
Dez 18 04:32:14 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: Extension "[email protected]" had error: TypeError: _indicator is undefined
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/sr@latin/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/cs_CZ.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/installer.sh
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/en_US.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/unsupported.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/ru/LC_MESSAGES/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/data/icons/cpu.svg
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/de_DE.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/convenience.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/sr@latin/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/fr_FR.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/en/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/pl/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/sr/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/profilebutton.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/ru_RU.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/notinstalled.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/pl_PL.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/fr/LC_MESSAGES/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/preferences.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/sr_RS.po
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/data/mko.cpupower.policy.in
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/de/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/sr/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/baseindicator.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/indicator.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/data/cpupower-preferences.glade
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/cs/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/schemas/org.gnome.shell.extensions.cpupower.gschema.xml
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/ru/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/profile.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/LICENSE
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/pl/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/cpufreqctl
Dez 18 04:32:20 tommy-dell gnome-session[2103]: creating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/en/LC_MESSAGES/
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/schemas/gschemas.compiled
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/utils.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/[email protected]
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/template.pot
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/extension.js
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/en/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: inflating: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/locale/fr/LC_MESSAGES/gnome-shell-extension-cpupower.mo
Dez 18 04:32:20 tommy-dell gnome-session[2103]: extracting: /home/tommy/.local/share/gnome-shell/extensions/[email protected]/metadata.json
Dez 18 04:32:20 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: Kindprozess »/home/tommy/.local/share/gnome-shell/extensions/[email protected]/src/installer.sh« konnte nicht ausgeführt werden (Keine Berechtigung)
Dez 18 04:35:54 tommy-dell sudo[4174]: tommy : TTY=pts/1 ; PWD=/home/tommy ; USER=root ; COMMAND=/bin/cp /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy /usr/share/polkit-1/actions/
Dez 18 04:42:43 tommy-dell sudo[5170]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/cp /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy /usr/share/polkit-1/actions/
Dez 18 04:43:23 tommy-dell sudo[5267]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/cp /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy /usr/share/polkit-1/actions/
Dez 18 04:44:14 tommy-dell sudo[5394]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/cp /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy /usr/share/polkit-1/actions/
Dez 18 04:46:11 tommy-dell sudo[5668]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/cp /home/tommy/.local/share/gnome-shell/extensions/[email protected]/mko.cpupower.policy /usr/share/polkit-1/actions/
Dez 18 04:46:49 tommy-dell sudo[5802]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/chown root:root /home/tommy/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl
Dez 18 04:46:51 tommy-dell sudo[5810]: tommy : TTY=pts/1 ; PWD=/usr/share/polkit-1/actions ; USER=root ; COMMAND=/bin/chmod 0555 /home/tommy/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl
Dez 18 04:47:08 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: Kindprozess »/home/tommy/.local/share/gnome-shell/extensions/[email protected]/installer.sh« konnte nicht ausgeführt werden (Keine Berechtigung)
Dez 18 04:47:43 tommy-dell gnome-session[2103]: Gjs-Message: JS LOG: Kindprozess »/home/tommy/.local/share/gnome-shell/extensions/[email protected]/installer.sh« konnte nicht ausgeführt werden (Keine Berechtigung)
Dez 18 04:51:06 tommy-dell gnome-session[2103]: Gjs-Message: JS WARNING: [/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js 436]: anonymous function does not always return a value
Dez 18 04:51:06 tommy-dell gnome-session[2103]: Gjs-Message: JS WARNING: [/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js 465]: anonymous function does not always return a value
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.selectionChanged@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:498
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.initConfigWidget/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:341
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshUI@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:519
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.loadConfig/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:538
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.profiles@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:592
Dez 18 04:51:22 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshProf@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:543
Dez 18 04:51:22 tommy-dell gnome-session[2103]: EditDialog<.run/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:130
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.selectionChanged@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:498
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.initConfigWidget/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:341
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshUI@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:519
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.loadConfig/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:538
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.profiles@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:592
Dez 18 04:51:28 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshProf@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:543
Dez 18 04:51:28 tommy-dell gnome-session[2103]: EditDialog<.run/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:130
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.selectionChanged@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:498
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.initConfigWidget/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:341
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshUI@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:519
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.loadConfig/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:538
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.profiles@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:592
Dez 18 04:51:49 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshProf@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:543
Dez 18 04:51:49 tommy-dell gnome-session[2103]: EditDialog<.run/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:130
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.selectionChanged@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:498
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.initConfigWidget/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:341
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshUI@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:519
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.loadConfig/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:538
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.profiles@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:592
Dez 18 04:51:58 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshProf@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:543
Dez 18 04:51:58 tommy-dell gnome-session[2103]: EditDialog<.run/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:130
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.selectionChanged@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:498
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.initConfigWidget/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:341
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.refreshUI@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:519
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.loadConfig/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:538
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.show_freq_taskbar@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:599
Dez 18 04:52:11 tommy-dell gnome-session[2103]: CPUPowerPrefsWidget<.addSwitch/<@/home/tommy/.local/share/gnome-shell/extensions/[email protected]/prefs.js:293

Creating a new issue

  • Check if another issue with the same problem exists
  • Check if you got the prerequisites right
    • pstate driver enabled and supported CPU
    • policykit working and rule working
  • Check if the cpufreqctl utility works correctly
  • Please include the following information (only for bugreports):
    • CPU Model
    • Linux kernel version
    • policykit version
    • Gnome shell version
    • journalctl -xb (maybe pastebin/filtered)

Uninstall helper proram

On Fedora 26, how can I uninstall whatever helper I installed from within the extension?

Thank you in advance.

policy-kit installation wrong?!

In my case the following happened:

I installed the extension over extensions.gnome.org
Then after the extension gets enabled gnome asks multiple times for my password to execute cpufreqctl

The policy file gets installed correctly into:
/usr/share/polkit-1/actions/mko.cpupower.policy

but within that file I find the line:

<annotate key="org.freedesktop.policykit.exec.path">/home/tfi/.local/share/gnome-shell/extensions/[email protected]/cpufreqctl</annotate>

which is either not correct or the installer missed to moved the cpufreqctl file from the directory src/.

I "fixed" it by modifying the path to:
<annotate key="org.freedesktop.policykit.exec.path">/home/tfi/.local/share/gnome-shell/extensions/[email protected]/src/cpufreqctl</annotate>

extension fails to start

Hello,

Tried to install it from extension.gnome.org as well as extracting the zip from github to extensions folder and running the policy installation script. I get the following error for preferences in tweakui and extension does not start.


Gtk.BuilderError: /home/swaroop/.local/share/gnome-shell/extensions/[email protected]/data/cpupower-preferences.glade:75:1 requires attribute "id"

Stack trace:
CPUPowerPreferences<._init@/home/swaroop/.local/share/gnome-shell/extensions/[email protected]/src/preferences.js:56
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
_Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110
Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204
buildPrefsWidget@/home/swaroop/.local/share/gnome-shell/extensions/[email protected]/prefs.js:41
Application<._selectExtension@/usr/share/gnome-shell/js/extensionPrefs/main.js:102
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Application<._extensionSelected@/usr/share/gnome-shell/js/extensionPrefs/main.js:121
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Application<._selectExtension@/usr/share/gnome-shell/js/extensionPrefs/main.js:112
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Application<._extensionsLoaded@/usr/share/gnome-shell/js/extensionPrefs/main.js:221
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
_emit@resource:///org/gnome/gjs/modules/signals.js:124
ExtensionFinder<._extensionsLoaded@/usr/share/gnome-shell/js/misc/extensionUtils.js:178
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
done@/usr/share/gnome-shell/js/misc/fileUtils.js:33
_collectFromDirectoryAsync/</<@/usr/share/gnome-shell/js/misc/fileUtils.js:51
onNextFileComplete@/usr/share/gnome-shell/js/misc/fileUtils.js:21
main@/usr/share/gnome-shell/js/extensionPrefs/main.js:278
@:1


Ran the following diagnostics:
cmd: "gnome-shell --version"
result: "GNOME Shell 3.10.4"

cmd: "grep -i pstate /boot/config-$(uname -r)"
result: "CONFIG_X86_INTEL_PSTATE=y"

cmd: "sudo ./installer.sh install"
result : "Installing policykit action... Success
Fixing permissions... Success"

cmd: "sudo ./installer.sh check"
result: "Installed"

cmd: "./cpufreqctl min get" (similar for turbo and max)
result: "./cpufreqctl: line 206: /sys/devices/system/cpu/intel_pstate/min_perf_pct: No such file or directory"

CPU model: "Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz"

Linux kernel: "Linux MAVLAB5 3.13.0-141-generic #190-Ubuntu SMP Fri Jan 19 12:52:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"

policykit version: 0.105-4ubuntu3.14.04.1

Thermal throttling?

There is this nice script that does thermal throttling: https://github.com/Sepero/temp-throttle/

It's just a loop polling the temperature and changing the max frequency until that temperature is below a threshold.

I think it would be a nice addition to have such features and not that hard to implement. (Since it is using another interface than this extension, it might be faster to re-implement it from scratch)

DBus Integration

Respond to DBus events such as ac/battery change and change cpu frequency

Governors?

Do you have any plans to enable the governor to be set?

Not working

Gnome Shell 3.16
Processor: Intel® Core™ i5-4200U CPU @ 1.60GHz × 4
Graphics: Intel® Haswell Mobile
intel_pstate enabled in kernel

and by not working, I meant that the current frequency is stuck at 0mhz

Max Freq - settings are not honored

I have correctly installed the extension and it is working so far however if I run some up that use a lot of cpu the max limit is automatically changed.

I'm not sure if this happens because of some kind of HW controller on the frequency. ( I'm not running thermald or other similar software )

OS: Antergos (Arch linux)
CPU: Sandybridge ( Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz)

It seems not having effect on battery mode

Hi, on my ivybridge laptop, whatever setting I change (min freq, max freq, turbo ecc) the cpu frequency won't go beyond 800MHz even in high load (my CPU max freq is 2.5GHz).

Pull request: Save last settings and apply them on startup and resume. Governor change option.

I think this extension should be able to save last applied settings and apply them on resume after suspend or restart/startup. Some settings are overridden by cpupower.service or by tlp.service (if used) on startup. I've been able to disable cpupower and mask it, to let tlp apply my settings. I've set in tlp the procentages I want by default and the governor for AC or BAT. I think the governor would be a new nice feature to add to this extensions.

Show active choosen profile

Request for enhancement

It would be very nice if one could see which profile is currently selected (maybe a simple check mark on the last selected profile or so)

Unecessary Gweather dependency in the settings GUI

This line in the extension settings (pref.js)

const GWeather = imports.gi.GWeather;

causes the prefs gui to not load if gir1.2-gweather is not installed, which was not on my system. I don't see any reason to require this dependency.

Latest update is botched

This extension was working fine on my Arch Linux with GNOME 3.22 but today's extension update from the GNOME Extensions website results in a complete hang of the entire system and I have to manually rm the extension folder from a tty to have a working system again. Going back to the previous version of this extension resolves the issue for me.

Could you please fix this?

(btw, someone on 3.20 also reported this issue on the GNOME Extensions website so I'm not the only one)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.