Bug 382561 - System Monitor + kernel 4.13 = Shows the wrong processor frequency
Summary: System Monitor + kernel 4.13 = Shows the wrong processor frequency
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
: 386180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-21 07:49 UTC by rооt
Modified: 2017-10-25 20:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot with incorrect frequency (292.16 KB, image/png)
2017-07-21 07:49 UTC, rооt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rооt 2017-07-21 07:49:52 UTC
Created attachment 106774 [details]
Screenshot with incorrect frequency

I updated the kernel and noticed that the frequency shown is incorrect.
The reason may be this https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.13-Power-Management

"- x86 systems will no longer try to export their current CPU frequency to /proc/cpuinfo. There's also a way to rework how the CPU frequency is exported via sysfs too, using the registers for computing the current frequency rather than relying upon the CPUFreq driver. "
Comment 1 mercuriete 2017-09-20 21:27:30 UTC
I can confirm this issue.

ksysguard shows my cpu at highest frequency all the time.

uname -a
Linux localhost.localdomain 4.13.2-gentoo #2 SMP PREEMPT Wed Sep 20 20:40:20 CEST 2017 x86_64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz GenuineIntel GNU/Linux


I used to see ksysguard to figure out if schedutil was working properly or not.

now the only alternative is:

sudo watch cpupower monitor

Thanks in advance.
Comment 2 Fabian Vogt 2017-10-06 12:47:57 UTC
Git commit cbaaf5f4ff54e20cb8ec782737e04d540085e6af by Fabian Vogt.
Committed on 06/10/2017 at 12:47.
Pushed by fvogt into branch 'Plasma/5.8'.

Try to read CPU clock from cpufreq/scaling_cur_freq instead of /proc/cpuinfo

Summary:
>From kernel 4.13 on, /proc/cpuinfo always reports the static normative
CPU clock and not the current one. So try to read the frequency from
cpufreq and only fall back to cpuinfo it that fails.

Test Plan:
Started ksysguard, frequency now changes. If the file is not
readable, the frequency is read from cpuinfo as expected.

Reviewers: #plasma, sebas

Reviewed By: #plasma, sebas

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8153

M  +21   -1    ksysguardd/Linux/cpuinfo.c

https://commits.kde.org/ksysguard/cbaaf5f4ff54e20cb8ec782737e04d540085e6af
Comment 3 mercuriete 2017-10-20 23:05:25 UTC
Thank you very much!

:)
Comment 4 Christoph Feck 2017-10-25 20:06:02 UTC
*** Bug 386180 has been marked as a duplicate of this bug. ***