plasmaCpuFreqUtility

Plasma 4 Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

5
7 .8
Description:

Simple plasmoid for change frequencies of processors, enabling or disabling them.
Plasmoid needs polkit-1, d-bus.
May need to configure SELinux.

Dependencies:
PyQt4
PyKDE4

Installation:
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .
make
su -c 'make install'
(building correct for Fedora)
Last changelog:

8 years ago

v.1.4.1 :
fixed cpu info store to dict;

v.1.5 (final):
some fixes;

v.1.6 :
added 'First For All' mode setting;

gzu

9 years ago

Hi,

Thanks for the update, please see output below, the plasmoid still fails.

Thanks for the help,

gzu



2 6 : ['0', '5']
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init
self.pyapplet.init()
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 137, in init
self.ProcData = define_proc_data()
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 100, in define_proc_data
print [(i, procData['online'][i].data()[QString('contents')].toString()) for i in xrange(COUNT_PROC)]
KeyError: 1

Report

C

F1ash

9 years ago

Sorry, I hurried. Try version (e).

Report

gzu

9 years ago

Hi,

More debugging I'm afraid.

Thanks,

gzu

2 6 : ['0', '5']
[(PyQt4.QtCore.QString(u'0'), PyQt4.QtCore.QString(u'default')), (PyQt4.QtCore.QString(u'5'), PyQt4.QtCore.QString(u'1\n'))]
0 1 disable in BIOS
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init
self.pyapplet.init()
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 138, in init
self.Control = ControlWidget(self.ProcData, self, os.path.dirname(self.iconPath))
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 289, in __init__
currGovernorIdx = availableGovernors.indexOf(currentGovernor)
AttributeError: 'list' object has no attribute 'indexOf'

Report

C

F1ash

9 years ago

Hmmm... It`s strange bug. I make some fixes. Try versin (f).

Report

C

F1ash

9 years ago

I do not understand correctly the data from the files. Plasmoid have to adjust again.

Report

C

F1ash

9 years ago

I`ll try find lager icons.
Cores (1-4) are not represented in your system.
See for:
/sys/devices/system/cpu/present
0-5 -- in your file?
and
/sys/devices/system/cpu/possible
0-5 -- ?
If this really, then your cores disabled in BIOS, because system can`t define them. Therefore there is not exist a files for programly management.

Report

gzu

9 years ago

Here is the screenshot

http://i56.tinypic.com/34hvz89.jpg

Also the icon is very small on a small dock comapared with the other icons.

Thanks,

gzu

Report

gzu

9 years ago

Hi,

The plasmoid is now starting up see output below

plasmoidviewer(28685)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
plasmoidviewer(28685)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
2 6 : ['0', '5']
[(PyQt4.QtCore.QString(u'0'), PyQt4.QtCore.QString(u'default')), (PyQt4.QtCore.QString(u'5'), PyQt4.QtCore.QString(u'1\n'))]
1 0 : online
0 1 disable in BIOS
0 2 disable in BIOS
0 3 disable in BIOS
0 4 disable in BIOS
1 5 : online

However it seems that I only have control over the first and last CPU, there are no options for minfreq and maxfreq for CPUs 1-4.

Thanks for the help,

gzu

Report

C

F1ash

9 years ago

Try new version (d).

Report

C

F1ash

9 years ago

I`m fixed issue. Try update the source.

Report

gzu

9 years ago

Hi,

Has the code been updated it looks like I'm getting the same errors. I have a 6 core CPU.



plasmoidviewer(4741)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
plasmoidviewer(4741)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 75, in init
self.pyapplet.init()
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 138, in init
self.Control = ControlWidget(self.ProcData, self, os.path.dirname(self.iconPath))
File "/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py", line 262, in __init__
enabled = int(self.ProcData['online'][i].data()[QString('contents')].toString().replace('\n', ''))
KeyError: 1


Thanks for helping,

gzu

Report

C

F1ash

9 years ago

Try to sure that a code changed in path:
/usr/share/kde4/apps/plasma/plasmoids/kde-plasma-cpufrequtility/contents/code/main.py

now in line 98-99 :
procData['online'] = {}
for i in present : procData['online'][int(i)] = readCpuData(str(i), 'online')

If code is changed, but a bug is stay, then I will make the debug-version for you.

Report

gzu

9 years ago

Hi,

This looks the same to me

procData['online'] = {}
for i in present : procData['online'][int(i)] = readCpuData(str(i), 'online')

Thanks,

gzu

Report

C

F1ash

9 years ago

How much you have active core of processor?

Report

cialdo99

9 years ago

Hi, after installing your plasmoid, I've this message error:
"This object could not be created for the following reason: Script initialization failed"

