This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CPU frequency plasmoid doesn't work

Tags: None
(comma "," separated)
XiniX
Registered Member
Posts
217
Karma
1
OS

CPU frequency plasmoid doesn't work

Thu Feb 12, 2009 3:52 pm
Well, title says it all. On the same machine, using Arch, it worked. I use the same home folder now under MEPIS and it doesn't. Tried to remove the widget and add it again, and nada.

When opening the settings, I don't even see the presence of a CPU. In the KDE system monitor however I can create sensors that _do_ work, so it looks like a Plasma specific issue to me.

Any ideas?


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
The specific widget in question only uses plasma to render, it does not use plasma or data engines for gathering the information, instead it uses 2.6x standard*afaik* /proc/acpi/processor/CPUXXX and cpufreq-info and cpufreq-set which both require the cpufreq-utils package as well as the kernel cpufreq modules.
If you have any more questions I'll be glad to try and help;.

XiniX wrote:Well, title says it all. On the same machine, using Arch, it worked. I use the same home folder now under MEPIS and it doesn't. Tried to remove the widget and add it again, and nada.

When opening the settings, I don't even see the presence of a CPU. In the KDE system monitor however I can create sensors that _do_ work, so it looks like a Plasma specific issue to me.

Any ideas?
XiniX
Registered Member
Posts
217
Karma
1
OS
Thanks for getting back on this!

I installed cpufreqd (already had cpufrequtils installed) but no dice. As I said, the CPU load can be made visible with the regular KDE system monitor, it's just the plasmoid that doesn't work. I tried it as root, doesn't work either, so it is no security issue I think.


XiniX, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Has cpufreqd been started?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
I don't think you need cpufreqd, mostly the kernel modules.

This is a decent page which describes some of the setup
http://www.redhat.com/docs/wp/performan ... setup.html


My personal setup for an amd turion 64-x2 is as followed (/etc/modules)

(The first one enables scaling, the rest are all governers that allow you to control how it scales, userspace is the one for manually setting the frequency, powersave is awesome for laptops, ondemand is "normal operations")

powernow-k8
cpufreq_conservative
cpufreq_ondemand
cpufreq_powersave
cpufreq_stats
cpufreq_userspace

Instead of powernow-k8 for intel you should want acpi-cpufreq first, if it doesn't work, try p4-clockmod
XiniX
Registered Member
Posts
217
Karma
1
OS
Yes, well, all modules are already loaded, except for the powernow module, which I believe is not necessary anymore. In fact, trying each powernow module throws me an error.

CPU scaling works properly already, so I remain stumped....


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
More information required. Please provide all information requested so I can try to assist you further. Thank you in advance.


Cpu info (cat /proc/cpuinfo)

Cpufrequency scaler version, the ruby one or python one. The python one has logic bugs in it's core that havn't been fixed, where the ruby version has been fixed and does a lot more. Please use the ruby one. Python one is only still on kde-look for reference in case someone wants to try to use it, even though it may even be completely broken for 4.2 now.

And details about your setup will help me to not shoot in the dark. Kernel version specifically.
If they changed the frequency scaling interface in the kernel, a data engine will need to be written to maintain compatibility.

Modules loaded: lsmod | grep cpufreq
Code: Select all
deadc0de@deadc0de-laptop:~/welcome/cpp/build$ lsmod | grep cpufreq
cpufreq_userspace      11396  1
cpufreq_stats          13188  0
cpufreq_powersave       9856  0
cpufreq_ondemand       14988  0
cpufreq_conservative    14600  0
freq_table             12672  3 cpufreq_stats,cpufreq_ondemand,powernow_k8


deadc0de@deadc0de-laptop:~$ uname -a
Linux deadc0de-laptop 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux
------------
try cpufreq-info at the command line, mine reports:
Code: Select all
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 800 MHz - 1.80 GHz
  available frequency steps: 1.80 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 800 MHz and 1.80 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
analyzing CPU 1:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 800 MHz - 1.80 GHz
  available frequency steps: 1.80 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, conservative, performance
  current policy: frequency should be within 800 MHz and 1.80 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.




