Second Screen Gaming Coming soon on Steam

Keep a game running when it loses focus

Click away and the game freezes, drops to a crawl, or stops simulating until you come back. Two different things cause this, and they need different fixes.

Why it happens

The first is the game. Many engines stop or slow their game loop while the window is inactive: Unity games stop entirely unless the developer turned on Run In Background, Source games deliberately sleep between frames, and Unreal games can idle when they are not in front.

The second is Windows, which can throttle programs running in the background to save power. Task Manager shows this as Efficiency mode.

Free fixes first

  1. Look in the game's settings for "Pause when unfocused", "Pause in background" or "Run in background".

  2. Source and Source 2 games: enter engine_no_focus_sleep 0 in the console, or add that line to autoexec.cfg.

  3. Unreal Engine games: in the game's Engine.ini under %LOCALAPPDATA%, add:

    [SystemSettings]
    t.IdleWhenNotForeground=0
    
  4. For Windows throttling, find the game on Task Manager's Processes tab and make sure Efficiency mode is off for it. Setting Power mode to Best performance in Settings, System, Power also helps.

When the free fixes are not enough

Unity games cannot be changed from outside, because Run In Background is compiled in. Efficiency mode is set per process, so it has to be checked again every time the game starts.

How Second Screen Gaming fixes it

The focus assist sends the game the same activation messages Windows sends when you really switch back to it, so engines that listen for them keep running. It repeats them on a slow interval for engines that check again later, and with Answer the instant focus is lost turned on, it replies the moment you click away.

Unreal games are the exception: they ask Windows which window is in front instead of believing those messages, so they get the configuration fix instead.

The throttle exemption clears Windows' background power throttling for the game's process.

The tray agent re-applies both whenever the game starts again, so there is nothing to redo.