Jump to content

Read GPU Temperature


Wanja
 Share

Recommended Posts

Can I read out the temperature of my GFX Card (Nvidia) by using AutoIt?

Is it possible to read out the nvidia driver temp display without opening the window?

I want to write script supporting me with GPU temp messages while I playing games :whistle:

any suggestions?

Excuse my bad english ^^

Link to comment
Share on other sites

I have written such a proggie. The limitations are that the Nvidia Control Panel must be open when you run the program although it hides when it starts it logging.... Nvidia wouldnt share their resources to call the dll right away through DllCall() although i contacted them 5 times...

Unfortunately i dont have the source code (formatted by accident) but i have an exe version...It logs the Temperature every 30 secs in a log file on desktop....

EDIT:

And BTW "This is not a general support forum!"

C ya

Edited by hgeras
Link to comment
Share on other sites

@44Harry:

Thanx for the info...It seems that it is exactly what i wanted although i hadnt find it 6 months ago when i had made the other proggie.Now i'm gonna find out how to make this work and re-write the whole code....Expect it to come in a few days....

C ya

Link to comment
Share on other sites

Yeah thx for the api link ^^

so far I found this:

NvCplGetThermalSettings()

Function

Prototype

BOOL CDECL NvCplGetThermalSettings(IN UINT nWindowsMonitorNumber,

OUT DWORD* pdwCoreTemp,

OUT DWORD* pdwAmbientTemp,

OUT DWORD* pdwUpperLimit);

Parameters In UINT nWindowsMonitorNumber -- The display number shown on

the Windows Display Properties->Settings page.

A value of 0 indicates the current primary Windows display device.

DWORD* must be a valid pointer --

pdwCoreTemp -- GPU temperature in degrees Celsius.

pdwAmbientTemp -- Ambient temperature in degrees Celsius.

pdwUpperLimit -- Upper limit of the GPU temperature specification.

Return Values True on success.

False on failure.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

So I wrote some script stuff:

Dim $pdwCoreTemp

Dim $pdwAmbientTemp

Dim $pdwUpperLimit

$nWindowsMonitorNumber = 0

$dll = DllOpen("nvcpl.dll")

$result = DllCall($dll, "NvCplGetThermalSettings", $nWindowsMonitorNumber, $pdwCoreTemp, $pdwAmbientTemp, $pdwUpperLimit)

MsgBox(4096, "Test", $result , 10)

DllClose($dll)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

But I got the error message that the nummber of parameters in the function call is not correct...it only works with one parameter:

$result = DllCall($dll, "NvCplGetThermalSettings", $nWindowsMonitorNumber)

The result is zero ...

well any suggestions how I can get my variables filled ? ^^

Link to comment
Share on other sites

I worked out this:

Dim $pdwCoreTemp

Dim $pdwAmbientTemp

Dim $pdwUpperLimit

$nWindowsMonitorNumber = 0

$dll = DllOpen("nvcpl.dll")

$result = DllCall($dll, "NvCplGetThermalSettings", $nWindowsMonitorNumber, "long_ptr", $pdwCoreTemp, "long_ptr", $pdwAmbientTemp, "long_ptr", $pdwUpperLimit)

MsgBox(4096, "Test", $pdwCoreTemp)

DllClose($dll)

$pdwCoreTemp is still empty but no more errors so far ^^

seems the dll call fails...

help ^^

Link to comment
Share on other sites

Your syntax is not right... You have wrong number of parameters...Try this,I get no errors but right now I've given my 6800 Ultra and i have a MX440 which has no temperature control....Try this out and tell me...

Dim $pdwCoreTemp
Dim $pdwAmbientTemp
Dim $pdwUpperLimit
$nWindowsMonitorNumber = 0

$dll = DllOpen("nvcpl.dll")

$result = DllCall($dll,"int", "NvCplGetThermalSettings", "int",$nWindowsMonitorNumber, "long_ptr", $pdwCoreTemp, "long_ptr", $pdwAmbientTemp, "long_ptr", $pdwUpperLimit)
If @error then msgbox(0,"","ERROR")
MsgBox(4096, "Test", $result[2])

DllClose($dll)

C ya

Link to comment
Share on other sites

It works?!? I chose a bad time to not have my 6800.... Are u sure that works? Do me a favor and tell me this code works too....

$a = DllStructCreate("dword;dword;dword")
if @error Then
    MsgBox(0,"","Error in DllStructCreate " & @error);
    exit
endif

$dll = DllOpen("nvcpl.dll")

$result = DllCall($dll,"int","NvCplGetThermalSettings","int",0,"ptr",dllStructGetPtr($a,1),"ptr",dllStructGetPtr($a,2),"ptr",dllStructGetPtr($a,3)) 
If @error then msgbox(0,"","ERROR")
MsgBox(4096, "Test", $result[0] & " " & DllStructGetData($a,1))
DllStructDelete($a)
DllClose($dll)

C ya

Link to comment
Share on other sites

You have to have the latest beta installed as layer indicated.But even if you have it, SCiTe will again say that cos it isnt updated with the new definitions... Run it in "Beta Run" Instead of "Go"....

C ya

Link to comment
Share on other sites

I've got another question if you don't mind:

I'm not so familiar with AutoIt Gui, well does there exist a way to print (let's say the GPU temperature ^^) on screen even if I run a game in fullscreen?

I tried to create a gui but when I started a game it always pops to background...

I know some tools able to print the fps on screen does AutoIt got such a feature?

excuse my bad english :whistle:

Link to comment
Share on other sites

this would be a nice feature request ^^

btw: my Logitech Keyboard got some special funktions and if I activate them I get a message on the screen even in games. Perhaps the AutoIt authers can implement something like this? ^^

Link to comment
Share on other sites

  • 17 years later...
  • Developers

Mmm 17 years later you expect an answer without telling us the problem other than "it doesn't" work..  good luck with that.

 

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Sorry !  I should tell you more ..

I had try this code , I found that DllCall()  will return error , the @error return code is 1 , that means "unable to use the DLL file" 

so I dont know what next step to do ..

and I also  google  about  the "nvcpl.dll" file , but nothing help ..

so i reply this post .. may someone can help ?  thanks 

 

$result = DllCall($dll,"int","NvCplGetThermalSettings","int",0,"ptr",dllStructGetPtr($a,1),"ptr",dllStructGetPtr($a,2),"ptr",dllStructGetPtr($a,3)) 
If @error then msgbox(0,"","ERROR")

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...