When using an HDR-enabled display in Windows 11, we can use the "SDR content brightness" slider in Settings > System > Display > HDR to control how bright the regular non-HDR elements are on screen.
E.g. if the display has a max of 400nit and the slider is set to 60%, the SDR content is shown at 240nit brightness.
Windows 10 has something similar too.
I'd like to be able to change the value of the slider programmatically, so I can have a brighter desktop during the day, and a dimmer one during the evening.
The "old" ways changing brightness through WMI or DDC/CI don't work on HDR-enabled displayed.
I used ProcessMonitor to see what the slider does, but it generates way too many entries, and the only relevant bits I can see are that it changes the registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\MonitorDataStore\DELA1E4#G7IYMxgwAAgX_10_07E6_A1\SDRWhiteLevel
.
The value is from 1000 (0%) to 3500 (50%) to 6000 (100%) in dec on my display, where 1000 equals 80nit.
Once the SystemSettings.exe has changed the registry value, it calls something in D3D12 to actually apply the change.
Looking through the Microsoft documentation on Win32 API, I can't find any relevant information.
Anyone knows how to get it to work please? Any language will do, PowerShell, C#, C++, Python...
Thank you.