How to apply enable/disable of DisplayId


My PC has two monitors and I want to enable/disable them via nvAPI
I’ve got their NV_GPU_DISPLAYIDS by NvAPI_GPU_GetConnectedDisplayIds
But I can’t apply setting isActive = 0

Can you help me, please? Thank you

Hi aqualungist,

I’m having the exact same issue. I can’t find a single clue in NVAPI’s documentation on how to set the isActive attribute.

My use case is very similar: I want to enable/disable individual screens, the same way I do so via the Nvidia Control Panel.

Did you find a solution?

Hi abadiaosta,

‘DisplayConfiguration’ sample code is provided in the public NvAPI SDK which can be used to check how to use the NvAPI ‘NvAPI_DISP_SetDisplayConfig’.

This API can be used to enable/disable the display. For more information and additional documentation of the API please refer the NVAPI header provided in the NvAPI SDK.

NVAPI Forum Moderator