Hello community, here is the log from the commit of package ksysguard5 for openSUSE:Factory checked in at 2017-10-09 19:39:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ksysguard5 (Old) and /work/SRC/openSUSE:Factory/.ksysguard5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ksysguard5" Mon Oct 9 19:39:52 2017 rev:52 rq:532200 version:5.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ksysguard5/ksysguard5.changes 2017-08-24 18:08:41.402772109 +0200 +++ /work/SRC/openSUSE:Factory/.ksysguard5.new/ksysguard5.changes 2017-10-09 19:39:54.425508808 +0200 @@ -1,0 +2,35 @@ +Fri Oct 6 12:51:16 UTC 2017 - [email protected] + +- Add patch to fix gathering of the CPU clock with kernel >= 4.13 + (boo#1061071, kde#382561): + * 0001-Try-to-read-CPU-clock-from-cpufreq-scaling_cur_freq-.patch + +------------------------------------------------------------------- +Thu Oct 5 12:39:18 CEST 2017 - [email protected] + +- Update to 5.11.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.11.0.php +- Changes since 5.10.95: + * None + +------------------------------------------------------------------- +Thu Sep 14 14:29:05 CEST 2017 - [email protected] + +- Update to 5.10.95 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.10.95.php +- Changes since 5.10.5: + * softraid: Remove dead code and associated warning. + * Properly check if mdraid array is active. + * FreeBSD build fix, v4. + * FreeBSD compile fix, try 3. + * Fix FreeBSD build, try 2. + * Fix build regression on FreeBSD + * Fix compilation with strict libc (such as musl). + * remove extra <nlist.h> include on FreeBSD + * Use Q_DECL_OVERRIDE + +------------------------------------------------------------------- Old: ---- ksysguard-5.10.5.tar.xz New: ---- 0001-Try-to-read-CPU-clock-from-cpufreq-scaling_cur_freq-.patch ksysguard-5.11.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ksysguard5.spec ++++++ --- /var/tmp/diff_new_pack.X6twSt/_old 2017-10-09 19:39:55.037481910 +0200 +++ /var/tmp/diff_new_pack.X6twSt/_new 2017-10-09 19:39:55.041481735 +0200 @@ -18,7 +18,7 @@ %bcond_without lang Name: ksysguard5 -Version: 5.10.5 +Version: 5.11.0 Release: 0 # Full Plasma 5 version (e.g. 5.8.95) %{!?_plasma5_bugfix: %global _plasma5_bugfix %{version}} @@ -28,10 +28,12 @@ License: GPL-2.0 Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/plasma/%{version}/ksysguard-%{version}.tar.xz +Source: ksysguard-%{version}.tar.xz Source1: ksysguardd.service # PATCH-FIX-OPENSUSE 0001-Use-run-for-ksysguardd-s-pid-file.patch Patch0: 0001-Use-run-for-ksysguardd-s-pid-file.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Try-to-read-CPU-clock-from-cpufreq-scaling_cur_freq-.patch BuildRequires: extra-cmake-modules >= 1.5.0 BuildRequires: kf5-filesystem BuildRequires: libsensors4-devel @@ -72,6 +74,7 @@ %prep %setup -q -n ksysguard-%{version} %patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} ++++++ 0001-Try-to-read-CPU-clock-from-cpufreq-scaling_cur_freq-.patch ++++++ >From cbaaf5f4ff54e20cb8ec782737e04d540085e6af Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Thu, 5 Oct 2017 19:11:05 +0200 Subject: [PATCH] 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. BUG: 382561 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 --- ksysguardd/Linux/cpuinfo.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ksysguardd/Linux/cpuinfo.c b/ksysguardd/Linux/cpuinfo.c index 9427ec03..149a3429 100644 --- a/ksysguardd/Linux/cpuinfo.c +++ b/ksysguardd/Linux/cpuinfo.c @@ -56,6 +56,10 @@ static void processCpuInfo( void ) * by the parse thus far */ int coreUniqueId = 0; + /* Indicates whether the "cpu MHz" value of the processor in /proc/cpuinfo should be used. + * This is not done if parsing the frequency from cpufreq worked. */ + int useCpuInfoFreq = 1; + /* Reset global variables */ numCores = 0; numProcessors = 0; @@ -94,8 +98,24 @@ static void processCpuInfo( void ) registerMonitor( cmdName, "float", printCPUxClock, printCPUxClockInfo, CpuInfoSM ); } + + useCpuInfoFreq = 1; + + const char freqTemplate[] = "/sys/bus/cpu/devices/cpu%d/cpufreq/scaling_cur_freq"; + char freqName[sizeof(freqTemplate) + 3]; + snprintf(freqName, sizeof(freqName) - 1, freqTemplate, coreUniqueId); + FILE *freqFd = fopen(freqName, "r"); + if (freqFd) { + unsigned long khz; + if(fscanf(freqFd, "%lu\n", &khz) == 1) { + Clocks[coreUniqueId] = khz / 1000.0f; + useCpuInfoFreq = 0; + } + + fclose(freqFd); + } } - } else if ( strcmp( tag, "cpu MHz" ) == 0 ) { + } else if ( useCpuInfoFreq && strcmp( tag, "cpu MHz" ) == 0 ) { if (HighNumCores > coreUniqueId) { /* The if statement above *should* always be true, but there's no harm in being safe. */ sscanf( value, "%f", &Clocks[ coreUniqueId ] ); -- 2.14.1 ++++++ ksysguard-5.10.5.tar.xz -> ksysguard-5.11.0.tar.xz ++++++ ++++ 14686 lines of diff (skipped)
