Second Screen Gaming Coming soon on Steam

Game audio stops when tabbed out? How to keep the sound on

Gaming headphones on a desk in front of a monitor showing a game

The music cuts out the moment you alt-tab or click your other monitor. That is the game's engine muting itself on purpose, and in most games it can be switched off.

How to keep game audio playing in the background

Second Screen Gaming picks the fix from the engine the game is built on:

  • Source games: it writes snd_mute_losefocus 0 into the game's autoexec.cfg.
  • Unreal Engine 4 and 5 games: it sets the unfocused volume to full in the game's Engine.ini. Start the game once before turning it on, because that file only exists after the first launch.
  • Unity and other engines: the focus assist answers the focus change the way a real return to the game would, which keeps most Unity games playing their sound. It works best with the game in windowed or borderless mode.

Configuration fixes take effect the next time the game starts. Every file is backed up before the first edit, and turning the fix off puts back each setting it changed.

If the game sits on a monitor with its own speakers, Send sound to that screen, an option of Run borderless on a chosen screen, plays the game through them.

Coming soon on Steam

Why games mute when you alt-tab

Game engines mute on focus loss on purpose, so a game left in the background does not keep playing at full volume. Source games do it with a console variable. Unreal games drop a volume multiplier to zero while the window is inactive. Unity games either keep running in the background or stop entirely, depending on a choice the developer made when building the game.

How to keep game sound on by hand

The right file differs by engine, some games put their settings back after an update, and Unity games cannot be changed this way at all. Where it does work:

  1. Look in the game's audio settings for "Mute when unfocused", "Mute in background" or "Background audio".

  2. Source and Source 2 games: open the console and enter snd_mute_losefocus 0, or put that line in the game's autoexec.cfg so it sticks.

  3. Unreal Engine games: open Engine.ini in the game's folder under %LOCALAPPDATA%, inside Saved\Config\Windows (or WindowsNoEditor in older games), and add:

    [Audio]
    UnfocusedVolumeMultiplier=1.0
    

    The folder is named after the game's internal project name, which is not always its title.

Common questions

Why does turning the game up in the Volume mixer not help?

The game mutes its own sound before it reaches Windows, so the mixer still shows it at full volume while nothing comes out. The fix has to happen inside the game.

Game sound gets quieter when I join a Discord call. Is that the same problem?

No. That is Windows lowering other sounds during a voice call. Open the Sound control panel, go to the Communications tab and choose Do nothing. Discord has its own Attenuation setting too, under Voice & Video.

Does it work with Unity games?

Usually, through the focus assist. Whether a Unity game keeps running in the background is fixed when the game is built, so there is no file to edit. The focus assist makes the game believe it never lost focus instead.