0 Replies Latest reply on Feb 6, 2017 8:16 AM by FurretUber

    A small program to set parameters for intel_pstate




      I am using Xubuntu 16.04 on my new notebook and I tried to install the package cpufrequtils to control the processors frequencies, but I noticed it is not functional with newer processors. Due to this, I searched the documentation about and found that is used intel_pstate for this control, but having to become superuser and then echo to a sysfs file every time I wanted to change the configuration was not practical.


      So I decided to develop a small program to change this configuration easily. I named it SklPorcent, from Skylake (which uses intel_pstate) and Porcentagem (Percentage), due to how similar the way to configure the frequency is to.


      SklPorcent is made with MonoDevelop, the language used is C# and the widgets are GTK# 2, I have used the stetic gui maker to make the interface. It is being useful to me both for its function (control the processor's frequency) and to learn about programming. Its source code is at GitHub - FurretUber/SklPorcent: Programa para ler e editar parâmetros das CPUs da Intel que utilizam o intel_pstate.


      There is no need for superuser permission to only read the data, but to change it, superuser permission is required and the third step must return a valid response (details below).


      Here are some screen captures of it. While it is in Portuguese only, I believe it is simple enough to be understood. I don't know how to make C# show the messages depending of the idiom (for now). It shows the maximum frequency of the processor (2,3 GHz), the actual policy (powersave), the maximum percentage and minimum percentage (100% and 17%, respectively), the actual frequency of every thread and the package's temperature. Then there are the entries to insert the percentage of the frequency desired and the buttons to change it. Below there is a check to activate/deactivate turbo and a label which shows relevant information.


      Here is the program's window:


      On this image, it is seen when on system tray (the icon is the same of my avatar).


      Here it is shown what appears when hovering the mouse over the tray icon.


      The only computer I have which it has full functionalities is a Lenovo Ideapad 310, with a Intel Core i3-6100U. I tested the program on a Asus M2400Ne with a Intel Pentium M 1,70 Ghz. I wrote the program such way it would try to read the data in four steps: one for a single core (which the Pentium M is), then one for other 3 threads (the i3-6100U), then the intel_pstate data (the most important step, which defines if something can be changed) and then the temperature (with a fallback to thermal_zone0 if it doesn't find the exact package sysfs file). If some information is not found, it is not shown and a message appears on console (shown in terminal if it was open though terminal).


      I think the turbo configuration is working, but how the i3-6100U don't have turbo, I can't be sure.


      I wrote this program because I wanted to control the temperature the notebook can reach, and one of the best ways to do it is limiting the processor's frequency. If someone wants to try to use it, I would be grateful, especially regarding if the turbo control is working.


      If this is not the place to post about this type of projects, could someone link to me where I can post about it? I posted here because it is very likely there are people that uses computers with Intel's processors on this forum.


      Thank you.