Using NVAPI, I’m needing to retreive the display resolution and exact timings settings that are currently being used on the active display.
Looking at the NVAPI documentation, the function NvAPI_DISP_GetTiming seems to get the closest to what I want. But the exact role of this function is not 100% clear to me. Is it meant to calculate a set of timings based on the user’s requirements as described in the NV_TIMING_INPUT structure? Or is it used to get the currently used active timings?
It looks to me like the first answer is true: you pass it your desired resolution and any flags, and it returns timings based on those.
However, what I want is to see what timings are currently active.
If this is the case, the only way I can see is through using the _NV_TIMING_OVERRIDE structure inside the NV_TIMING_INPUT structure passed to this function, and setting it to NV_TIMING_OVERRIDE_CURRENT (the comment next to that says it will “get the current timing”). Sounds perfect, but then again: the documentation about NV_TIMING_OVERRIDE states that "The timing override is not supported yet; must be set to _AUTO. ".
So does this mean that the feature to use the override to get current timings is not supported yet? Will it be in the near future? Or should I look completely somewhere else to get the current display timings information?
Thank you very much for your support.
I’ve now done some research of my own into this question, and it remains unsolved.
Although the documentation states that NV_TIMING_OVERRIDE settings are unsupported, they seem to be partly supported. Setting this to NV_TIMING_OVERRIDE_AUTO for me resulted in the NvAPI_DISP_GetTiming returning timings for my monitor’s native 1680x1050 resolution - regardless of which desired resolutions I entered into the NV_TIMING_INPUT struct. So requesting 640x480 still gave me a 1680x1050 result.
When using different NV_TIMING_OVERRIDE values, such as CVT or CVT_RB, resulted in getting timings for the resolution I requested - nice. Seems that it’s supported (partly) after all.
Some other settings for NV_TIMING_OVERRIDE resulted in NVAPI errors.
The one I was interested in most, NV_TIMING_OVERRIDE_CURRENT, simply gave the same result as NV_TIMING_OVERRIDE_AUTO. It didn’t give me the currently used set of timings (I checked by having different timings active at run-time).
A disappointment. The question remains: is there any way to access the timings currently used by the card? If what I tried was indeed correct, when will this feature be supported properly?
A few years later, and I would like to solve the same problem. It appears that NV_TIMING_OVERRIDE_CURRENT still has not been implemented :-/
Either that, or Windows rendering at one resolution and the graphics card is sending information at another resolution?
Edit: After further review, it appears that the resolution that you select in Windows Display settings or the Nvidia control panel are not necessarily what is driven to the screen. NV_TIMING_OVERIDE_CURRENT seems to work fine.