Sometimes when I play League of Legends I have to briefly leave for a brief period. I turn off my monitor connect리ed to my pc via HDMI then turn it back on when I come back. The League of Legends window is frozen until I minimize than bring it back up from the task bar. The game runs as normal afterwards.

This got me thinking, does Windows contain an API that notifies programs about the monitor being off, which is fed to the programs that assume I am AFK and stop feeding graphics to save resources until they are 100% sure I am back? I do not experience any visual lag whatsoever during normal gameplay.

  • There is a WMI Win32_DesktopMonitor class that has an property called "Availability" which has 17 possible states that a monitor can be in (state 3 is "Running/Full Power"). That said, it's not very reliable and often reports completely the wrong thing. If you want to see if it works for you then run the code at superuser.com/a/1243906/46099
    – Richard
    Commented Oct 20, 2022 at 11:16

1 Answer 1


Yes and No.

No, Windows has no mechanism to detect it, but Yes, this is expected behavior.

With DVI-D, HDMI and DisplayPort, when you turn off the monitor, the monitor is actually uninstalled. When you turn it back on, it is installed again.

As the monitor is uninstalled the desktop area changes. Some programs and games don't like that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .