Simple NVidia Info

Plasma 4 Widgets

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

1
Score 74%
Description:

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.

Last changelog:

7 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

7 years ago

I just reported this bug:

https://bugs.kde.org/show_bug.cgi?id=290470

which I think is due to this plasmoid going into a loop.

Report

C

patkoscsaba

7 years ago

Can you give more details (I do not really understand the dump for the link you provided). The plasmoid is so simple that it only does a few grep and sed, nothing else. The only looping code is called by a QT::Timer class. If that is causing the problem, than QT Timer is the problem, or the python bindings...

self.timer = QtCore.QTimer();
self.timer.setInterval(10000);
self.timer.start(10000);
QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self._updatelabel)

Report

mgolden

7 years ago

Another thought is that the loop might have happened when the plamoid was asked to redraw itself. It was covered up when akregator was running and was then uncovered.

Report

C

patkoscsaba

7 years ago

Auto-looping with timer detached:
- 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

7 years ago

I don't have any details beyond what I put in the original ticket. I can't really follow the traceback either, but you can see that when the process was pegged and I killed it this plamoid was in the traceback, so it is very likely that the loop was there. I think that's why they closed the ticket, and claimed that the bug was here.

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

8 years ago

Just wanted to let you know that the plasmoid now runs, which it didn't before.

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

C

patkoscsaba

8 years ago

Your solution is like mine, it is working for you but may not work for others. You base your logic on the fact that the GPUCoreTemp is available AND that the temperature is in the second column. I intentionally avoided using awk in my code specifically to not rely on the position of a string. As I commented yesterday, I know what the problem is for some who doesn't have temperature but I am pretty busy in these days and will probably release an update in weekend.

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

8 years ago

I have Mandriva 2010.2 with kde 4.5.4
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

C

patkoscsaba

8 years ago

OK, very helpful informations. I see the problem and I'll fix it in the coming days. Stay tuned :D

Report

dglent

7 years ago

After the last update 1.2.1 it works fine for me

Thanks :)

Report

C

patkoscsaba

7 years ago

I'm happy I solved your problem. Sorry for the delay, I was very busy in these last months.

Report

cmost

8 years ago

Downloaded the plasmoid, then attempted to add it in the usual manner (from local file.) When I attempt to add the plasmoid I get this error:

"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

C

patkoscsaba

8 years ago

Please download the file, open a console, cd into the directory where you saved the file and try to install it from there with: plasmapkg -i ./Simple-NVidia-Info.asmoid

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

8 years ago

Same problem as the others, 8600M GT, and same output for the commands you asked.
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

8 years ago

How can I apply it?

Report

C

patkoscsaba

8 years ago

Did you install version 1.1? I modified it to read GPUCoreTemp as in the above patch plus added some fallback logic. Since I have both "GPUCoreTemp" and "thermalsensor" on my system I tested with both scenarios and it works.

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

8 years ago

It Works!
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

C

patkoscsaba

8 years ago

I am happy it works :)

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

8 years ago

oh I se...
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

C

patkoscsaba

8 years ago

Hmm ... sorry ... on my system (Mandriva 2010.2 64 bits, KDE 4.5.<something>) the text is smaller than the plasmoid initial size, but I still resized it to fit the width of the other plasmoids I have on the desktop, and it keeps it's size. Strange it does not for you.

Maybe someone else has an idea or somebody can direct me to a tutorial/document on how to fix this.

Report

miguelpino

8 years ago

same here, no temperature
this is an awesome plasmoid but the most important function is not working

"Error parsing query"

Report

C

patkoscsaba

8 years ago

Please someone give me the output of these 2 comments so I can troubleshoot the no temperature problem:
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

8 years ago

sure!
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

8 years ago

Saved the file then tried to simply add it via the add widget from local file dialog. Throws up an error: installation of widget failed! Installed manually but then gives "script initialization error" upon adding to desktop. Running 64 Bit Sabayon Linux with KDE 4.5.4 here.

Report

C

patkoscsaba

8 years ago

Do you have the Python KDE / QT packages installed? Other Python based plasmoids are working for you?

Report

7 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

product-maker kemm Nov 22 2011

product-maker Naproxeno Sep 21 2011

product-maker tcat Aug 30 2011

product-maker floner123 Aug 24 2011

product-maker pavelgejdos Jun 26 2011

product-maker Keksbubi Jun 23 2011

product-maker chazz557 Jun 22 2011

product-maker ethif Jun 09 2011

product-maker deep-z Jun 02 2011

product-maker czarny777 May 19 2011

product-maker vitoubien May 08 2011

product-maker jonas99 Apr 06 2011

product-maker zokl Mar 18 2011

product-maker 64BitRulz Mar 13 2011

product-maker matejv Feb 06 2011

product-maker Ireyon Jan 28 2011

product-maker darthroe Jan 06 2011

product-maker miguelpino Dec 31 2010

product-maker janet Dec 27 2010

product-maker 6 6

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1.2.1
updated May 08 2011
added Dec 27 2010
downloads today
0
page views today 2