Running on plasmoidviewer:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: File o directory non esistente
QFileSystemWatcher: failed to add paths: /home/cialdo/.config/ibus/bus
plasmoidviewer(5836)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
plasmoidviewer(5836)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 65, in init
self.pyapplet = self.module.__dict__[basename].CreateApplet(None)
AttributeError: 'module' object has no attribute 'CreateApplet'
QMetaObject::invokeMethod: No such method Plasma::IconWidget::toolTipAboutToShow()
QMetaObject::invokeMethod: No such method Plasma::IconWidget::toolTipHidden()
TypeError: invalid result type from PythonAppletScript.contextualActions()

There is any way to solve?

Report

C

F1ash

9 years ago

Try to verify the installation of the plasmoid.
Let result, please.
It is a pathtree of plasmoid:
http://fpaste.org/UEz7/

IBus can not interfere with the plasmoid, but try restart it (IBus) and then run plasmoid (or in plasmoidviewer).

Report

cialdo99

9 years ago

searching that error, seems there is the same problem in google translator
http://kde-apps.org/content/show.php/Google+Translator?content=113890&PHPSESSID=9be063ccd5e157ba1950db79f9bac18c

What kde version do you have installed?

I'm running on Kubuntu 11.04 kde 4.6.2 qt 4.7.2

Report

C

F1ash

9 years ago

On my system : KDE 4.6.5 && PyQt4 4.8.3

Report

9

robyshot

9 years ago

i successfully compiled the plasmoid (for the last step i used sudo make install)but when i place the plasmoid i get this error:

This object could not be created for the following reason:
Can't open the package kde-plasma-cpufrequtility requested by the object CPUFreq Utility.

Report

C

F1ash

9 years ago

This means that in your System plasmoids installed differently as in Fedora.

Report

9

unikum111

9 years ago

Do you have to support your plaosmoid just for Fedora?
For exmaple, Arch Linux has different paths and it have not SELinux.

How can I patch the source code to get the correct paths?

Report

C

F1ash

9 years ago

Necessary to clarify:
path to install the system Plasmoids
(like these:
/usr/share/kde/apps/plasma/plasmoids/<plasmoid-name>
/usr/share/kde4/apps/plasma/plasmoids/<plasmoid-name>
)
path to install cpu_freq_helper
(either:
/usr/local/lib{64}/kde4/libexec -- default path
/usr/libexec/kde4 -- for Fedora)

For example, default install pathtree:
http://fpaste.org/ez0X/

see for:
http://techbase.kde.org/Development/Tutorials/KAuth/Helper_HowTo#Needed_macros_and_CMake

But org.freedesktop.auth.cpufrequtility.conf not running d-bus client in Fedora for default path. And using /usr/local directory not preferably in Fedora. So, you can change CMakeLists.txt according to the documentation (Needed_macros_and_CMake). This should not be very difficult.

plasmoid pathtree:
http://fpaste.org/UEz7/

If you find out exactly the way for the plasmoids, then I will help you fix the CMakeLists.txt .

Report

9

unikum111

9 years ago

My system have not libexec directory. Following paths are used:
/usr/lib/kde4/
/usr/share/apps/<plasmoid name>
/usr/share/config/
/usr/share/kde4/services/
All libs in /usr/lib/kde4/ have '.so' extention.

Report

C

F1ash

9 years ago

http://paste.ubuntu.com/680526
http://paste.ubuntu.com/680527
(sorry, fpaste.org periodically refuses)

Load new source (1.4.1) and change CMakeLists and metadata.desktop

Icons in plasmoid must absent, but let result.

Report

3

stathisq

9 years ago

unikum111
I have installed your AUR package but I'm still getting the error above...

Report

8 years ago

v.1.4.1 :
fixed cpu info store to dict;

v.1.5 (final):
some fixes;

v.1.6 :
added 'First For All' mode setting;

12345678910
114
product-maker mirkogennari Dec 02 2016 9 excellent
product-maker Kaktuss May 02 2014 9 excellent
product-maker grusta May 17 2013 9 excellent
product-maker schleby Mar 12 2012 9 excellent
product-maker nowsy Mar 12 2012 9 excellent
product-maker Deathmachine Mar 07 2012 9 excellent
product-maker warrob Feb 21 2012 9 excellent
product-maker pars1938 Dec 21 2011 9 excellent
product-maker freemanoid Nov 09 2011 9 excellent
product-maker stathisq Oct 10 2011 3 bad
product-maker Hanau2010 Sep 18 2011 9 excellent
product-maker tritemius Sep 02 2011 9 excellent
product-maker TommyCZ Sep 01 2011 9 excellent
product-maker robyshot Aug 29 2011 9 excellent
product-maker unikum111 Aug 29 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
Kaktuss
May 02 2014
dmnmsc
May 04 2013
Deathmachine
Mar 11 2012
gzu
Sep 20 2011
TommyCZ
Sep 01 2011
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.6
updated Mar 12 2012
added Aug 29 2011
downloads 24h
0
mediaviews 24h 0
pageviews 24h 11