Giter Club home page Giter Club logo

nvapioc's Introduction

Changelog:

  • v0.7 - NvApiOc v0.7
    • Add NVIDIA NvAPI switch option.
    • Add AMD ATI ADL switch option.
    • Add log file switch option.
  • v0.6 - NvApiOc v0.6
    • Add curve (voltage:frequency) option.
  • v0.5 - NvApiOc v0.5
    • Replace GPU index with bus id.
    • Reformat log file.
  • v0.4 - NvApiOc v0.4
    • Add AMD ATI ADL Overdrive support.
    • Reformat voltage options.
    • Fix x64 GPU handle size.
  • v0.3 - NvApiOc v0.3
    • Add require administrator rights (UAC).
    • Add x64 build support.
  • v0.2 - NvApiOc v0.2
    • Add log file.
    • Add TCC devices support.
    • Add restart driver option.
    • Remove PState options (not working as expected).
  • v0.1 - NvApiOc v0.1

About:

NvApiOc Open Source NVIDIA NvAPI & AMD ATI ADL Overdrive GPU Overclock

Usage:

  • -core gpuBusId pState frequencyKHz (frequencyKHz: 0 = default; NVIDIA offset)
  • -mem gpuBusId pState frequencyKHz (frequencyKHz: 0 = default; NVIDIA offset)
  • -cvolt gpuBusId pState voltageUV (voltageUV: 0 = default)
  • -mvolt gpuBusId pState voltageUV (voltageUV: 0 = default)
  • -power gpuBusId power (power: AMD offset)
  • -temp gpuBusId priority tempC (priority: 0 = false; 1 = true)
  • -fan gpuBusId fanIndex speed (speed: -1 = default)
  • -led gpuBusId type brightness (type: 0 = logo; 1 = sliBridge)
  • -curve gpuBusId count voltageUV frequencyKHz vUV2 fKHz2 vUV3 fKHz3
    (count: 0 = reset; -1 = save; frequencyKHz: 0 = default; NVIDIA offset)
  • -nvidia enable (enable: 0 = false; 1 = true = default)
  • -amd enable (enable: 0 = false; 1 = true = default)
  • -log enable (enable: 0 = false; 1 = true = default)
  • -restart

Credits:

nvapioc's People

Contributors

demion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nvapioc's Issues

Not working on win10

Nice work! Tested on win10, not working, only take effect when GPU_Z is installed, seems GPU_Z has some trick to turn on overlocking?

There are bugs under windows10

Thank you very much for the great work. I don't know why, I can't set the frequency of Gpu and mem correctly under win10. I use something like -core 1 2 100000 or -mem 1 2 100000, but there is no effect. Looking at the log file returns the result -104, my driver version is 457.51, graphics card is nividia 1660s, the contents of log.txt are as follows:
[14.06.2021 21:40:24][main.cpp:0362] nvapi = LoadLibraryA(nvapiDllName) 1937506304 (0x737C0000)
[14.06.2021 21:40:24][main.cpp:0368] NvAPI_QueryInterface = (void* (__cdecl*)(unsigned int)) GetProcAddress(nvapi, "nvapi_QueryInterface") 1938676960 (0x738DDCE0)
[14.06.2021 21:40:24][main.cpp:0409] result = NvAPI_Initialize() 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0448] result = NvAPI_EnumPhysicalGPUs(handles, &count) 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0457] busIdResult = NvAPI_GPU_GetBusId(handles[i], &busId) 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0477] result = NvAPI_EnumTCCPhysicalGPUs(handles, &count) 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0914] adl = LoadLibraryA("atiadlxx.dll") 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0917] adl = LoadLibraryA("atiadlxy.dll") 0 (0x00000000)
[14.06.2021 21:40:24][main.cpp:0535] result = NvAPI_GPU_SetPstates20(NvApiGpuHandles[gpuBusId], &pStatesInfo) -104 (0xFFFFFF98)
[14.06.2021 21:40:24][main.cpp:0421] result = NvAPI_Unload() 0 (0x00000000)

Whether there are use parameter examples?

What is an example of card A and card N?
My own tool set using the vs2017 platform is v140
Compiled to run (nvapioc.exe-AMD-core 8 0 10000)
Hint: Invalid parameter #3 "8"
Invalid parameter #4 "0"
Invalid parameter #5 "10000"
Using the releases version of the repository will not report the error above, but again there will be no response, and the log will output the following:
"[02.02.2023 16:55:39][main.cpp:0344] nvapi = LoadLibraryA(nvapiDllName) 0 (0x00000000)"
Is there a correct AMD graphics card and NVIDIA graphics card overclocking sample parameters? Thanks!

How set Parameters

Hi,

I don't know much about code. I just want to execute the “.exe” directly, but I don't know how to set the parameters. Can you give a sample of the settings? Thanks a lot!

Some questions regarding the code and nvapi.

Dear Demion,
I have some questions regarding the code and nvapi.

  1. Can you tell me if all 3 functions work?
    NvApiSetVoltageOffset
    NvApiSetOverVoltageOffset
    NvApiSetVoltageLock

  2. Apart from obtaining curve data, is it possible to obtain current parameter values?

  3. You don't have a fan control curve implemented, am I correct in assuming that the main reason is a lack of information?

How to use the -curve option?

Hi, I'm trying to get the curve option working (-core and -mem work on my MX150) but it errors with invalid parameter.
I input the following: .\nvapioc.exe -curve 3 -1 -80000 1670000 85000 1690000 86000 1680000
and the output is:

