isDipesh / gnome-shell-extension-sensors

Gnome shell extension: Shows CPU temperature, HDD temperature, voltage and fan RPM
https://motorscript.com/gnome-shell-extension-sensors/
161 stars 153 forks source link

Support Nvidia tool to query GPU sensors. #93

Open mightymouse2045 opened 10 years ago

mightymouse2045 commented 10 years ago

Hi,

Is there any way you can incorporate nvidiatemp@bacox extension into this extension? It appears to no longer in development.

For some reason lm_sensors (latest version) isn't showing the temp on the NVidia card...

The commands to list temp etc:

To output info with temp: 'nvidia-smi -q -d temperature'

To just output a number: 'nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader'

But it can also be used to query the product name, fan speed, etc

adrianbroher commented 10 years ago

If you want an implementation of this feature you need to provide sample output for those commands with a C locale set up. However I would only implement the display of hardware sensor related data.

However, there is this fork of the extension:

https://github.com/skamansam/gnome-shell-extension-nvsettings

Maybe it fits you better.

mightymouse2045 commented 10 years ago

No it's also not being actively developed, and I'm not after the extra functionality that fork is or was trying to provide, as it's not really a requirement in linux...

All I'm after is the fan speed and temp only. It would be nice to be able to set the temp to the NVidia card when required and also be able to keep an eye on the fan speed from time to time...

The commands won't change (for the foreseeable future), so it should be reasonably straight forward to implement and maintain.

How do I set a C locale so I can provide the exact command and output for each one? And would it be easier for you to just have a number supplied and you format the number with the Nvidia Name and Celsius or degree symbols, or is it easier to just get the output with that formatting already in place?

adrianbroher commented 10 years ago

How do I set a C locale so I can provide the exact command and output for each one?

Call the application with the LANG and LC_ALL environment variables set to C like

$ LANG=C LC_ALL=C application --param1=foo --bar=2

And would it be easier for you to just have a number supplied and you format the number with the Nvidia Name and Celsius or degree symbols, or is it easier to just get the output with that formatting already in place?

I would prefer to have one application call to gather all sensor informations (temperature with a sensor label, fan speed with a label, gpu/memory voltage with a label, …) provided by the tool if this is possible. So a simple 'LANG=C LC_ALL=C nvidia-smi -q' should be sufficient.

mightymouse2045 commented 10 years ago

Here's the output http://pastebin.com/Mtr8NR2N

However there are a lot of N\A's, but I know that information is normally available (in windows at least), I might see if there is an upgrade available for my drivers to see if that helps at all....

mightymouse2045 commented 10 years ago

Tried a few different versions and no luck - but at any rate it shows the temp and what you need at least