none
Assembling code in C for NVAPI RRS feed

  • Question

  • Hello can anyone give me idea how to work with these two functions:

    typedef int(*NvAPI_GPU_SetCoolerLevels_t)(int *handle, unsigned int, int fanlevel);
    NvAPI_GPU_SetCoolerLevels_t NvAPI_GPU_SetCoolerLevels = 0;
    
    NvAPI_GPU_SetCoolerLevels = NvQueryInterface(0x891FA0AE);
    
    
    //////and now set speed to 100%, hdlGPU[0] means that speed will be set to first gpu.
    int retval = NvAPI_GPU_SetCoolerLevels(hdlGPU[0], 0, 100);
    	if (retval != 0)//retval retrieves action status {
    		printf("Status: %i \n", retval);
    	}


    Problem is I cant find why its not working I believe adress is wrong or I missing params from function

    NvAPI_GPU_SetCoolerLevels_t

    .

    Worst part is that nvidia docs doesnt provide any info about this function at all.

    In some github repositories I readed that if you want manage fan speed you have to change params to NvAPI_GPU_SetCoolerPolicyTable, but I couldnt find what params exist for this function. So now I'm quite lost.

    P.S. for testing reason i gathering gpus fan speed and it shows correctly so problem left on SetCoolerLevels and SetCoolerPolicyTable

    P.S.S. some update if I remove unsigned int from SetCoolerLevels, it prints error -9 according:

    https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__nvapistatus.html#gacb260029291e5a208093a44b804b5549

    it could mean:

    A: An argument's structure version is not supported.

    B:The handle is no longer valid (likely due to GPU or display re-configuration)

    I hope I did mistake because I dont know any other options to manage gpu fan speeds.

    • Edited by speed258 Wednesday, April 4, 2018 2:32 PM
    • Moved by Baron Bi Tuesday, April 24, 2018 8:13 AM Third-party issue
    Wednesday, April 4, 2018 1:07 PM

All replies

  • Still looking for fan control for nvidia cards
    Wednesday, April 4, 2018 3:57 PM
  • Since your question specifically relates to Nvidia API I suggest you pursue the issue on their support forums.  This really isn't a C++ issue.
    Wednesday, April 4, 2018 4:06 PM
  • I already done that, but their forum is not soo active.
    Wednesday, April 4, 2018 4:51 PM
  • Hi,

    thanks for posting here.

    This forum is about c++ development issue with Microsoft products. For third-party library issue, as RLWA said, please wait for the response from their own support forum for better help.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 17, 2018 6:06 AM