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

Moderator: Forum moderators

Post Reply
User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

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

Post 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:

Attachments
NvidiaTrayTemp_v1.6-noarch.pet
Upgrade to v1.5. Adds an animated GIF icon to the notification dialog....just for giggles! (Extra size due to the GIF itself.)
(235 KiB) Downloaded 20 times
NvidiaTrayTemp_v1.5-noarch.pet
Tray-based utility to monitor the core temperture of your Nvidia GPU. Just install over the top of the earlier version...
(44.68 KiB) Downloaded 12 times

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

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

Post 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. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

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

Post 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. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
wizard
Posts: 1586
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2127 times
Been thanked: 503 times

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

Post 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

Big pile of OLD computers

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

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

Post 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

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

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

Post 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. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

NvidiaTrayTemp - new version : v1.6

Post 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

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

Post Reply

Return to “Utilities”