How do you call this method on Nvidia GPU:
NVAPI_INTERFACE NvAPI_GPU_SetEDID (
NvPhysicalGpuHandle hPhysicalGpu,
NvU32 displayOutputId,
NV_EDID * pEDID
)
I need to execute the above command to remove all EDID set on all DisplayOutputs on our new Quadro Graphics Cards. Based on the API documentation, I tried searching for NvPhysicalGpuHandle and came across this project/library:
https://github.com/openhardwaremonitor/openhardwaremonitor/blob/master/Hardware/Nvidia/NVAPI.cs
This does not have the method I need NvAPI_GPU_SetEDID
I am not hardware programmer, I just need to be able to call this one command. any ideas? Can this be achieved using nvapi.dll/nvapi64.dll via pinvoke or something?
I personally didn't test this, but you can try the library and see if it can set EDID information without any problem, if it fails, please open an issue.
https://github.com/falahati/NvAPIWrapper
Here is how you should do it,
DisplayDeviceorGPUOutputthat you want to write EDID information to. There are multiple ways to do so.PhysicalGPUs in the system using theNvAPIWrapper.GPU.PhysicalGPU.GetPhysicalGPUs()static method, then select thePhysicalGPUyou desire based on your logic. After finding the rightPhysicalGPU, use theNvAPIWrapper.GPU.PhysicalGPU.GetDisplayDevices()method to get a list of all connectedDisplayDevices to that GPU and store the right one in a variable.DisplayDevices, you can also go for theGPUOutputs. Just like before, you first need to find the rightPhysicalGPUand then you can get a list of allGPUOutputs using theNvAPIWrapper.GPU.PhysicalGPU.ActiveOutputsproperty and store the rightGPUOutputin a variable.DisplayDeviceis to go for a list of allDisplays. To do so, you need to use theNvAPIWrapper.Display.Display.GetDisplays()static method. This returns an array ofDisplays. Then using theNvAPIWrapper.Display.Display.DisplayDeviceproperty, you can get the correspondingDisplayDeviceof aDisplay.DisplayDeviceorGPUOutput, you should use theNvAPIWrapper.GPU.PhysicalGPU.WriteEDIDData()method. This method allows you to write EDID data stored in a byte array to theDisplayDeviceor theGPUOutputyou selected before.Note: Make sure to capture
NVIDIAApiExceptionand check for theNVIDIAApiException.Statusproperty in case something went wrong.