Invalid parameter #4 "-80000"
Invalid parameter #5 "1670000"
Invalid parameter #6 "85000"
Invalid parameter #7 "1690000"
Invalid parameter #8 "86000"
Invalid parameter #9 "1680000"

By the way, the project can be compiled with mingw-w64 and is working okay

-mem and -power not working on AMD R9 290X (Hawaii)

Hi,

I tried to modify some parameters on my R9 290X.
The card is on the Bus ID 1 and the highest pState is 7.

If I try nvapioc.exe -core 1 7 1000000, it works, the core clock is set to 1000 MHz.

But if I try nvapioc.exe -mem 1 7 1000000, nothing happens.
Log :

[05.04.2021 19:00:52][main.cpp:0344] nvapi = LoadLibraryA(nvapiDllName)                                                                     140719960293376      (0x00007FFBEB3F0000)
[05.04.2021 19:00:52][main.cpp:0350] NvAPI_QueryInterface = (void* (__cdecl*)(unsigned int)) GetProcAddress(nvapi, "nvapi_QueryInterface")  140719961640336      (0x00007FFBEB538D90)
[05.04.2021 19:00:52][main.cpp:0389] result = NvAPI_Initialize()                                                                            0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0428] result = NvAPI_EnumPhysicalGPUs(handles, &count)                                                       0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0437] busIdResult = NvAPI_GPU_GetBusId(handles[i], &busId)                                                   0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0457] result = NvAPI_EnumTCCPhysicalGPUs(handles, &count)                                                    0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0849] adl = LoadLibraryA("atiadlxx.dll")                                                                     140719011266560      (0x00007FFBB2AE0000)
[05.04.2021 19:00:52][main.cpp:0888] result = ADL2_Main_Control_Create(ADL2_Main_Memory_Alloc, 1, &AdlContext)                              0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0919] result = ADL2_Adapter_NumberOfAdapters_Get(AdlContext, &count)                                         0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0925] result = ADL2_Adapter_AdapterInfo_Get(AdlContext, adaptersInfo, sizeof(AdapterInfo) * count)           0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:00:52][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:00:52][main.cpp:1068] result = ADL2_OverdriveN_MemoryClocksX2_Get(AdlContext, AdlGpuIndexes[gpuBusId], &performanceLevels)   0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:1083] result = ADL2_OverdriveN_MemoryClocksX2_Set(AdlContext, AdlGpuIndexes[gpuBusId], &performanceLevels)   0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0401] result = NvAPI_Unload()                                                                                0                    (0x0000000000000000)
[05.04.2021 19:00:52][main.cpp:0902] result = ADL2_Main_Control_Destroy(AdlContext)                                                         0                    (0x0000000000000000)

And if I try nvapioc.exe -power 1 95, nothing happens.
Log :

[05.04.2021 19:07:00][main.cpp:0344] nvapi = LoadLibraryA(nvapiDllName)                                                                     140719960293376      (0x00007FFBEB3F0000)
[05.04.2021 19:07:00][main.cpp:0350] NvAPI_QueryInterface = (void* (__cdecl*)(unsigned int)) GetProcAddress(nvapi, "nvapi_QueryInterface")  140719961640336      (0x00007FFBEB538D90)
[05.04.2021 19:07:00][main.cpp:0389] result = NvAPI_Initialize()                                                                            0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0428] result = NvAPI_EnumPhysicalGPUs(handles, &count)                                                       0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0437] busIdResult = NvAPI_GPU_GetBusId(handles[i], &busId)                                                   0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0457] result = NvAPI_EnumTCCPhysicalGPUs(handles, &count)                                                    0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0849] adl = LoadLibraryA("atiadlxx.dll")                                                                     140719011266560      (0x00007FFBB2AE0000)
[05.04.2021 19:07:00][main.cpp:0888] result = ADL2_Main_Control_Create(ADL2_Main_Memory_Alloc, 1, &AdlContext)                              0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0919] result = ADL2_Adapter_NumberOfAdapters_Get(AdlContext, &count)                                         0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0925] result = ADL2_Adapter_AdapterInfo_Get(AdlContext, adaptersInfo, sizeof(AdapterInfo) * count)           0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:07:00][main.cpp:0934] idResult = ADL2_Adapter_ID_Get(AdlContext, adaptersInfo[i].adapterIndex, &id)                          -5                   (0xFFFFFFFFFFFFFFFB)
[05.04.2021 19:07:00][main.cpp:1173] result = ADL2_OverdriveN_PowerLimit_Get(AdlContext, AdlGpuIndexes[gpuBusId], &powerLimitSettings)      0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:1180] result = ADL2_OverdriveN_PowerLimit_Set(AdlContext, AdlGpuIndexes[gpuBusId], &powerLimitSettings)      -1                   (0xFFFFFFFFFFFFFFFF)
[05.04.2021 19:07:00][main.cpp:0401] result = NvAPI_Unload()                                                                                0                    (0x0000000000000000)
[05.04.2021 19:07:00][main.cpp:0902] result = ADL2_Main_Control_Destroy(AdlContext)                                                         0                    (0x0000000000000000)

I also tried to modify these parameters with OverdriveNTool, but nothing happens.
Modifying it with Afterburner works.

I'm on Windows 10 and I run NvApiOc as an Administrator.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.