konkor / cpufreq Goto Github PK
View Code? Open in Web Editor NEWSystem Monitor and Power Manager
Home Page: https://konkor.github.io/cpufreq/
License: GNU General Public License v3.0
System Monitor and Power Manager
Home Page: https://konkor.github.io/cpufreq/
License: GNU General Public License v3.0
We all heard about the next gnome-shell version where is all gnome-extensions should be rewritten in GTK because St library looks like ending its life cycle together with Gnome 3...
After discussion with @terencode I decided to make GTK version of the gnome extension and started migrate all code to a dedicated gtk application.
Another benefit is ability to run it on any desktop environment with GTK 3.14+.
So I would like to discuss here about upcoming design, mockups, features...
After updating this GNOME extension I noticed that it start reporting if irqbalance
is installed on the device. If so it will replace the loading percentage with a constant, warning message, irqbalance detected
.
I then disabled irqbalance
through its config file (located at /etc/default/irqbalance
) but the message was still there. Stopping the service did not help, either. The comment from the author hinted me that the package should be uninstalled if I saw the message.
I tracked down to the code and located the condition at
Line 1429 in 7655ccc
ps aux | grep /usr/sbin/irqbalance
matches.Hi, there! Great project you have. With this extension, suppose I can get benefit to tune my CPU into powersave mood or performance mood.. but unlucky, I cant get this cpufreq work well on my fedora 23. Could you have a look?
I am using gnome shell 3.18 , kernel 4.5.5-201.fc23.x86_64 and package kernel-tools-4.5.5-201.fc23.x86_64 is already installed.
I get this interface when installing to my desktop
I already chmod the cpufreqctl inside extension folder
$ ls -l | grep cpufreqctl
-rwxr-xr-x. 1 krip krip 557 May 7 00:55 cpufreqctl
Actually I don't use this packages long time ago. And It should work without this dependency on any supported architecture by kernel (x86, amd, arm, msm, tegra...).
So I want to test master's version on your favorite distribution and hardware before i'll push new version to extensions.gnome.org. So you can:
Thank you very much!
Behaviour of ondemand and conservative are the same for me : ondemand sets intermediate frequencies as conservative.
As of kernel 4.10, intel_pstate allows the creation of custom governors.
It would be awesome to see this extension support it.
Hello, first of all this extension is great ;) It helped me a lot to get the max of my laptop.
I just tried the kernel 4.12 and it seems that the extension doesnt have the power to interact with governors anymore.
Config :
XPS 13 9360
Thanks !
Allow user to define a default profile for when the laptop is using the Battery and another for when it is using the Power supply.
I googled a bit and found that it seems easy to find out if the laptop is on battery.
grep POWER_SUPPLY_ONLINE /sys/class/power_supply/ADP1/uevent
Return 1 when in Power, 0 when in battery. (It's not that linear, because there may be more power adaptors)
What do you think?
This extension is causing endless disk IO by writing to dconf. Running dconf watch /
yields:
/org/gnome/shell/extensions/cpufreq/title
'0 ㎒'
/org/gnome/shell/extensions/cpufreq/title
'2.87 ㎓'
/org/gnome/shell/extensions/cpufreq/title
'2.61 ㎓'
/org/gnome/shell/extensions/cpufreq/title
'1.45 ㎓'
and so on and on.
See https://www.reddit.com/r/archlinux/comments/7gjvf8/constant_disk_io_from_dconfservice/
The issues seems to be that this extension misuses dconf for inter process communication between cpufreq-service and the extension itself. You should consider usiing DBus for this, as it was built for this use case. E.g. my extension at https://github.com/phw/webcam-access-monitor does this for a similar use case.
Do you have support for TLP?
When gnome-shell starts and loads the extension, the gnome-shell locks up. After investigation I found out that the command "pkexec /usr/sbin/cpufreqctl irqbalance" is running. After logging into another terminal I manage to kill the process and everything continues loading. The extension loads up but everything freezes again when trying to change governor or boost from the extension. After killing the stuck pkexec the system unfreezes.
Polkit policy is present in /usr/share/polkit-1/actions/konkor.cpufreq.policy
I have also added the following polkit rule:
polkit.addRule(function(action, subject) { if (action.id == "konkor.cpufreq.setcpufreq" && subject.isInGroup("power")) { return polkit.Result.YES; } });
I made sure that I was in the power group:
[arvind@valkyrja ~]$ groups sys lp wheel network video optical storage scanner power vboxusers plugdev arvind
If I try executing the following command manually I get the authorization prompt to enter my password (happens each time I run the command)
pkexec /usr/sbin/cpufreqctl gov performance
@Angel_Garcia sent
Debian 8.8 up to date
uname -a
Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
CPU: Intel® Core™ i7-4770K
PState disabled on kernel boot with: intel_pstate=disable
this give me more control over CPU speed
The problem showed up after upgrading from previous to new
The extension doesn't load at all, and the sliders thing is what gnome reported.
I've tested every version starting from 12 to 9
And 9 is the first one that works fine
from 10 to 12 they don't load at all
So i cloned the git repo right into the extension folder
I wanted to try the changes in every commit to see which one break loading
so y hard reset the branch to every commit form tag 9.0
I reloaded the entire gnome shell every time y changed the git state.
Also i disabled any other extension I was using, to check if one of them was causing my problems, but no, problem still there
Gnome report without changes: "TypeError: The slider value must be a number"
Thanks for this excellent app. Gives me an extra 4 hours of battery on my machine. The extension is working as expected however, the display does not seem to update on the latest version.
For example, it always shows that all 8 cores on my machine are active even after I have selected for example only 4. Similarly, when I click to turn off turbo, the menu closes.
Regardless of what's being presented, I can still see that it's working because the display shows the processor frequency (and also if it wasn't my battery would be dead in 5 hours instead of 9).
I'm not sure how to debug but I can provide you with whatever output you require.
Ubuntu 17.10 (4.15)
Dell XPS 9560
This can be useful if you don't want all the information and settings of the default menu but just quickly toggle between the available governors when right clicking.
I'm wondering if it wouldn't be better to make this quick governor toggle the default menu on left click so you only get all the information if you right click it.
What about toggling between different information (load, freq) with double click?https://mail.gnome.org/archives/gnome-shell-list/2016-May/msg00001.html
Setting min/max frequency for CPU from scaling_available_frequencies like in intel_pstate driver.
Hi. Nice plugin. I am missing a description of what the various options do:
...
It would be nice with a short description in the readme file.
This mode would replace the current active core slider with sub-menus with governors and frequencies for each core.
Hi there :)
I love cpufreq :) It is easy to use. Lots of features. Lightweight. It remembers your settings. More secure because its code is publicly available for review on github. Yay :)
This ticket is for reporting a bug when the user tries to install cpufreq for additional Debian user(s). When doing so the Gnome session freezes and cpufreq is unusable for those additional Debian user(s).
Using Debian 8 Jessie, using GNOME 3.14.1, run the following command to install "cpufrequtils" package
sudo apt-get install cpufrequtils
Double check that that Debian user has full "Administrator" access. Also known as "Root". "Desktop user" access only would not work. In this example, let us call that user the "FIRST Debian User".
Using Firefox 45.8 go to https://extensions.gnome.org/extension/1082/cpufreq/
Click on the "OFF/ON" toggle button to turn ON "cpufreq" extension. By the way, on April 16, 2017 we searched which version of "cpufreq" is on extensions.gnome.org but found no result.
When prompted by extensions.gnome.org allow all permissions
The cpufreq trail icon will show into the top toolbar. Left click on it. Select "Install...".
When prompted by cpufreq Install allow all permissions. This will automatically fix those executing bit,
In the "cpufreq" tray menu, the "Install..." option is now replace by "Preferences". The settings are remembered when changing the CPU speed. So far so good. It works for the "FIRST Debian User".
Now log-out that "FIRST Debian User"
Log-in the "SECOND Debian User". Redo all the same steps as above.
When the "SECOND Debian User" go to https://extensions.gnome.org/extension/1082/cpufreq/ then click on the "OFF/ON" toggle button to turn ON "cpufreq" extension. The Gnome session freeze. The mouse is still working but everything else is frozen. This is the issue.
To fix this
Delete the "konkor.cpufreq.policy" file. Which is located at
/usr/share/polkit-1/actions/konkor.cpufreq.policy
Delete the "cpufreq@konkor" folder for the "SECOND Debian User". Which is located at
~/.local/share/gnome-shell/extensions/cpufreq@konkor
Now the user is able to log-in the "SECOND Debian User" but the "cpufreq" extension is no longer available. To change the CPU speed the user needs to log-in the "FIRST Debian User".
The user would be able to use https://extensions.gnome.org/extension/1082/cpufreq/ to install "cpufreq" extension for both the "FIRST Debian User" and the "SECOND Debian User". And the user would be able to change the CPU speed with either the "FIRST Debian User" and the "SECOND Debian User".
/usr/share/polkit-1/actions/konkor.cpufreq.policy
. Within that konkor.cpufreq.policy
file the path seems to be hard coded to target the "FIRST Debian User". Could that be related to that issue? I mean this line that starts with: <annotate key="org.freedesktop.policykit.exe.path">/home/[FIRST-DEBIAN-USER]/.local/
Cheers,
Francewhoa
I think this would be a more flexible approach to easily get any system information if in need for the future as well as improving code readability and maintenance.
This feature would work through the coretemp
module. It should be like Thermal Throttle issue #24.
When Performance govenor is selected, the minimum frequency scaling option should be disabled; when Powersave govenor is selected, the maximum frequency scaling option should be disabled.
After executing # modprobe cpufreq_powersave
, the new available govenor is not showing up anymore until manually reloading the extension.
It seems it's not properly closing file after reading the frequency thus producing after running a while a complete crash of gnome-shell.
Note: I translated some parts as it was written in french.
Error: Erreur lors de l'ouverture du fichier /sys/devices/system/cpu/cpu7/cpufreq/scaling_cur_freq Too much files opened
glibtop(c=1778): [ERROR] open (/proc/loadavg): Too much files opened
Summer is coming. So Linux powered users should be ready for summer heat) Well, if you have tens CPU cores on your laptop or PC you can just tune off them from our gnome extension now.
Here is some screenshots to understand what it is:
So if you'll make some benchmarks for system performance or battery usage I'll be glad to see them here.
PS: This technique is using widely on Android platform to dramatically reducing of power consuming. They have dynamic power managers which control this CPU state based on system loading.
Hi,
I really like the extension but it seems that each time it refreshes the frequency indicator, it makes the whole system freeze for 0.5 second...
Anyway to make it asynchroneous?
Thanks.
4.7.2-1-ARCH
Gnome 3.20.2
Nvidia 370.23 proprietary drivers
Here's a list of warning i got when i tried the extension on my machine
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1294]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1435]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1437]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1439]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1441]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1443]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1445]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
Ability to create/save new profiles and apply them.
As development keeps going, I see experimental features being pushed so even if it is not yet present on extensions.gnome.org, it would be a good idea to consider master branch as stable/tested and create a separate branch to add, test and give feedback on new features.
Hello,
I'm running a fresh install of Fedora 27, fully updated.
As soon as I attempt to install the cpufreq extension (from https://extensions.gnome.org/), I get an instant lockup. After rebooting (systemctl reboot) and attempting to login again, I get a black screen with a mouse cursor.
The only way to restore login to gnome was to manually disable the extension:
gnome-shell-extension-tool -d cpufreq@konkor
I then deleted the extension from:
/.local/share/gnome-shell/extensions/
So I wouldn't accidentally enable it again.
Are there some additional dependencies that Fedora 27 requires? I installed the kernel-tools package per the documentation.
Thanks!
It's Thermal Throttle monitoring option in Preferences menu (on/off).
This could be fixed with #44
Hi,
I do not understand the signifcation of CPU Throttle with the orange « :-| » smiley.
Is it due to overheat? My CPU is at 60°C, not so hot. Is it due to other thing ?
Well it seems that the extension is talking about something going wrong… but do not provide any information for common user.
Cpufreq keeps reloading its settings after having done it the first time after being enabled.
This happens for instance when you unlock your gnome-shell session after being inactive.
I found that after being logged in for a while my memory was creeping up. System monitor said cpufreq-service was using 6gb last time I killed it. If any logs or anything are required let me know. :)
Gio version of the CPU frequency monitoring is working faster in 26 to 200 times on my machine.
So there is no GLib.Processing for cpufreqctl, no bash, no cat, no grep each 2 seconds anymore.
The extension is great but I always have a feeling if an extension is polling the CPU statistics every second that it's actually putting load on the CPU just to get that information.
Is it possible to add an option in preferences to change the refresh time
I think we need a set of the governors icons. They could be helpful in the many cases:
Ideas for icons:
Powersave - 1-2 leafs???
Performance - Rocket/Fire?
Ondemand - Stopwatches?
Conservative - Man Suit?
Schedutil - Calendar/Planer?
Interactive - Some game/media icon?
Userspace - Classic user's silhouette?
Desired format is SVG. I'm going to do a folder for this staff
Here's a list of warning i got when i tried the extension on my machine
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1294]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1435]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1437]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1439]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1441]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1443]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
sep 04 04:56:18 lenovo gnome-shell[19623]: JS WARNING: [/home/bilal/.local/share/gnome-shell/extensions/cpufreq@konkor/extension.js 1445]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2
I think that the package is called cpupower
and not linux-cpupower
.
This feature would allow for the top 10 power hungry processes or some monitoring activities. So it could show some additional info at the panel's status area or/and in the main menu...
Here is an example. Some Intel CPU has frequencies 1200-2600 MHz (3200 with turbo boost). So minimum frequency is 1200/3200 = 38%, max is 2600/3200 = 81%, max with TB is 3200/3200 = 100%.
But here is other problems too. The newest kernels 4x is supporting it by own way. It's looking like Intel doesn't have standard yet, one kernels allow you to set frequency from 0% to 100% other not. Here is same problem with governors so. So in some cases Turbo Boost behavior is not clear too.
At the end latest kernels are supporting ACPI CPUFREQ too through ACPI profiles but limited it's frequencies only. So if Intel driver is looking back anyway to ACPI DRIVER now is it any profit from using it?
Maybe it's time to change to local units from 1.2GHz to 3.2GHz to example so? But it's a lot of work because of its behavior...
Any suggests will be good point to decide of future of intel pstate mode in the application.
Hello, i wrote about this in gnome extensions website. I have strange issue: missing icons in only this extension. I have same setup on PC and laptop, but on laptop i don't face this problem.
What did i try:
Hi i started using cpufreq couple minutes ago. whenever i try to change governor settings from panel like max/min freq turbo boost etc. it applies for the other one as well. for example i edited powersave as %10 min 2 cores turbo off but when i change to performance mode it still stays. i also tried creating custom preference but it didnt help. i use ubuntu 17.10 irqbalance disabled pstate enabled and its fresh install.
thanks.
CPU model, Linux/kernel version, system loading, temperature, thermal throttle, governors per CPU if they are Mixed, and WARN MESSAGE PLACE to say 'Your System OK', 'Hey, something wrong' (to loaded, to hot, have throttling, low memory and other info). Link info.zip.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.