Open zaps166 opened 8 years ago
Please file separate bug reports about each issue - makes it easier for us to track and handle.
Ok, this is done.
Same issue here. Stuck at 500mhz (for every CPU) while cpupower freauency-info
shows the correct value.
I can't reproduce this - but I have an old CPU, Core 2 Duo...
Ok, I know what is wrong! "intel_pstate" is not supported by this applet, so that why it doesn't work. I switched to "acpi-cpufreq" (intel_pstate=disable in kernel command line) and it works properly (but it should really be able to show entire CPU in one, especially if you want to change governor... https://github.com/mate-desktop/mate-applets/issues/174). @monsta: hmm, C2D is too old for this driver, so it will be difficult to fix it without testing...
found a kernel doc about intel_pstate https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt Looks like SandyBridge procs support intel_pstate.
@raveit65: Yes, Sandy Bridge and newer CPUs.
Ok, I suspected that... so I need to upgrade my system or buy some modern laptop :smile:
I looked here: https://github.com/mate-desktop/mate-applets/blob/master/cpufreq/src/cpufreq-monitor-sysfs.c#L67
and I looked also to this virtual directory, e.g. into "scaling_cur_freq" file - the value changes while I'm pressing "F5" in text editor (intel_pstate), but applet shows only 1,60 (without unit). Maybe this is a simple bug to fix?
Interesting. But is 1.60 a valid value for that processor (e.g. for minimum frequency)?
Also check what's in this file:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
My system has ondemand
setting there. It's also displayed in the tooltip of the applet.
In:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
I have powersave or performance (depending on chosen governor).
On Powersave the applet shows 1.6GHz, on Performance - 4.1GHz (Turbo + OC in UEFI/BIOS). But both of them dynamically changes the clock in range 1.6GHz - 4.1GHz. On performance the time/threshold is lower than powersave - that is the difference on "intel_pstate" (AFAIK). Applet shows only one value (the lowest for powersave, the highest for performance). I can change the governor by applet in "intel_pstate" - so this works properly.
Ok, thanks, it's more clear to me now. So, the code does the same thing it always did before:
if (g_ascii_strcasecmp (governor, "userspace") == 0) {
path = g_strdup_printf (CPUFREQ_SYSFS_BASE_PATH,
cpu, monitor_sysfs_files[SCALING_SETSPEED]);
} else if (g_ascii_strcasecmp (governor, "powersave") == 0) {
path = g_strdup_printf (CPUFREQ_SYSFS_BASE_PATH,
cpu, monitor_sysfs_files[SCALING_MIN]);
} else if (g_ascii_strcasecmp (governor, "performance") == 0) {
path = g_strdup_printf (CPUFREQ_SYSFS_BASE_PATH,
cpu, monitor_sysfs_files[SCALING_MAX]);
} else { /* Ondemand, Conservative, ... */
path = g_strdup_printf (CPUFREQ_SYSFS_BASE_PATH,
cpu, monitor_sysfs_files[SCALING_CUR_FREQ]);
}
Basically, it only reads scaling_cur_freq
file when the governor is set to ondemand
(to be precise, when it's not userspace
or powersave
or performance
). I've looked upstream (in gnome-applets) - the code is the same there too.
As far as I can remember performance runs at max. speed, powersave runs at min. speed and ondemand(and similar) dynamically scales the CPU on acpi-cpufreq. Modern governors can dynamically change the CPU frequency and them may have different names. For me it should do an update on every governor or leave it as is for acpi-cpufreq and for other - always read current frequency.
intel_pstate doesn't allow the ondemand governor. It only allows powersave and performance. Yet, even if powersave is active, intel_pstate will still allow the CPU to run at max speed (even turbo).
I'd also like to see the cpufreq applet to work with intel pstate. That driver will be active on all modern systems (like my laptop). Also, the cpupower command is able to show correct CPU frequencies.
Ok, I see the problem. Looks like the logic in the code needs to be adjusted for pstate.
I noticed that the cpufreq applet works with intel_pstate in Ubuntu 15.10 (MATE 1.12) but not on my Gentoo (MATE 1.13).
Not sure if it might be related, but Debian/Ubuntu builds use cpufreq library as cpupower library isn't available...
Running mate-applets 1.14.0 on gentoo, using an Ivy Bridge processor with intel_pstate powersave governor. It always shows the cores at 1.6GHz, when the cores vary from 1.6-3.8 depending on load according to cpupower frequency-info.
It works for me with latest git version.
Works with which Intel CPU?
Yes I have an i3-5010U. Previously I was using my distro package which didn't work, then I've tried the github version and it works. The applet seem to correctly show frequency changes, I've compared them with those reported by /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
and they seem ok.
Output of cpupower frequency-info
:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 500 MHz - 2.00 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 500 MHz and 2.00 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: 800 MHz (asserted by call to hardware)
boost state support:
Supported: no
Active: no```
Maybe a different value for --with-cpufreq-lib
option is used now?
I'm on Intel Core i7-6500U and I experience the same problem: I'm only able to set govenor to either "performance" or "powersave" and in either case the applet only displays max or min frequency, respectively.
It seems to me that the solution should be rather simple: always read SCALING_CUR_FREQ instead of having special cases for "performance", "powersave", nor even for "userspace" like:
https://github.com/ericfont/mate-applets/commit/29d6e2309c394ee222f5d115b10463e07e0e2ac7
I experience the same problem: using intel_pstate driver, with "powersave" governor it always shows the minimum CPU Frequency, and with "performance" the applet will display max Frequency.
Maybe this is the problem:
$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 500 MHz - 1.90 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 500 MHz and 1.90 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 891 MHz (asserted by call to kernel)
boost state support:
Supported: no
Active: no
but if i grep from /proc/cpuinfo, the correct CPU Mhz is there;
$ grep "cpu MHz" /proc/cpuinfo
cpu MHz : 1599.576
cpu MHz : 1707.923
cpu MHz : 1694.300
cpu MHz : 1528.936
I've got i7 3770k CPU and intel_pstate driver at powersave governor. The cpufreq applet shows always 1.6GHz, but the CPU frequency is changing during CPU load.