! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Incorrect read of min freq value for CPUs and first read of CPU data from sys...
Status:
RESOLVED: FIXED
Product:
Xfce4-cpufreq-plugin
Component:
General

Comments

Description Josep Lladonosa 2013-08-29 03:45:00 CEST
Created attachment 5131 
patch correcting a max to a min read and optimizing first read of cpu%i directories

Hello,

Firstly, I tracked the source code from xfce4-cpufreq-linux.c because xfce4-cpufreq-plugin was not showing any value for CPU, as the intel freq governor was enabled and it does not follow standard rules to publish its info in sysfs (linux kernel 3.11.0-rc7). After disabling it, the plugin shows data.

As a result I found a small bug when reading sysfs for the CPUs, where code should read 

/sys/devices/system/cpu/cpu%i/cpufreq/scaling_min_freq

(it was reading the max value and should read the min one).


And secondly, I propose a better read of /sys/devices/system/cpu directories. Now it is reading all directories inside. My proposal is to scan only for cpu[0-9]* directories.


I attach the patch for both.

Salutacions,
Josep
Comment 1 Harald Judt 2013-08-29 11:11:10 CEST
Thanks, but if you look at the git repository, you'll see that all these bugs have already been fixed and most of your patches won't even apply anymore. Intel pstate driver is also supported in git. So either build from git or wait for the next release.

Bug #10320

Reported by:
Josep Lladonosa
Reported on: 2013-08-29
Last modified on: 2013-08-29

People

Assignee:
Xfce-Goodies Maintainers
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information