Add nvidia fan statistics ?

393 views
Skip to first unread message

felix....@gmail.com

unread,
Sep 4, 2014, 9:03:16 PM9/4/14
to psenso...@googlegroups.com
Hello,

I was amazed to discover that psensor could even monitor the gpu temp of my maxwell card - thank you very much for your work.
Yet, since I use a custom cooling mod, gpu fan speed monitoring is a must for me. I currently run a script invoking nvidia-smi in the background to check for the current pwm value on regular basis, but it would sure be practical to have all stats in the same menu of psensors. Could this be implemented ?

Thanks again for your efforts,

qwerkus

jporsini

unread,
Sep 5, 2014, 2:08:54 AM9/5/14
to felix....@gmail.com, psenso...@googlegroups.com
Hello,

On 05 Sep 2014, at 03:03, qwe...@gmail.com <felix....@gmail.com> wrote:

> I was amazed to discover that psensor could even monitor the gpu temp of my maxwell card - thank you very much for your work.
> Yet, since I use a custom cooling mod, gpu fan speed monitoring is a must for me. I currently run a script invoking nvidia-smi in the background to check for the current pwm value on regular basis, but it would sure be practical to have all stats in the same menu of psensors. Could this be implemented ?

IIRC nvidia-smi is not an OSS so I cannot check whether it is using NVCtrl lib to retrieve all information that it displays. BTW,
I guess that it is the case so it should be possible to implement it.

I am currently working on the Nvidia support and added some new information [1].
For the fans, I plan to add the support in the coming days but my concern is that I only have fanless nvidia cards so I cannot do any tests.

Regards,
JeanFI.

[1] http://wpitchoune.net/blog/psensor-nvidia-support-improvements/

felix....@gmail.com

unread,
Sep 5, 2014, 4:19:24 AM9/5/14
to psenso...@googlegroups.com

Hi,

Thank you for your reply. If smi doesn't work for you, you can also call nvidia-settings, which relies on NVCtrl IIRC; yet keep in mind that nvidia-settings eats a lot more cpu cycles than smi.
I can sure help you out for testing: I boot ubuntu 14.04 and just got a new gtx 750 ti; whatever works with this card should work with all maxwell cards.

Thank you for your work,

best regards,

qwerkus

jeanfi

unread,
Sep 5, 2014, 6:13:18 AM9/5/14
to felix....@gmail.com, psenso...@googlegroups.com
On 09/05/2014 10:19 AM, qwe...@gmail.com wrote:
> Thank you for your reply. If smi doesn't work for you, you can also call nvidia-settings, which relies on NVCtrl IIRC; yet keep in mind that nvidia-settings eats a lot more cpu cycles than smi.
> I can sure help you out for testing: I boot ubuntu 14.04 and just got a new gtx 750 ti; whatever works with this card should work with all maxwell cards.

I definitively don't plan to use nvidia-smi or nvidia-settings because
it is 1/ not efficient (process fork, parsing output) 2/ not reliable
(no spec of the output).

nvidia-settings is using the NVCtrl library, psensor is already using
this library directly. I have never noticed any performance issue about
using the NVCtrl lib.

After investigation, nvidia-smi is using the nvml library. Unfortunely,
even if the runtime lib itself is packaged in debian/ubuntu, the
required header files are not packaged.

As I would like to avoid the same nightmare of the ATI support which
cannot be enabled for Ubuntu/Debian (header files not packaged), I am
going to keep using NVCtrl lib.

If psensor is already able to retrieve the temperature of your card
there is a good chance that it is going to be the case for the fans too.

I will let you know when the fan support is added in psensor so you can
give it a try.

Regards,
JeanFI.


signature.asc

jeanfi

unread,
Sep 6, 2014, 5:08:08 AM9/6/14
to felix....@gmail.com, psenso...@googlegroups.com
Hello,

On 09/05/2014 12:13 PM, jeanfi wrote:
> On 09/05/2014 10:19 AM, qwe...@gmail.com wrote:
>> Thank you for your reply. If smi doesn't work for you, you can also call nvidia-settings, which relies on NVCtrl IIRC; yet keep in mind that nvidia-settings eats a lot more cpu cycles than smi.
>> I can sure help you out for testing: I boot ubuntu 14.04 and just got a new gtx 750 ti; whatever works with this card should work with all maxwell cards.
>
> I will let you know when the fan support is added in psensor so you can
> give it a try.

I have committed in the dev branch a first attempt to support the
monitoring of NVIDIA fans.

You can easily install the last snapshot of the dev branch by using the
PPA: ppa:jfi/psensor-daily-trunk.

Please, launch psensor with debugging enabled "psensor -d3" and send me
the result of "grep NVIDIA $HOME/.psensor/log".

Thanks!

JeanFI.

signature.asc

felix....@gmail.com

unread,
Sep 6, 2014, 10:07:40 AM9/6/14
to psenso...@googlegroups.com

Wow, fast work here. Tried your build, and got following errors:

[2014-09-06T13:55:02] [ERR] hddtemp: failed to open connection.
[2014-09-06T13:55:02] [ERR] NVIDIA: fail to retrieve fan speed 0
[2014-09-06T13:55:02] [ERR] Failed to parse configuration file: /home/qwerkus/.psensor/psensor.cfg

