it needs to record to a file, or have a history with time stamps, since I will test with single display.
The WDDM driver model needs to handle ACPI messages from the hardware. Quick test on NVidia and ATI showed that both pass them properly along the chain to the OS, which then passes them down to individual windows. At least on my two boxes.
You don't find them under Windows Messages. You need to read the WDDM SDK include files. It's all nice in there Short view on dispmprt.h will open your eyes
I can see hotplug, display changes and display power changes fine here.
Of course we cannot send commands to HDMI devices without a CEC Module or hooking ourselves into the GPU driver. But we can see what the displays are doing.
if you build just a little standalone exe test script that will record pwr on/off I can test it for you.
Can do...
; Initialize Monitor handle
hMon := DllCall("MonitorFromPoint"
, "int64", 0 ; point on monitor
, "uint", 1) ; flag to return primary monitor on failure
; Find number of Physical Monitors
DllCall("dxva2\GetNumberOfPhysicalMonitorsFromHMONITOR"
, "int", hMon
, "uint*", nMon)
; Get Physical Monitor from handle
VarSetCapacity(Physical_Monitor, (A_PtrSize ? A_PtrSize : 4) + 128, 0)
DllCall("dxva2\GetPhysicalMonitorsFromHMONITOR"
, "int", hMon ; monitor handle
, "uint", nMon ; monitor array size
, "int", &Physical_Monitor) ; point to array with monitor
hPhysMon := NumGet(Physical_Monitor)
DllCall("dxva2\GetMonitorBrightness"
, "int", hPhysMon
, "uint*", minBright
, "uint*", curBright
, "uint*", maxBright)
DllCall("dxva2\GetMonitorCapabilities"
, "int", hPhysMon
, "uint*", pdwMonitorCap
, "uint*", pdwMonitorSup)
MsgBox % "Monitor description: " . StrGet(&Physical_Monitor+(A_PtrSize ? A_PtrSize : 4), "utf-16")
. "`nMinimum brightness: " . minBright
. "`nMaximum brightness: " . maxBright
. "`nCurrent brightness: " . curBright
. "`nPdwMonitorCapabilities: " . pdwMonitorCap
. "`nPdwMonitorSupport: " . pdwMonitorSup
Of course we cannot send commands to HDMI devices without a CEC Module or hooking ourselves into the GPU driver. But we can see what the displays are doing.
Of course we cannot send commands to HDMI devices without a CEC Module or hooking ourselves into the GPU driver. But we can see what the displays are doing.
I was under an impression that today's GPUs aren't having any CEC functionality so it wound't even help if GPU drivers are poked around.
Of course we cannot send commands to HDMI devices without a CEC Module or hooking ourselves into the GPU driver. But we can see what the displays are doing.
I was under an impression that today's GPUs aren't having any CEC functionality so it wound't even help if GPU drivers are poked around.
To my knowledge Pin 13/17 are not physically disconnected on any GPU as this would break HDMI hotplugging as well which obviously works. You turn off the display and Windows detects this. This means CEC is possible as well in theory unless the firmware artificially blocks stuff. Need to poke around here more if I get bored.
But for detecting display turning on/off: The additional and removal of an HDMI audio render together with a resolution change should be accurate enough for most systems to detect this by normal messages from Windows.