Page 1 of 1

NvidiaTrayTemp : now @ v1.6 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Wed Nov 15, 2023 6:23 pm
by mikewalsh

Evening, gang.

This is something I've wanted to attempt for a long time. Most of my Pups are running the official Nvidia drivers.....but some of the older ones won't compile, so they're still on the 'nouveau' driver.

Although the official driver gives you a nice Settings GUI, along with a tab for displaying the GPU's core temperature, trying to bring the temp up under the 'nouveau' driver is a frickin' nightmare.......and there's not an awful lot of documentation online for this, believe it or not! There's a ton for the official driver, but 'nouveau' seems very much the poor relation in this respect.

Most of the tech sites and blogs keep running on about installing lm-sensors or pSensor.....but this means installing extra software, when it is in fact perfectly possible to obtain the required temperature from pre-existing tools that are already part of the OS.

I had quite a run-around trying to figure out how to obtain the GPU temp using 'nouveau'. The official driver is pretty straight-forward, really; you get a nice GUI, or for those who prefer the command-line, Nvidia have got you covered here too; the nvidia-smi utility comes as a standard part of the official package.

I run gKrellM in all my Pups, and whether 'official' or 'nouveau', it always manages to find and display the information.....so I KNEW there had to be a way to obtain it. As it turned out, gKrellM's own settings panel gave the very clue I needed; it more or less names the exact kernel item you need to locate......which gave me a BIG helping hand!


Not everyone wants to run gKrellM.....so I've cobbled together a tiny utility that sits in the notification area over to the right. Simply left-click on the icon; it looks for the presence of the 'nvidia.ko' kernel module; if it finds it, it obtains the GPU temp by running

Code: Select all

nvidia-smi --query --display=temperature | grep "GPU Current Temp"

..... then displays that information in a wee gtk-dialog banner at the top of the screen for a few seconds. You can run this as often as you want.

If the 'nvidia.ko' module isn't present, it instead gets the requisite info by running

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input

.....and uses THAT to display the temps in the gtk-dialog banner.

It all seems to work very nicely..! :P

Image


I guess my "ultimate" would be to hack Micko's pmcputemp to turn it into pmgputemp, and give a continuously-updated, real-time display the way the former does.......but that's a ways above my pay-grade ATM, so this is a quite acceptable alternative. The fact that it auto-detects your set-up, and runs the appropriate code depending on what it finds is quite useful! :D

Anyone who's interested can find the .pet attached below. It auto-starts at boot, but includes a Menu entry to "re-start" the tray icon should you forget yourself and 'Quit' by mistake....

Hope it's useful for some of you; to my mind, it's fewer clicks than bringing up the settings GUI and digging around in the tabs to find the info. A single click gives you the GPU temps.....what could be simpler?

Mike. :) :thumbup:


Re: NvidiaTrayTemp v1.3 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Mon Nov 20, 2023 1:38 am
by mikewalsh

Evening, gang.

Okay; upgrade time.

Main modification is that now, as the GPU temperature rises, the gtk-dialog text changes color.....from green, thru yellow, orange and finally red. Learnt how to use another wee utility; this time, the 'tr' command to achieve the above from the 'nvidia-smi' utility's temps output. This removes either text OR numbers from a string, depending on what you specify. It's a standard, built-in part of Busybox, so no need to install anything.....and helps to keep this a no-arch utility.

This gives you - in addition to the value itself - a purely 'visual' clue. As the color gets warmer, so the GPU is getting more 'toasty'!

New version - v1.3 - attached to the first post, above.

Enjoy.

Mike. ;)


Re: NvidiaTrayTemp v1.4 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Fri Dec 01, 2023 12:56 pm
by mikewalsh

Afternoon, gang.

v1.4 now adds the ability - via the right-click context menu - to continuously display the temperature if required via a simple while...do...done loop (for instance, if you wish to closely monitor temps for any reason). It also allows re-setting back to "on-demand" by the normal left-click on the icon.

New version (and simple 'upgrade') attached above in post #1.

Mike. ;)


Re: NvidiaTrayTemp v1.4 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Fri Dec 01, 2023 4:33 pm
by wizard

Hi Mike,
Installed on my Dell D630, like yours, running Frienldy-Fossa64 and real NVIDIA drivers. Seems to be working fine, low cpu and ram use. Nice work.

Thanks
wizard


Re: NvidiaTrayTemp v1.4 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Fri Dec 01, 2023 5:08 pm
by mikewalsh

@wizard :-

wizard wrote: Fri Dec 01, 2023 4:33 pm

Hi Mike,
Installed on my Dell D630, like yours, running Frienldy-Fossa64 and real NVIDIA drivers. Seems to be working fine, low cpu and ram use. Nice work.

Thanks
wizard

Good, good. Glad you like it!

As I said above, it's something I'd had at the back of my mind for a while, but only recently have my scripting skills become good enough to attempt it. And the auto-detection was necessary, because in some of my older Pups, the official drivers wouldn't compile.....so I wanted it to work with 'nouveau', as well.

Figuring out how to get the reading for nouveau actually took more doing than getting it from the official driver; the latter was easy, because Nvidia provide a command-line utility as part of the .run file. The official drivers have a ton of documentation, whereas the in-kernel 'nouveau' module.....hardly anything at all.

Sod's law, mate. Still, I got there in the end. :thumbup:

Mike. :D


Re: NvidiaTrayTemp v1.5 - a simple, tray-based utility to monitor your Nvidia GPU's temperature...

Posted: Fri Dec 15, 2023 4:54 pm
by mikewalsh

Small update:-

v1.5 now gives you the ability to 'personalise' the gtk-dialog display, by adding the model of your GPU via an entry in the tray launcher's right-click context menu. Creates a small text file in /etc, which is read as a variable by the main script.

New version attached to post #1.

Mike. ;)


NvidiaTrayTemp - new version : v1.6

Posted: Sat Jan 06, 2024 10:09 pm
by mikewalsh

Another small update.....just for the fun of it!

v1.6 adds an animated GIF icon to the notification dialog. This is now powered by the older "gtkdialog-splash" script; it seems that when the newer "box_splash" script replaced it, it discarded certain abilities from the older version.

In this thread on the old Forum, Argolance posted about the discovery that the gtk-dialog script from 'Precise' Puppy was the last one that seemed to permit animated icons in splash notifications. So this upgrade on NTT uses that script......and it shouldn't interfere with any of the other gtkdialog stuff, since it's 'standalone'.

This also came up just a few days ago, here:-

viewtopic.php?t=10253

.......which prompted some experimenting, and a minor rewrite. So; it's just for giggles, guys! It's not necessary.....but it looks neat.

New version attached to post #1.

Mike. :D