NvThermometer Screenlet

Conky

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
NvThermometerScreenlet is a network-based information
utility for Nvidia GPUs. It reports various data available
from the NV-CONTROL X extension, including temperatures
if available. It uses no helper apps and is very fast.
Multiple GPU's displayed if present. It is fully color
configurable and looks like a shaded widget. It has a
number of pre-defined color themes, and can use an
image to tile the background.

install it with the screenlets manager,
or just unzip it in your .screenlets
folder
Last changelog:

CHANGELOG
v0.3 bug fixes, new design
*reports a couple of new values
*combines everything into 1 window, including multi-gpu
*better error handling
*renders offscreen, faster
*background tile image option. several tiles in screenlet dir.
*select the window and press shift-s (S) to save a pic
*got the themes tamed, now loads option settings from the ini

fixed the NV-CONTROL bugs (i think). thorough
checks for attribute readablility/presence are done.
should make it work much better on average. at least
it will run if your GPU doesn't support this or that.

v0.2 new features and a bugfix 7-8-2008
new and improved! i can't tell wizzo butter from a dead crab!
had to review the screenlets base class to add
new features. good thing too, i noticed a few things that
i could do better using newer screenlets.
so it's faster now, and uses less memory. guess i oughta
pay more attention ...
anyway, fixed the logic error aantn found (ty). it should
now display the error message instead of exiting with an
exception if no NV-CONTROL is found.
also added color themes as suggested by aantn. ty, good idea!
now u can select from a set of pre-defined color themes,
and u still have complete color control to tweak it if u
like. SVGlive! makes life easier for users.
added options to make the thermometer display ambient
instead of core temperature, alpha controls for higlights
and shadows, and a switch to toggle the lower display
between clock speed and the GPU product name. mine
returns 'Unknown' for the name, so i dressed that one
up a little. if it's not unknown, u get the string
as it comes from NV-CONTROL.

drxnele found a nasty bug (ty) that looks like a bad
return value from NV-CONTROL. either the X module isn't
working right, or the nvctrl module. i'll try to get
that squashed asap and release 0.2.1 when/if i can fix that.
if you've found errors or crazy behavior, PLEASE TELL ME!
got an idea? post it! find a bug? please include the output from:
'nvidia-settings -q all'
in your report, it'll save time. u may want to mail that, it'll
be a couple of screens long

v0.1 beta release 7-4-2008
simple implementation. might add some features later on.
i just wanted to get it out so we can start finding the
bugs. the icon is lame, (made it while testing) etc. one
thing i'm concerned about is how it gets along with the
X C bindings pkg that's part of Xorg now. it works on my
Xorg, which has xcb, so it should be okay, but let's
make sure


Ratings & Comments

8 Comments

pstephen

I get the following trace when I try to start NvThermometer. Hope this helps. CachingBackend: Loading instances from cache Found a running session of NvThermometer, adding new instance by service. Error in screenlets.services.get_service_by_name: org.freedesktop.DBus.Error.ServiceUnknown: The name org.screenlets.NvThermometer was not provided by any .service files Screenlet has already been added to /tmp/screenlets/screenlets.smurphy.running Loading instances in: /home/smurphy/.config/Screenlets/NvThermometer/default/ No instance(s) found in session-path, creating new one. /home/smurphy/.config/Screenlets/NvThermometer/default/NvThermometer1 Traceback (most recent call last): File "/home/smurphy/.screenlets/NvThermometer/NvThermometerScreenlet.py", line 446, in <module> screenlets.session.create_session(NvThermometerScreenlet) File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 472, in create_session session.start() File "/usr/lib/python2.5/site-packages/screenlets/session.py", line 254, in start sl.finish_loading() File "/usr/lib/python2.5/site-packages/screenlets/__init__.py", line 1243, in finish_loading self.on_init() File "/home/smurphy/.screenlets/NvThermometer/NvThermometerScreenlet.py", line 220, in on_init self.ngpu ).strip() File "/home/smurphy/.screenlets/NvThermometer/nvctrl.py", line 350, in get_GPU_name NV_CTRL_TARGET_TYPE_GPU, 0, NV_CTRL_STRING_PRODUCT_NAME ) File "/home/smurphy/.screenlets/NvThermometer/nvctrl.py", line 284, in query_string_attribute return NVCtrlQueryStringAttributeReply( binrp ) File "/home/smurphy/.screenlets/NvThermometer/nvctrl.py", line 242, in __init__ minx.XData('STRING8',self.n,'string') ) File "/home/smurphy/.screenlets/NvThermometer/minx.py", line 128, in decode rdict[arg.value] = struct.unpack( structcode, data[:sz] )[0] File "/usr/lib/python2.5/struct.py", line 87, in unpack return o.unpack(s) struct.error: unpack requires a string argument of length 20