This is how the ruby script gathers information about the processors, as you can see nothing really special and it interacts directly with the /sys/devices/system/cpu/cpuX/cpufreq/* files
Code: Select all
           def getAvailableCpus()
#               str = `cpufreq-info | grep CPU[' '][0-9]:*`
                str = `ls -d /sys/devices/system/cpu/cpu[0-9]*`
                str = str.split(' ')
                @c.fillcpuListView(str)
#               puts str
                return
           end

            def getAvailableModes( )
                if(!@cavailfreq)
                        @cavailfreq = CpuHelper.new()
                end
                if(@cavailfreq.notSameAsLastCpu(@activeCpu))
                        str = '/sys/devices/system/cpu/cpu%s/cpufreq/scaling_available_frequencies'
                        str = str.sub('%s', @activeCpu.to_s)
                        if (@fpfreqlist != nil)
                                @fpfreqlist.close()
                        end

                        @fpfreqlist = open(str,'r')
                end
                @fpfreqlist.seek(0)
                modearray = Array.new
                for line in @fpfreqlist.read().split(' ')
                        line = line.chomp()
# Copy the original line for the map
                        lineorig = line
                        if(line.length > 6)
                                line = line.slice(0,line.length-4)
                                line.insert(1, ".")
                                line = line + "Ghz"
                        else
                                if(line.length > 4)
                                        line = line.slice(0, line.length-3)
                                        line = line + "Mhz"
                                end
                        end
                        modearray << [line, lineorig]
                end
                @c.fillfreqListViews(modearray)
            end
            def getAvailableGovernors( )
                if(!@cavailgov)
                        @cavailgov = CpuHelper.new()
                end
                if(@cavailgov.notSameAsLastCpu(@activeCpu))
                        str = '/sys/devices/system/cpu/cpu%s/cpufreq/scaling_available_governors'
                        str = str.sub('%s', @activeCpu.to_s)
                        if (@fpgovlist != nil)
                                @fpgovlist.close()
                        end

                        @fpgovlist = open(str, 'r')
                end
                @fpgovlist.seek(0)
                govarray = Array.new
                for line in @fpgovlist.read().split(' ')
                        line = line.chomp()
                        if(line != 'userspace')
                                govarray << line
                        end
                end
                @c.fillgovListViews(govarray)
            end

Last edited by 0xdeadc0de on Sat Feb 14, 2009 3:50 pm, edited 1 time in total.
XiniX
Registered Member
Posts
217
Karma
1
OS
OK, the codeword is ruby.....

Since this is a remaster I did not create myself, it turns out some portions were missing, notably the plasma-scriptengines. Am installing as we speak, and I suppose that will solve the issue. If so, I will mark the thread as solved.

Thanks for sticking with me!!!

EDIT
Darn,no go.

Will gather the info you requested, although it all looked as if it worked OK

Last edited by XiniX on Sat Feb 14, 2009 4:56 pm, edited 1 time in total.


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
Hmm yes, from 4.1-4.2 the api had changed slightly (Not very much) and a new field is required in the desktop file. I wish I could maintain 4.1 versions as well but.. imo.. 4.2 is where it's at, 4.3 will be even better - less hacks and better QT with less bugs.
And I don't have 4.1 installed anymore so even.

I'll stick with it as long as it takes, if we can solve this for you, this thread can then help others in the future if they run into problems :).


XiniX wrote:OK, the codeword is ruby.....

Since this is a remaster I did not create myself, it turns out some portions were missing, notably the plasma-scriptengines. Am installing as we speak, and I suppose that will solve the issue. If so, I will mark the thread as solved.

Thanks for sticking with me!!!

EDIT
Darn,no go.

Will gather the info you requested, although it all looked as if it worked OK
XiniX
Registered Member
Posts
217
Karma
1
OS
OK, here's the whole schebang:

Code: Select all
uname-r
2.6.27-1-mepis-smp

lsmod | grep freq
acpi_cpufreq            8716  1
cpufreq_powersave       3584  0
cpufreq_stats           5764  0
cpufreq_ondemand        8204  1
cpufreq_conservative     7688  0
freq_table              5248  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
cpufreq_userspace       4996  0
processor              34860  4 acpi_cpufreq,thermal

cpufreq-info
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, ondemand, conservative, userspace, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:13.48%, 1.33 GHz:1.04%, 1000 MHz:85.48%  (1806)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, ondemand, conservative, userspace, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:13.48%, 1.33 GHz:1.04%, 1000 MHz:85.48%  (1806)


Don't know really which cpu frequency version I am using. It is 004-2 from the Debian testing repos. Whether it is ruby or python based, no idea.... sorry. If you have any idea how I can find out, I will be glad to give you the info.

Last edited by XiniX on Sat Feb 14, 2009 7:55 pm, edited 1 time in total.


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
Have you tried the one off kde-look? That's always the newest version, also, can you paste the results from this:

ls /sys/devices/system/cpu/cpu0/cpufreq/

Code: Select all
affected_cpus     cpuinfo_max_freq  related_cpus                   scaling_available_governors  scaling_driver    scaling_max_freq  scaling_setspeed
cpuinfo_cur_freq  cpuinfo_min_freq  scaling_available_frequencies  scaling_cur_freq             scaling_governor  scaling_min_freq  stats


Also, can you describe or take a ksnapshot of what happens when you run the applet?

XiniX wrote:OK, here's the whole schebang:

Code: Select all
uname-r
2.6.27-1-mepis-smp

lsmod | grep freq
acpi_cpufreq            8716  1
cpufreq_powersave       3584  0
cpufreq_stats           5764  0
cpufreq_ondemand        8204  1
cpufreq_conservative     7688  0
freq_table              5248  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
cpufreq_userspace       4996  0
processor              34860  4 acpi_cpufreq,thermal

cpufreq-info
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, ondemand, conservative, userspace, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:13.48%, 1.33 GHz:1.04%, 1000 MHz:85.48%  (1806)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0 1
  hardware limits: 1000 MHz - 1.67 GHz
  available frequency steps: 1.67 GHz, 1.33 GHz, 1000 MHz
  available cpufreq governors: powersave, ondemand, conservative, userspace, performance
  current policy: frequency should be within 1000 MHz and 1.67 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz (asserted by call to hardware).
  cpufreq stats: 1.67 GHz:13.48%, 1.33 GHz:1.04%, 1000 MHz:85.48%  (1806)


Don't know really which cpu frequency version I am using. It is 004-2 from the Debian testing repos. Whether it is ruby or python based, no idea.... sorry. If you have any idea how I can find out, I will be glad to give you the info.

Last edited by 0xdeadc0de on Sat Feb 14, 2009 8:14 pm, edited 1 time in total.
XiniX
Registered Member
Posts
217
Karma
1
OS
OK, here we go.

The snapshot:
Image

And the code:
Code: Select all
ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus     cpuinfo_min_freq  scaling_available_frequencies  scaling_driver    scaling_min_freq
cpuinfo_cur_freq  ondemand          scaling_available_governors    scaling_governor  scaling_setspeed
cpuinfo_max_freq  related_cpus      scaling_cur_freq               scaling_max_freq  stats


I'll check out the one on kdelook.org

Thanks again...


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
Oh wow haha, we were talking about different plasmoids the entire time. I was talking about the scaler applet that lets you monitor your frequency and change it along with the governor.

I would assume that one requires a dataengine that's not running.

XiniX wrote:OK, here we go.

The snapshot:
Image

And the code:
Code: Select all
ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus     cpuinfo_min_freq  scaling_available_frequencies  scaling_driver    scaling_min_freq
cpuinfo_cur_freq  ondemand          scaling_available_governors    scaling_governor  scaling_setspeed
cpuinfo_max_freq  related_cpus      scaling_cur_freq               scaling_max_freq  stats


I'll check out the one on kdelook.org

Thanks again...
XiniX
Registered Member
Posts
217
Karma
1
OS
ROFL.... I assumed something like that when I went to look on kde-look.org and did not find it, but another one...

Good jokes are hard to find these days!!!!

Hope I didn't ruin your day.

I'll check out the other one....


XiniX, proud to be a member of KDE forums since 2008-Oct.
0xdeadc0de
Registered Member
Posts
7
Karma
0
OS
I honetly hope I didn't ruin yours :P. Hmm, the other one (The one I was talking about :P) doesn't show any chart of what it was, just the current speed.
I'd personally ask in #plasma and maybe #kde on freenode on how to get the proper data-engine running for that particular applet :). *If I knew, I'd tell you now, sorry*

(I would also personally specify the frequency graph applet next time though to avoid confusion from people like me haha)



XiniX wrote:ROFL.... I assumed something like that when I went to look on kde-look.org and did not find it, but another one...

Good jokes are hard to find these days!!!!

Hope I didn't ruin your day.

I'll check out the other one....


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]