
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
This is my first program in Python and I wrote this plasmoid because I did not want to install superkaramba for a NVidia temperature monitor.
This plasmoid is just a few "nvidia-setting --bla-bla-bla | grep bla". It displays card model, opengl and driver versions, video memory and cuda cores, and the current temperature.
It is a very simple plasmoid, it has no settings whatsoever and it updates the temperature reading every 10 seconds. All other text is red only once, at the startup.
I started to write this based on the code from this plasmoid: http://kde-look.org/content/show.php/Very+simple+CPU+temperature?content=121205 so thanks to the author.
My free time is limited, so I do not have any future plans for this, but if you have some ideas you can leave them here. Who knows? Maybe one day I will be a python programmer.
And one more thing, I know you can see the fan speed with nvidia-settings, but I have a fanless video card, so unless someone writes a patch to have an option to show/hide fan speed, I will not add it.
9 years ago
Version 1.2.1
- Fixed (hopefully) the last cases when the plasmoid shown no temperature
Version 1.2
- Fixed problem with plasmoid not loading after install on some machines. Please leave a comment if it still happens.
- Added a very basic icon.
Version 1.1.1
- I forgot to update the version number in the previous release so it had to be manually removed before update. Now it is updated and should install without problem if you have any of the previous versions already installed.
Version 1.1
- added "GPUCoreTemp" as main sensor for reading temperature
- the old "thermalsensor" property works as a fallback
- if nothing works "N/A" is printed to avoid users seeing error messages
Version 1.0
- initial release
9 years ago
Version 1.2.1
- Fixed (hopefully) the last cases when the plasmoid shown no temperature
Version 1.2
- Fixed problem with plasmoid not loading after install on some machines. Please leave a comment if it still happens.
- Added a very basic icon.
Version 1.1.1
- I forgot to update the version number in the previous release so it had to be manually removed before update. Now it is updated and should install without problem if you have any of the previous versions already installed.
Version 1.1
- added "GPUCoreTemp" as main sensor for reading temperature
- the old "thermalsensor" property works as a fallback
- if nothing works "N/A" is printed to avoid users seeing error messages
Version 1.0
- initial release
mgolden
9 years ago
https://bugs.kde.org/show_bug.cgi?id=290470
which I think is due to this plasmoid going into a loop.
Report
patkoscsaba
9 years ago
self.timer = QtCore.QTimer();
self.timer.setInterval(10000);
self.timer.start(10000);
QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self._updatelabel)
Report
mgolden
9 years ago
Report
patkoscsaba
9 years ago
- this is highly unlikely. As far as I understand the timer's working, if it crashes the plasmoid will stop refreshing. Since the timer is the only element that 'generates a loop' periodically, I can see no way to re-run the code outside of the timer.
About contacting plasma devs... Unless I will find out about other people reporting this bug also, I will not take further actions. This may very well be an isolated situation in your case. Plus, if you like this plasmoid, version 2, build on Ruby instead of Python is out, so I recommend using that.
I decided not to remove this one for those people which can not install ruby-plasma-engine for various reasons and prefer the python version.
Unless there is a reproducible (many times in many places) severe bug, I am not planning to further update this version of the plasmoid.
Report
mgolden
9 years ago
Is it possible that the plasmoid somehow got detached from the timer and then looped immediately instead of after a delay?
Perhaps you can e-mail one of the plasma devs to get some help interpreting that trace.
Report
joth666
10 years ago
Just out of curiosity...what was the problem?
I just got a C instead of the temperature though so I changed the code a little to make it work...
I used this in the temp-detection code instead of yours:
sensor=commands.getoutput("nvidia-settings -q [gpu:0]/GPUCoreTemp|grep gpu:0|awk -F'):' '{ print $2 }'");
sensor=sensor.replace(".",unichr(176).encode("latin-1"));
sensor+="C";
Of course, that takes it for granted that reading the GPUCoreTemp will always work.
Report
patkoscsaba
10 years ago
For those of you who don't want to wait, use "rfind" instead of "find" when you are searching for the end period (".").
Report
dglent
10 years ago
instead of the temperature i see a C
[dglent@localhost ~]$ nvidia-settings -q all | grep -i temp
Attribute 'GPUCoreTemp' (localhost.localdomain:0.0): 51.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target types: X Screen, GPU.
Attribute 'GPUCoreTemp' (localhost.localdomain:0[gpu:0]): 51.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target types: X Screen, GPU.
[dglent@localhost ~]$ nvidia-settings -q all | grep -i therm
Attributes queryable via localhost.localdomain:0[thermalsensor:0]:
Attribute 'ThermalSensorReading' (localhost.localdomain:0[thermalsensor:0]): 51.
The valid values for 'ThermalSensorReading' are in the range 0 - 127
'ThermalSensorReading' is a read-only attribute.
'ThermalSensorReading' can use the following target types: Thermal Sensor.
Attribute 'ThermalSensorProvider' (localhost.localdomain:0[thermalsensor:0]): 1.
'ThermalSensorProvider' is an integer attribute.
'ThermalSensorProvider' is a read-only attribute.
'ThermalSensorProvider' can use the following target types: Thermal Sensor.
Attribute 'ThermalSensorTarget' (localhost.localdomain:0[thermalsensor:0]): 1.
'ThermalSensorTarget' is an integer attribute.
'ThermalSensorTarget' is a read-only attribute.
'ThermalSensorTarget' can use the following target types: Thermal Sensor.
[dglent@localhost ~]$
Report
patkoscsaba
10 years ago
Report
dglent
9 years ago
Thanks :)
Report
patkoscsaba
9 years ago
Report
cmost
10 years ago
"This object could not be created for the following reason:
Script initialization failed!"
I'm running Sabayon (Gentoo based) Linux 5.4 64 bit with KDE 4.5.4. Fairly stock.
Report
patkoscsaba
10 years ago
Usually console messages are more detailed and I may be able to fix/modify it to solve your problem, too.
BTW I am running on Mandriva 2010.2 64bits and also on KDE 4.5.4.
Report
anthon38
10 years ago
But here's a(n obvious) patch that works for me (tm)
def _updatelabel(self):
- sensor=commands.getoutput("nvidia-settings -q [thermalsensor:0]/ThermalSensorReading | grep thermalsensor");
- sensor=sensor[sensor.find("):")+2:sensor.find(".")+1];
+ sensor=commands.getoutput("nvidia-settings -q [gpu:0]/GPUCoreTemp | grep gpu:0");
+ sensor=sensor[sensor.find("):")+2:sensor.find(".")];
sensor=sensor.replace(".",unichr(176).encode("latin-1"));
sensor+="C";
Report
miguelpino
10 years ago
Report
patkoscsaba
10 years ago
Just to be sure, uninstall the plasmoid first with this command from a console:
plasmapkg -r Simple-NVidia-Info
Then simply install it again.
Report
miguelpino
10 years ago
thakns for the correction!
really usseful plasmoid.
as suggestions, maybe in the futer you could implement graphical options, f.e. like font size
it would be nice to make the plasmoid even more subtle
good job!
Report
patkoscsaba
10 years ago
As I said in the description of the plasmoid, I do not have the time to make a settings window and options for this.
If there is someone keen to provide a patch I am happy to include it and release it, but I will not invest time into this.
Report
miguelpino
10 years ago
well its ok
but i have another issue, and maybe you have an idea...
I have to rezise the plasmoid so I could see all the info... no problem with that but, when I restart the pc, the size configuration doesn't save and everytime i must resize again
do you (or anybody) have an idea to how to solve this?
thanks!
Report
patkoscsaba
10 years ago
Maybe someone else has an idea or somebody can direct me to a tutorial/document on how to fix this.
Report
miguelpino
10 years ago
this is an awesome plasmoid but the most important function is not working
"Error parsing query"
Report
patkoscsaba
10 years ago
nvidia-settings -q all | grep -i temp
nvidia-settings -q all | grep -i therm
I am getting the temperature from the "thermalsesnor" property of nvidia-settings, maybe some version or card doesn't have this but it has "GPUTemp" property or something similar.
Since I have only one and my own video card to test on, all of you don't having the temperature please answer my request, otherwise I can't help you!
Report
miguelpino
10 years ago
here's mine (the second command doesn't pop up with anything)
miguel@Kubuntu:~$ nvidia-settings -q all | grep -i temp
Attribute 'GPUCoreTemp' (Kubuntu:0.0): 56.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target
Attribute 'GPUCoreTemp' (Kubuntu:0[gpu:0]): 56.
'GPUCoreTemp' is an integer attribute.
'GPUCoreTemp' is a read-only attribute.
'GPUCoreTemp' can use the following target
miguel@Kubuntu:~$ nvidia-settings -q all | grep -i therm
miguel@Kubuntu:~$
Report
cmost
10 years ago
Report
patkoscsaba
10 years ago
Report