HarrySnapperOrgans

this is the same dumbass mistake drxnele found, lol. i'm not checking for the existence of that string, and it came back empty. sorry guys, i just kinda whipped this one out as a front-end for my python NV-CONTROL module. i'll clean it up to get rid of these things and be back with a better version soon. i'll make the new one display all sorts of stuff so it'll at least be useful to most ppl. thanks for the bug report, i'm on it.

drxnele

i think my gf 5200 is hotter then Sun :) something is wrong... my card is gigabyte gforce FX5200

HarrySnapperOrgans

yeah, i'd say that's a fair statement ;) unless, of course, u live on the planet Mercury? rofl! i'd like to see the output from 'nvidia-settings -q all' please. that will hopefully give me an idea of what's going on here. it just lists most everything NV-CONTROL knows. it'll at least tell me if i got the wrong number format or sumthin. if you've got the time, post that output or send it to me. thanks for the feedback!

drxnele

drxnele@Burgulos:~$ nvidia-settings -q all Attributes for Burgulos:0.0: Attribute 'DigitalVibrance' (Burgulos:0.0; display device: CRT-0): 0. The valid values for 'DigitalVibrance' are in the range 0 - 63 (inclusive). 'DigitalVibrance' is display device specific. 'DigitalVibrance' can use the following target types: X Screen, GPU. Attribute 'ImageSharpening' (Burgulos:0.0; display device: CRT-0): 0. The valid values for 'ImageSharpening' are in the range 0 - 31 (inclusive). 'ImageSharpening' is display device specific. 'ImageSharpening' can use the following target types: X Screen, GPU. Attribute 'BusType' (Burgulos:0.0): 0. The valid values for 'BusType' are in the range 0 - 3 (inclusive). 'BusType' is a read-only attribute. 'BusType' can use the following target types: X Screen, GPU. Attribute 'BusRate' (Burgulos:0.0): 8. The valid values for 'BusRate' are in the range 1 - 8 (inclusive). 'BusRate' is a read-only attribute. 'BusRate' can use the following target types: X Screen, GPU. Attribute 'VideoRam' (Burgulos:0.0): 131072. 'VideoRam' is an integer attribute. 'VideoRam' is a read-only attribute. 'VideoRam' can use the following target types: X Screen, GPU. Attribute 'Irq' (Burgulos:0.0): 20. 'Irq' is an integer attribute. 'Irq' is a read-only attribute. 'Irq' can use the following target types: X Screen, GPU. Attribute 'OperatingSystem' (Burgulos:0.0): 0. The valid values for 'OperatingSystem' are in the range 0 - 2 (inclusive). 'OperatingSystem' is a read-only attribute. 'OperatingSystem' can use the following target types: X Screen, GPU. Attribute 'SyncToVBlank' (Burgulos:0.0): 0. 'SyncToVBlank' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'SyncToVBlank' can use the following target types: X Screen. Attribute 'AllowFlipping' (Burgulos:0.0): 1. 'AllowFlipping' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'AllowFlipping' can use the following target types: X Screen. Attribute 'LogAniso' (Burgulos:0.0): 0. The valid values for 'LogAniso' are in the range 0 - 3 (inclusive). 'LogAniso' can use the following target types: X Screen. Attribute 'FSAA' (Burgulos:0.0): 0. Valid values for 'FSAA' are: 0, 1, 2, 5, 6, 7, 8 and 9. 'FSAA' can use the following target types: X Screen. Attribute 'TextureSharpen' (Burgulos:0.0): 0. 'TextureSharpen' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'TextureSharpen' can use the following target types: X Screen. Attribute 'TwinView' (Burgulos:0.0): 0. 'TwinView' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'TwinView' is a read-only attribute. 'TwinView' can use the following target types: X Screen. Attribute 'ConnectedDisplays' (Burgulos:0.0): 0x00000103. 'ConnectedDisplays' is a bitmask attribute. 'ConnectedDisplays' is a read-only attribute. 'ConnectedDisplays' can use the following target types: X Screen, GPU. Attribute 'EnabledDisplays' (Burgulos:0.0): 0x00000001. 'EnabledDisplays' is a bitmask attribute. 'EnabledDisplays' is a read-only attribute. 'EnabledDisplays' can use the following target types: X Screen, GPU. Attribute 'AssociatedDisplays' (Burgulos:0.0): 0x00000001. 'AssociatedDisplays' is a bitmask attribute. 'AssociatedDisplays' can use the following target types: X Screen. Attribute 'Depth30Allowed' (Burgulos:0.0): 0. 'Depth30Allowed' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'Depth30Allowed' is a read-only attribute. 'Depth30Allowed' can use the following target types: X Screen, GPU. Attribute 'ForceGenericCpu' (Burgulos:0.0): 0. 'ForceGenericCpu' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'ForceGenericCpu' can use the following target types: X Screen. Attribute 'GammaCorrectedAALines' (Burgulos:0.0): 0. 'GammaCorrectedAALines' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'GammaCorrectedAALines' can use the following target types: X Screen. Attribute 'CursorShadow' (Burgulos:0.0): 0. 'CursorShadow' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'CursorShadow' can use the following target types: X Screen. Attribute 'CursorShadowXOffset' (Burgulos:0.0): 4. The valid values for 'CursorShadowXOffset' are in the range 0 - 32 (inclusive). 'CursorShadowXOffset' can use the following target types: X Screen. Attribute 'CursorShadowYOffset' (Burgulos:0.0): 2. The valid values for 'CursorShadowYOffset' are in the range 0 - 32 (inclusive). 'CursorShadowYOffset' can use the following target types: X Screen. Attribute 'CursorShadowAlpha' (Burgulos:0.0): 64. The valid values for 'CursorShadowAlpha' are in the range 0 - 254 (inclusive). 'CursorShadowAlpha' can use the following target types: X Screen. Attribute 'CursorShadowRed' (Burgulos:0.0): 0. The valid values for 'CursorShadowRed' are in the range 0 - 255 (inclusive). 'CursorShadowRed' can use the following target types: X Screen. Attribute 'CursorShadowGreen' (Burgulos:0.0): 0. The valid values for 'CursorShadowGreen' are in the range 0 - 255 (inclusive). 'CursorShadowGreen' can use the following target types: X Screen. Attribute 'CursorShadowBlue' (Burgulos:0.0): 0. The valid values for 'CursorShadowBlue' are in the range 0 - 255 (inclusive). 'CursorShadowBlue' can use the following target types: X Screen. Attribute 'FSAAAppControlled' (Burgulos:0.0): 1. 'FSAAAppControlled' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'FSAAAppControlled' can use the following target types: X Screen. Attribute 'LogAnisoAppControlled' (Burgulos:0.0): 1. 'LogAnisoAppControlled' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'LogAnisoAppControlled' can use the following target types: X Screen. Attribute 'RefreshRate' (Burgulos:0.0; display device: CRT-0): 60.17 Hz. 'RefreshRate' is an integer attribute. 'RefreshRate' is a read-only attribute. 'RefreshRate' is display device specific. 'RefreshRate' can use the following target types: X Screen, GPU. Attribute 'InitialPixmapPlacement' (Burgulos:0.0): 1. The valid values for 'InitialPixmapPlacement' are in the range 0 - 4 (inclusive). 'InitialPixmapPlacement' can use the following target types: X Screen. Attribute 'DynamicTwinview' (Burgulos:0.0): 1. 'DynamicTwinview' is an integer attribute. 'DynamicTwinview' is a read-only attribute. 'DynamicTwinview' can use the following target types: X Screen. Attribute 'MultiGpuDisplayOwner' (Burgulos:0.0): 0. 'MultiGpuDisplayOwner' is an integer attribute. 'MultiGpuDisplayOwner' is a read-only attribute. 'MultiGpuDisplayOwner' can use the following target types: X Screen. Attribute 'GPUErrors' (Burgulos:0.0): 0. 'GPUErrors' is an integer attribute. 'GPUErrors' is a read-only attribute. 'GPUErrors' can use the following target types: X Screen. Attribute 'GvoSupported' (Burgulos:0.0): 0. 'GvoSupported' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false). 'GvoSupported' is a read-only attribute. 'GvoSupported' can use the following target types: X Screen. Attribute 'OpenGLImageSettings' (Burgulos:0.0): 1. The valid values for 'OpenGLImageSettings' are in the range 0 - 3 (inclusive). 'OpenGLImageSettings' can use the following target types: X Screen. Attribute 'XVideoTextureSyncToVBlank' (Burgulos:0.0): 1. The valid values for 'XVideoTextureSyncToVBlank' are in the range 0 - 1 (inclusive). 'XVideoTextureSyncToVBlank' can use the following target types: X Screen. Attribute 'XVideoBlitterSyncToVBlank' (Burgulos:0.0): 0. The valid values for 'XVideoBlitterSyncToVBlank' are in the range 0 - 1 (inclusive). 'XVideoBlitterSyncToVBlank' can use the following target types: X Screen. Attribute 'XVideoSyncToDisplay' (Burgulos:0.0): 0x00000001. 'XVideoSyncToDisplay' is a bitmask attribute. 'XVideoSyncToDisplay' can use the following target types: X Screen. Attribute 'GPUDefault2DClockFreqs' (Burgulos:0.0): 250,400. 'GPUDefault2DClockFreqs' is a packed integer attribute. 'GPUDefault2DClockFreqs' is a read-only attribute. 'GPUDefault2DClockFreqs' can use the following target types: X Screen, GPU. Attribute 'GPUDefault3DClockFreqs' (Burgulos:0.0): 250,400. 'GPUDefault3DClockFreqs' is a packed integer attribute. 'GPUDefault3DClockFreqs' is a read-only attribute. 'GPUDefault3DClockFreqs' can use the following target types: X Screen, GPU. Attribute 'GPU2DClockFreqs' (Burgulos:0.0): 250,400. The valid values for 'GPU2DClockFreqs' are in the ranges 62 - 500, 100 - 1000 (inclusive). 'GPU2DClockFreqs' can use the following target types: X Screen, GPU. Attribute 'GPU3DClockFreqs' (Burgulos:0.0): 250,400. The valid values for 'GPU3DClockFreqs' are in the ranges 62 - 500, 100 - 1000 (inclusive). 'GPU3DClockFreqs' can use the following target types: X Screen, GPU. Attribute 'GPUCurrentClockFreqs' (Burgulos:0.0): 250,400. 'GPUCurrentClockFreqs' is a packed integer attribute. 'GPUCurrentClockFreqs' is a read-only attribute. 'GPUCurrentClockFreqs' can use the following target types: X Screen, GPU. Attribute 'GPUPerfModes' (Burgulos:0.0): perf=0, nvclock=250, memclock=400 Attribute 'NvidiaDriverVersion' (Burgulos:0.0): 169.12 Attribute 'NvControlVersion' (Burgulos:0.0): 1.14 Attribute 'GLXServerVersion' (Burgulos:0.0): 1.4 Attribute 'GLXClientVersion' (Burgulos:0.0): 1.4 Attribute 'OpenGLVersion' (Burgulos:0.0): 2.1.2 NVIDIA 169.12 Attribute 'XRandRVersion' (Burgulos:0.0): 1.2 Attribute 'XF86VidModeVersion' (Burgulos:0.0): 2.2 Attribute 'XvVersion' (Burgulos:0.0): 2.2 Attribute 'GPUCurrentPerfMode' (Burgulos:0.0): 1. 'GPUCurrentPerfMode' is an integer attribute. 'GPUCurrentPerfMode' is a read-only attribute. 'GPUCurrentPerfMode' can use the following target types: X Screen, GPU. Attribute 'GPUCurrentPerfLevel' (Burgulos:0.0): 0. 'GPUCurrentPerfLevel' is an integer attribute. 'GPUCurrentPerfLevel' is a read-only attribute. 'GPUCurrentPerfLevel' can use the following target types: X Screen, GPU. Attribute 'GPUAdaptiveClockState' (Burgulos:0.0): 1. 'GPUAdaptiveClockState' is an integer attribute. 'GPUAdaptiveClockState' is a read-only attribute. 'GPUAdaptiveClockState' can use the following target types: X Screen, GPU. Attribute 'GPUPowerSource' (Burgulos:0.0): 0. 'GPUPowerSource' is an integer attribute. 'GPUPowerSource' is a read-only attribute. 'GPUPowerSource' can use the following target types: X Screen, GPU.

HarrySnapperOrgans

okay, this one is caused by the fact that i was too lazy to check for attribute existence. no temperature attribute available. i'm back on NvThermometer now, so i'll fix that and add some features to make it useful as more than a thermometer. thanks for the report!

aantn

Hey! Can you please indent lines 243-246 with one extra tab. The nvcversion variable is only defined when self.nvc.present is True. Also, good job on another slick and fast screenlet. Unfortunately, I don't have a Nvidia card to test this with, but it looks and feels good.

HarrySnapperOrgans

done :) thanks for the fix!

Pling
0 Affiliates
Details
license
version 0.3
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Conky from HarrySnapperOrgans:

ETHEL THE FROG
HarrySnapperOrgans
last update date: 17 years ago

Score 5.7

Other Conky:

System Status
Whise
last update date: 17 years ago

Score 5.0

Genetic code
Whise
last update date: 17 years ago

Score 5.0

BCCRScreenlet
gartuz
last update date: 17 years ago

Score 5.0

Diggler
Whise
last update date: 17 years ago

Score 5.0

Comic
Whise
last update date: 17 years ago

Score 5.0

Clear-enGlish Theme pack (Picframe Theme
ClearenGlish
last update date: 17 years ago

Score 4.7