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,
- First, you need to find the right
DisplayDevice
or GPUOutput
that you want to write EDID information to. There are multiple ways to do so.
- Get a list of all
PhysicalGPU
s in the system using the NvAPIWrapper.GPU.PhysicalGPU.GetPhysicalGPUs()
static method, then select the PhysicalGPU
you desire based on your logic. After finding the right PhysicalGPU
, use the NvAPIWrapper.GPU.PhysicalGPU.GetDisplayDevices()
method to get a list of all connected DisplayDevice
s to that GPU and store the right one in a variable.
- Instead of searching for connected
DisplayDevice
s, you can also go for the GPUOutput
s. Just like before, you first need to find the right PhysicalGPU
and then you can get a list of all GPUOutput
s using the NvAPIWrapper.GPU.PhysicalGPU.ActiveOutputs
property and store the right GPUOutput
in a variable.
- Another way to find the right
DisplayDevice
is to go for a list of all Displays
. To do so, you need to use the NvAPIWrapper.Display.Display.GetDisplays()
static method. This returns an array of Display
s. Then using the NvAPIWrapper.Display.Display.DisplayDevice
property, you can get the corresponding DisplayDevice
of a Display
.
- After finding the right
DisplayDevice
or GPUOutput
, you should use the NvAPIWrapper.GPU.PhysicalGPU.WriteEDIDData()
method. This method allows you to write EDID data stored in a byte array to the DisplayDevice
or the GPUOutput
you selected before.
Note: Make sure to capture NVIDIAApiException
and check for the NVIDIAApiException.Status
property in case something went wrong.