Unreal Launcher Prevents Monitor Being Shut Down And ScreenSaver

Unreal Launcher prevents monitor being shut down and even prevents screensaver.
Laptop monitors dont have a button to power off and it prevents the only way being shut down.
It does not affect all laptop monitors, some monitors can only be opened with mouse or keyboard interrupt while some are also can be opened with programs taking focus.
It must be same reason that also prevents screensaver.

I remember adding some code in the UE3 timeframe to handle WM_SYSCOMMAND to prevent the screensaver from kicking in. That was when I was still writing code so I pinged someone to sanity check and look into it in my stead :slight_smile:

Back then the reason was that “device lost” scenarios with DX9 often led to crashes outside our control and lighting rebuilds took a while, leading to the screensaver being activated. Not a winning combination as LDs weren’t happy about an immediate crash when unlocking their machine after a lengthy lighting rebuild.

This should no longer be necessary with DX11 and modern Windows… I think :wink:

Hey caner_ozdemir, I digged into the code a bit, and it looks like on Windows at least we’re handling the correct windows message events. When we get a WM_SYSCOMMAND message, we fall through on anything other than SC_RESTORE (to handle the case you Dan mentioned) and SC_MAXIMIZE. We’ve tried it on several laptops here and weren’t able to get a good repro. Are you seeing the problem on Mac or Windows laptops? Does the editor running alone also exhibit the same behavior?

My laptop is based on MSI GT70 Barebones.
If you are serious to solve this problem, and if you think it could help, I would take a video.
The editor is running alone.
I downloaded a program that makes the monitor close and guess what, after 20 seconds or so, Unreal Editor makes it opens up again.

We definitely want to help you figure out how to fix this :).

There’s a windows command line program that reports back what apps are preventing sleep and why, would be useful to run in this case. It will probably tell us what we already know (that it’s UnrealEd or the UnrealEngineLauncher), but it should also tell us what about it prevented the sleep call (network access possibly). Can you open up a command prompt window with elevated privileges (Windows+F, search for command prompt, right click and run as administrator). In the command prompt window, enter “powercfg -requests”. Thanks in advance!