GNOME Bugzilla – Bug 159119
use libcpufreq from cpufrequtils in cpufreq applet
Last modified: 2010-01-24 01:07:22 UTC
The new cpufrequtils package (temporary(!) home at http://www.brodo.de/cpufreq/ , latest revision http://www.brodo.de/cpufreq/cpufrequtils-0.1-pre3.tar.bz2 ) includes a libcpufreq library which allows all sorts of cpufreq userspace tools to _not_ worry about using /proc/ or /sys/ files to access information about cpufreq or to set a new CPU frequency. It allows for a shared code base, and much smaller individual tools -- like the former gnome-cpufreq-applet.
Created attachment 34039 [details] [review] an example patch for gnome-cpufreq-applet-0.3.1 The example patch shows how few code is needed for cpufreq information retrieval / setting if cpufrequtils/libcpufreq is used. If native access to /proc and /sys is dropped, much code can be removed as well as the whole cpufreq-select directory, as that tool is superseded by "cpufreq-set" from cpufrequtils.
Do we want external dependancies for this?
With the new code design, we can do it without adding a dependency. We can simply look for libcpufreq in the configure script and create a Monitor based on libcpufreq in run time. If libcpufreq is not detected we'll create a Monitor based on proc, sys, etc. We only have to write a new CPUFreqMonitor, we don't even need to change any line of the applet code. I think we can mark this bug for 2.12
We can do that.
Is libcpufreq included in any distribution yet?
It's included in debian (3.1) and gentoo, at least.
Good news! I'm going to work on it this summer.
Carlos, ping?
Sorry, I've been really busy in the current release cycle, but I haven't forgotten this bug :-P I'll try to work on it ASAP.
hey Dominik! finally I've added support for libcpufreq in both the applet and the selector. Sorry for the really long delay. Better late than never ... Thanks for that great library! :-)