Temperature CPU in OSD

Discussion in 'RivaTuner Advanced Discussion forum' started by 790, Dec 21, 2006.

  1. 790

    790 Member

    Messages:
    45
    Likes Received:
    1
    GPU:
    Asus GTX1080 8Gb
    I wish to see temperature of CPU in OSD. Monitoring plugin for it.
    I read samples in SDK folder. I read FAQ and SDK.chm.
    I don`t undestand how I can create plugin for it. My experience is not enough for it :)

    CPU: Intel P4 3.0 GHz (531)
    MB: ASUS P5GDC Pro , Sensor: Winbond W83627EHF/EHG (ISA 290h) - info from Everest UE
    BIOS 1008
     
  2. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    If you have any K8 CPU - you can do it. But there are no plugins for Intel CPUs currently available, sorry. So you're out of luck.
     
  3. 790

    790 Member

    Messages:
    45
    Likes Received:
    1
    GPU:
    Asus GTX1080 8Gb
    About AMD: I think, you talk about NVSU.dll (?) But my friend has Athlon 64 X2 and MB Asus M2N-E (nForce 570 Ultra) and NVSU.dll don`t work, no monitoring. Maybe, I don`t understand what is NVIDIA System Utility SMI ? Need special driver or Asus (as always :) ) created own individual monitoring system and sensors?

    I understand, you cannot create plugin for ever sensor :) , but how Everest working for all?

    My congratulations with Final Riva !
     
  4. boogieman

    boogieman Ancient Guru

    Messages:
    1,984
    Likes Received:
    50
    GPU:
    MSI GTX 1080X
    NV plugins are for Nvidia mobo's. You would have to know programming with the SDK in order to make one for other mobo's.
     

  5. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    Nope, you're misunderstanding everything.

    http://topmods.net/OMC/CpuCoreDiode.zip
     
  6. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    Is there any skeleton source code for CPU temperature monitoring? I would like to implement monitoring for Core 2 Duo CPU termal diodes.
     
  7. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    K8 CpuCoreDiode plugin is written by third party developer and unfortunately there no public sources for it. However, RivaTuner's SDK contains sources of all the plugins included in the distributive. You can use any of them as a base for your plugin. For example, you may use CPU plugin, which performs CPU frequency and usage monitoring.
     
  8. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    I know that, I just wanted a simpler sample of I2C part. Never mind, will try to figure it out on my own.
     
  9. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    Unwinder, how do I access MSR registers? Does RivaTuner export any APIs for that purpose? RDMSR can be executed only in kernel mode.
     
  10. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    .\SDK\Include\RivaTunerExports.h


    /////////////////////////////////////////////////////////////////////////////
    //
    // This header file defines functions exported by RivaTuner.exe
    //
    /////////////////////////////////////////////////////////////////////////////

    #ifndef _RIVATUNER_EXPORTS_INCLUDED_
    #define _RIVATUNER_EXPORTS_INCLUDED_

    #ifdef RIVATUNER_EXPORTS
    #define RIVATUNER_API extern "C" __declspec(dllexport)
    #else
    #define RIVATUNER_API extern "C" __declspec(dllimport)
    #endif

    /////////////////////////////////////////////////////////////////////////////
    //
    // host application IDs
    //
    /////////////////////////////////////////////////////////////////////////////

    #define RIVATUNER_HOST_APP 0x00000000
    #define MONITORINGHOSTSAMPLE_HOST_APP 0x00000001

    /////////////////////////////////////////////////////////////////////////////
    //
    // exported function names
    //
    /////////////////////////////////////////////////////////////////////////////

    //R/O access to host application ID/version

    typedef DWORD (*GET_HOST_APP_ID_PROC )();
    //DWORD GetHostAppID()
    typedef DWORD (*GET_HOST_APP_VERSION_PROC )();
    //DWORD GetHostAppVersion()

    //R/O access to current display device identification

    typedef LPCSTR (*GET_DEVICE_NAME_PROC )();
    //LPCSTR GetDeviceName()
    typedef LPCSTR (*GET_DEVICE_ID_PROC )();
    //LPCSTR GetDeviceID()

    //R/W access to IO ports

    typedef int (*INP_PROC )(unsigned short);
    //int inp(unsigned short port)
    typedef unsigned short (*INPW_PROC )(unsigned short);
    //unsigned short inpw(unsigned short port)
    typedef unsigned long (*INPD_PROC )(unsigned short);
    //unsigned long inpd(unsigned short port)

    typedef int (*OUTP_PROC )(unsigned short, int );
    //int outp(unsigned short port, int data)
    typedef unsigned short (*OUTPW_PROC)(unsigned short, unsigned short);
    //unsigned short outpw(unsigned short port, unsigned short data)
    typedef unsigned long (*OUTPD_PROC)(unsigned short, unsigned long );
    //unsigned long outpd(unsigned short port, unsigned long data)

    //R/W access to PCI bus configuration registers

    typedef DWORD (*READ_BUS_DATA_ULONG_PROC )(DWORD, DWORD, DWORD);
    //DWORD ReadBusDataUlong(DWORD bus, DWORD devfn, DWORD offset)
    typedef WORD (*READ_BUS_DATA_USHORT_PROC )(DWORD, DWORD, DWORD);
    //WORD ReadBusDataUshort(DWORD bus, DWORD devfn, DWORD offset)
    typedef BYTE (*READ_BUS_DATA_UCHAR_PROC )(DWORD, DWORD, DWORD);
    //BYTE ReadBusDataUchar(DWORD bus, DWORD devfn, DWORD offset)

    typedef void (*WRITE_BUS_DATA_ULONG_PROC )(DWORD, DWORD, DWORD, DWORD);
    //void WriteBusDataUlong(DWORD bus, DWORD devfn, DWORD offset, DWORD data)
    typedef void (*WRITE_BUS_DATA_USHORT_PROC )(DWORD, DWORD, DWORD, WORD );
    //void WriteBusDataUshort(DWORD bus, DWORD devfn, DWORD offset, WORD data)
    typedef void (*WRITE_BUS_DATA_UCHAR_PROC )(DWORD, DWORD, DWORD, BYTE );
    //void WriteBusDataUchar(DWORD bus, DWORD devfn, DWORD offset, BYTE data)


    //R/W access to MSR

    typedef BOOL (*READ_MSR_PROC )(DWORD, LPDWORD, LPDWORD);
    //BOOL ReadMSR(DWORD dwIndex, LPDWORD lpHigh, LPDWORD lpLow)
    typedef BOOL (*WRITE_MSR_PROC)(DWORD, DWORD, DWORD);
    //BOOL WriteMSR(DWORD dwIndex, DWORD dwHigh, DWORD dwLow)


    //R/W access to current display device GPU registers

    typedef DWORD (*READ_REGISTER_ULONG_PROC )(DWORD);
    //DWORD ReadRegisterUlong(DWORD address)
    typedef WORD (*READ_REGISTER_USHORT_PROC )(DWORD);
    //WORD ReadRegisterUshort(DWORD address)
    typedef BYTE (*READ_REGISTER_UCHAR_PROC )(DWORD);
    //BYTE ReadRegisterUchar(DWORD address)

    typedef void (*WRITE_REGISTER_ULONG_PROC )(DWORD, DWORD );
    //void WriteRegisterUlong(DWORD address, DWORD data)
    typedef void (*WRITE_REGISTER_USHORT_PROC)(DWORD, WORD );
    //void WriteRegisterUshort(DWORD address, WORD data)
    typedef void (*WRITE_REGISTER_UCHAR_PROC )(DWORD, BYTE );
    //void WriteRegisterUchar(DWORD address, BYTE data)

    //R/O access to current display device VGA BIOS

    typedef BOOL (*ENABLE_READ_BIOS_PROC )(BOOL );
    //BYTE EnableReadBIOS(BOOL bEnable)
    typedef BYTE (*READ_BIOS_PROC )(DWORD);
    //BYTE ReadBIOS(DWORD address)

    //R/W access to current display device I2C buses

    typedef BYTE (*GET_I2C_BUS_NUM_PROC )();
    //BYTE GetI2CBusNum()
    typedef BOOL (*READ_I2C_PROC )(BYTE,BYTE,BYTE,LPBYTE);
    //BOOL ReadI2C(BYTE bus, BYTE dev, BYTE off, LPBYTE lpData)
    typedef BOOL (*WRITE_I2C_PROC )(BYTE,BYTE,BYTE,LPBYTE);
    //BOOL WriteI2C(BYTE bus, BYTE dev, BYTE off, LPBYTE lpData)

    //R/O access to current NVIDIA display device driver resource manager

    typedef BOOL (*NVRM_GET_CFG_PROC )(DWORD,LPDWORD);
    //BOOL NvRmGetCfg(DWORD dwIndex, LPDWORD lpData)
    typedef BOOL (*NVRM_GET_CFG_EX_PROC )(DWORD,LPBYTE,DWORD);
    //BOOL NvRmGetCfgEx(DWORD dwIndex, LPBYTE lpData, DWORD dwSize)

    //localization

    typedef void (*LOCALIZEWND_PROC )(HWND);
    //void LocalizeWnd(HWND hWnd)
    typedef LPCSTR (*LOCALIZESTR_PROC )(LPCSTR);
    //LPCSTR LocalizeStr(LPCSTR lpStr)

    #endif
     

  11. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    I should have looked there, thanks. I have a working plugin, but I still have to figure out a few things, namely Tjunction temperature (depends on CPU model). Then I will release it.

    Unwinder, what would be more proper in your opinion?

    1. To detect CPU features in DllMain and abort plugin loading by returning FALSE
    2. To detect CPU features in GetSourceDesc() and return FALSE

    ?
     
    Last edited: Dec 27, 2006
  12. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    Both ways are valid but the second one looks more correct for me, because the rest plugins use such logic.
     
  13. 790

    790 Member

    Messages:
    45
    Likes Received:
    1
    GPU:
    Asus GTX1080 8Gb
    @levicki, make plugin for my Intel Pentium 4 530 3.0 GHz thermal diode
     
  14. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    C2DTemp

    Sorry to disappoint you but as far as I know that is not possible. Older CPU's diodes are read using Super I/O chip register and there is a myriad of them available with each having different reading procedure.

    I literally hacked a quick temperature monitoring plugin for Core 2 Duo (and hopefully Core 2 Quad too). It may even work with Yonah and Core Solo.

    There may be bugs so be carefull and above all, do not try to use it on older CPUs because reading model specific registers which do not exist on your particular CPU can crash your computer and cause you to lose data.
     
    Last edited: Dec 31, 2006
  15. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,187
    Likes Received:
    6,807
    Good job. We'll wait for some feedback from C2D owners then put it in guru3d downloads.
     

  16. 790

    790 Member

    Messages:
    45
    Likes Received:
    1
    GPU:
    Asus GTX1080 8Gb
    I tried to use for mine too. Does not work. :((
     
  17. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    Haven't I told you that it won't work?

     
  18. levicki

    levicki Active Member

    Messages:
    66
    Likes Received:
    0
    GPU:
    Asus GTX980
    How to install C2DTemp plugin

    Download C2DTemp plugin.

    Here are the instructions on how to install C2DTemp plugin:

    1. Double-click on C2DTemp.rtu in Windows Explorer and click Ok on the following dialog

    [​IMG]

    2. Start RivaTuner

    [​IMG]

    3. On the Main tab click on the first Customize... button and then on the fifth icon from the popup menu (Hardware Monitoring)

    [​IMG]

    4. Click on the Setup button in the lower right corner

    [​IMG]

    5. Click on the Plugins button in the lower left corner

    [​IMG]

    6. Place a checkmark next to the C2DTemp.dll and click Ok

    [​IMG]

    7. Place a checkmark next to the newly available data sources and click Ok

    [​IMG]

    8. That's it. Now your hardware monitor should look something like this:

    [​IMG]

    I am waiting for your feedback.
     
    Last edited: Dec 31, 2006
  19. Hilbert Hagedoorn

    Hilbert Hagedoorn Don Vito Corleone Staff Member

    Messages:
    48,502
    Likes Received:
    18,798
    GPU:
    AMD | NVIDIA
    It's working like a charm Igor. Nice plugin.
     
  20. Anarion

    Anarion Ancient Guru

    Messages:
    13,599
    Likes Received:
    387
    GPU:
    GeForce RTX 3060 Ti
    Wow, thanks! This is great!
     

Share This Page