hddtemp didn't work before; doesn t support my hardware.

qwerkus

jeanfi

unread,
Sep 6, 2014, 10:19:51 AM9/6/14
to felix....@gmail.com, psenso...@googlegroups.com
Hello,

On 09/06/2014 04:07 PM, qwe...@gmail.com wrote:

> [2014-09-06T13:55:02] [ERR] NVIDIA: fail to retrieve fan speed 0
At least it means that I am detecting that there is one fan but the
code used to retrieve the fan speed is wrong:(

Could you please send me your $HOME/.psensor/log file?

How many fans does your nvidia card have? What is the exact nvidia card
(manufacturer)?

Could you also please send me the output of nvidia-smi?

> [2014-09-06T13:55:02] [ERR] Failed to parse configuration file: /home/qwerkus/.psensor/psensor.cfg
Guess it is the first time you start a psensor release supporting Gsettings

Thanks,
JeanFI.

signature.asc

felix....@gmail.com

unread,
Sep 6, 2014, 12:41:22 PM9/6/14
to psenso...@googlegroups.com
On Saturday, September 6, 2014 4:19:51 PM UTC+2, Jean-Philippe Orsini wrote:
> Hello,
>
>
>
> On 09/06/2014 04:07 PM, qwe...@gmail.com wrote:
>
>
>
> > [2014-09-06T13:55:02] [ERR] NVIDIA: fail to retrieve fan speed 0
>
> At least it means that I am detecting that there is one fan but the
>
> code used to retrieve the fan speed is wrong:(
>
>
>
> Could you please send me your $HOME/.psensor/log file?

Those 3 lines are the complete log file :)

> How many fans does your nvidia card have? What is the exact nvidia card

http://www.palit.biz/palit/vgapro.php?id=2252

Stock version has 2x daisy chained 2-pin 12V fans, but only one pwm controller. As told, I modded the header to a 4pin one, in order to accomodate a larger fan.
It didn't affect the output of nvidia-smi/nvidia-settings.



> Could you also please send me the output of nvidia-smi?

+------------------------------------------------------+
| NVIDIA-SMI 340.29 Driver Version: 340.29 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 750 Ti Off | 0000:01:00.0 N/A | N/A |
| 50% 45C P8 N/A / N/A | 383MiB / 2047MiB | N/A Default |
+-------------------------------+----------------------+----------------------+

Maybe the issue is that my card only seems to show a pwm % and not actually a RPM speed. I check it under win 7, and ms nvidia-settings also only comes up with a pwm percentage. Perhaps our code could check for an rpm number, and if it fails go for a % ?



> > [2014-09-06T13:55:02] [ERR] Failed to parse configuration file: /home/qwerkus/.psensor/psensor.cfg
>
> Guess it is the first time you start a psensor release supporting Gsettings

Yes. I had stability issues (random crashes - complete freeze), and got rid of all testing ppas. Issue fixed.

> Thanks,
>
> JeanFI.

jeanfi

unread,
Sep 6, 2014, 3:08:05 PM9/6/14
to felix....@gmail.com, psenso...@googlegroups.com
On 09/06/2014 06:41 PM, qwe...@gmail.com wrote:
>> Could you please send me your $HOME/.psensor/log file?
> Those 3 lines are the complete log file :)
You did not run psensor with the -d3 option:)

>
>> How many fans does your nvidia card have? What is the exact nvidia card
>
> http://www.palit.biz/palit/vgapro.php?id=2252
>
> Stock version has 2x daisy chained 2-pin 12V fans, but only one pwm controller. As told, I modded the header to a 4pin one, in order to accomodate a larger fan.
> It didn't affect the output of nvidia-smi/nvidia-settings.
So, the "50%" should not be the percentage speed of the fan but the
percentage of volt output, your fan should be DC controled.

>
>> Could you also please send me the output of nvidia-smi?
>
> +------------------------------------------------------+
> | NVIDIA-SMI 340.29 Driver Version: 340.29 |
> |-------------------------------+----------------------+----------------------+
> | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
> | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
> |===============================+======================+======================|
> | 0 GeForce GTX 750 Ti Off | 0000:01:00.0 N/A | N/A |
> | 50% 45C P8 N/A / N/A | 383MiB / 2047MiB | N/A Default |
> +-------------------------------+----------------------+----------------------+
>
> Maybe the issue is that my card only seems to show a pwm % and not actually a RPM speed. I check it under win 7, and ms nvidia-settings also only comes up with a pwm percentage. Perhaps our code could check for an rpm number, and if it fails go for a % ?
In the lib header file there is an attribute for the rotation speed, the
one that I have used but also an 'operation level' attribute. I am going
to try to fallback to this last one....

I don't see anything else which might allow me to compute or get this "50%".



signature.asc

jeanfi

unread,
Sep 7, 2014, 5:48:36 AM9/7/14
to felix....@gmail.com, psenso...@googlegroups.com
I have committed some additional debug traces to understand what is
available with your card. Could you please update your pkg from the
daily PPA, run psensor with the command: psensor -d3 and send me
the log file ($HOME/.psensor/log).

Thanks!
JeanFI.


signature.asc
Reply all
Reply to author
Forward
0 new messages