0

I have in the past, used SendMessage(handle, 0x112, 0xF170, 2); to turn off the monitor leaving the machine on. It works great until Modern Standby came along and screwed everything up. The above now makes the entire computer go into sleep mode (S0 Low power idle) instead of simply turning off the screen and letting the computer on.

I have set in settings, for the screen to turn off after 1 minute, and sleep to start after 15 minutes. And the system is capable of doing this without the machine entering sleep mode after the first minute. I know windows can do this, I just am unsure of how or if something in the parameters needs to be changed.

My issue is similar to this one: SendMessage turn Off the monitor makes some system sleep in vb

Seth
  • 1,769
  • 4
  • 26
  • 39
  • Did you try `SendMessage(handle, 0x112, 0xF170, 1);` – Charlieface Sep 18 '22 at 23:01
  • @Charlieface, yes, doesn't do anything. Nothing happens unfortunately. Very aggravating this "modern sleep" has been – Seth Sep 18 '22 at 23:13
  • You may need to go a couple of *layers* down and use the low-level [Monitor configuration API](https://learn.microsoft.com/en-us/windows/win32/api/_monitor/). IIRC, you can set a VESA feature calling [SetVCPFeature](https://learn.microsoft.com/en-us/windows/win32/api/lowlevelmonitorconfigurationapi/nf-lowlevelmonitorconfigurationapi-setvcpfeature). Note that you need a physical Monitor Pointer. `[Screen].GetHashCode()` gives you the `HMONITOR` of a Screen, then call `GetPhysicalMonitorsFromHMONITOR()` to get the correct pointer for the call. – Jimi Sep 18 '22 at 23:59
  • IIRC2, you need to call `SetVCPFeature()` passing the *physical handle* (1st parameter), the VESA Power On/Off feature should be `214` (2nd parameter) and Power On should be `1`, Power Off `4` (3rd parameter) -- Give it a try – Jimi Sep 18 '22 at 23:59

1 Answers1

-2

Thanks for the tip, on a normal desktop PC SetVCPFeature works fine, however it does not work with a tablet (Surface 3 non pro). SetVCPFeature always returns false, and the screen is not turned off.

Here https://milek7.pl/ddcbacklight/mccs.pdf you can find a description of the SetVCPFeature parameters, I tried 2,3 and 5 instead of 4 without success. The internal display could not be switched off with these parameters

Also ControlMyMonitor.exe from nirsoft (https://www.nirsoft.net/utils/control_my_monitor.html) does not work, returns an I2C Error...

Donald
  • 17
  • 1