Jump to content

How to stop Monitor from sleeping while playing Fallout 4


MadeUpName92

Recommended Posts

How do I remove this code box?

This was driving me crazy and a bit of searching made me realize many people have the same problem.

You go AFK while Fallout 4 is running only to return to find your monitor went to sleep (as per your power settings) and it won't wake back up. Usually you have to hit the reset button on the PC to get it usable again.

Well no more! Create this batch file and start the game using it.

(I have Fallout 4 installed on Drive C: and use F4SE to start Fallout 4. (If you don't use F4SE you can remove the entire loop section of the code))

 

If your game is installed elsewhere, find the executable you use to launch the game and shift-right click on it, choose "copy as path" and replace the following line in the batch file with your own.

"C:\Games\Steam\steamapps\common\Fallout 4\f4se_loader.exe"

You can change the last number, 5 in my case, to however many minutes you usually have the monitor sleep time set to.

If your using a laptop there's a few extra lines for when your running on the battery. Add powercfg /change monitor-timeout-dc 0

below line #2 and powercfg /change monitor-timeout-dc 5 at the bottom.

:: This sets the monitor to never sleep.
powercfg /change monitor-timeout-ac 0
::
:: This starts fallout4.exe via f4se_loader
c:\windows\system32\cmd.exe /c start /wait "" "C:\Games\Steam\steamapps\common\Fallout 4\f4se_loader.exe"
::
:: This starts a loop that checks if fallout4.exe is running every 30 seconds. When fallout4 is no longer the loop ends.
SETLOCAL EnableExtensions
set EXE=Fallout4.exe
:LOOPSTART
FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% goto FOUND
goto FIN
:FOUND
TIMEOUT /T 30
goto LOOPSTART
:FIN
:: This sets Monitor sleep back 5 minutes 30 seconds after you close the game.
powercfg /change monitor-timeout-ac 5
Edited by MadeUpName92
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...