Code Monkey home page Code Monkey logo

cpufreq's People

Contributors

bjhulst avatar breier avatar burningsmile avatar elcodedocle avatar gtirloni avatar haxk20 avatar konkor avatar langpavel avatar mbologna avatar nailim avatar rautesamtr avatar ricardoeprodrigues avatar terencode 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

cpufreq's Issues

Getting ready to gnome 4 or any other

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...
screenshot from 2017-11-24 18-52-24

"irqbalance detected" even when irqbalance is disabled

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

cpufreq_output = GLib.spawn_command_line_sync ("pkexec " + this.cpufreqctl_path + " irqbalance");
, but I think it should be more reasonable to check if this service is running instead of checking its existence. For example, check if ps aux | grep /usr/sbin/irqbalance matches.

Weird interface on Fedora 23 (Gnome shell 3.18)

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
selection_007

I already chmod the cpufreqctl inside extension folder

$ ls -l | grep cpufreqctl
-rwxr-xr-x. 1 krip krip  557 May  7 00:55 cpufreqctl

[Testing Request] Droping dependency from external packages cpufrequtils/cpupower

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:

  1. Uninstall cpufrequtils/cpupower and test how it works;
  2. Run your favorite Linux Live CD/DVD/Flash and install the cpufreq extension from GitHub.

Thank you very much!

Doesnt work on kernel 4.12

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 !

Profile changing on Battery or on Power

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?

Constant disk IO due to dconf

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.

cpufreq freezes system

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

Can't update from version 9 to 10 (https://extensions.gnome.org/errors/view/3857)

@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

it breaks in: 686e0f8
0b59bcd

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"

Display doesn't update

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

Add support for right click and double click

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

Usage description

Hi. Nice plugin. I am missing a description of what the various options do:

  • minumum ?
  • maximum, is this cpu slice, or throttling, or ...
  • boost - I guess this allows for a temporary increase in CPU usage above "Maximum".
  • Performance and Powersave modes - what do they do

...
It would be nice with a short description in the readme file.

[Improvement] CSS theming?

First of awesome extension :)

Was just hoping you could add in CSS theming as depending on the theme used the text position is of center.
I would add it in myself but I lack js knowledge.

screenshot from 2016-06-02 20-53-30

Regards,
A

CPU Power Advanced Mode

This mode would replace the current active core slider with sub-menus with governors and frequencies for each core.

Install Freezes for Additional User(s)

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).

Steps to reproduce

  1. Using Debian 8 Jessie, using GNOME 3.14.1, run the following command to install "cpufrequtils" package
    sudo apt-get install cpufrequtils

  2. 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".

  3. Using Firefox 45.8 go to https://extensions.gnome.org/extension/1082/cpufreq/

  4. 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.

  5. When prompted by extensions.gnome.org allow all permissions

  6. The cpufreq trail icon will show into the top toolbar. Left click on it. Select "Install...".

  7. When prompted by cpufreq Install allow all permissions. This will automatically fix those executing bit,

  8. 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".

  9. Now log-out that "FIRST Debian User"

  10. Log-in the "SECOND Debian User". Redo all the same steps as above.

  11. 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.

  12. To fix this

    1. Delete the "konkor.cpufreq.policy" file. Which is located at
      /usr/share/polkit-1/actions/konkor.cpufreq.policy

    2. Delete the "cpufreq@konkor" folder for the "SECOND Debian User". Which is located at
      ~/.local/share/gnome-shell/extensions/cpufreq@konkor

  13. 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".

Expected result

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".

Potential cause of that issue

  • Somehow that issue seems to be related to the file located at /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/
    Where [FIRST-DEBIAN-USER] is the "FIRST Debian User"
  • Maybe the "cpufreq" files hosted on extensions.gnome.org are outdated compare to the files hosted on github?

Cheers,

Francewhoa

[Gio] Not properly closing file after reading the frequency

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

[Feature Experemental] CPU Power Control ready for testing

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:
screenshot from 2017-04-24 10 15 05
screenshot from 2017-04-24 10 16 15
screenshot from 2017-04-24 10 17 15
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.

Refresh makes the system freeze

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

Few JS warnings

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

Make separate testing branch

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.

Installing on Fedora 27 causes instant lockup in gnome

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!

Thermal Throttle monitoring

It's Thermal Throttle monitoring option in Preferences menu (on/off).

  1. This should detect drops of CPU cycles when the CPU overheats.
  2. Notify users. Here can be few options: system panel icon/symbol, sound beeps or OSD.
  3. Calculate some average speed cycles per minute to detect dynamic of the temperature.
  4. Show Thermal Throttle menu item if detected on opening.

Can't reduce Maximum frequency

I downloaded the latest version and now I can't change the Maximum frequency.

Maximum Disabled

It appears disabled even if I select Powersaver.

CPU Throttle :-|

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.

Only load settings at first run

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.

High Memory usage

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. :)

Add an option for polling refresh time

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

Symbolic Icons for the governors

I think we need a set of the governors icons. They could be helpful in the many cases:

  1. Someone could use them together with frequency indicator to show which governor active.
  2. Now when disabled frequency monitor the applet doesn't show anything. It's good to show the active governor at least.
  3. Use them in the notifications and so...
    If we would make just TEXT Labels it'll take too large piece of the system status area.
    Now I'm going to do abbreviations:
    Powersave - POW/PSV/SAV???
    Performance - PER/PRF?
    Ondemand - OND/DMD/DEM?
    Conservative - CON/CSV?
    Schedutil - SCH/STL?
    Interactive - INT/ITR?
    Userspace - USR?
    Eh, even this is not easy.

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

Few JS warnings

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

How can I use it on a mac?

Hi Team,

How can I use this on a mac and underclock my CPU.
Following is my configuration
screen shot 2017-05-13 at 9 06 54 am

Regards,
Nikhil

CPU Loading statistics

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...

Unclear intel pstate behavior

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.

Move preferences to Tweak Tool

I think the preferences (although only one option currently) should be accessed through the tweak tool.

ShellTile has a simple example of that:

2017-04-24-13h56-673x66

2017-04-24-13h56-606x459

Missing icons (or symbols MHz/ GHz)

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.

  • OS: Arch Linux (4.14.15-1-ARCH x86_64)
  • DE: Gnome (gnome-shell 3.26.2)
  • Themes: Arc (for applications and shell) and Papirus (for icons)
  • Fonts: Default (Cantarell Bold and Regular)

What did i try:

  • Create another user (same, problem is system-wide)
  • Compare installed packages (almost same, difference in video drivers)
  • Check installed packages integrity
  • Reinstall Gnome group
  • Check changed system files via pacman (found some, after fixing - no difference)
  • Also tried other fonts and themes

Screenshot:
image

About changing settings.

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.

Info Panel

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.

screenshot from 2017-05-21 14-23-51

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.