Launching a game on a Linux system equipped with dual monitors can be a challenging experience, especially when your primary display is not always correctly recognized. Depending on both your specific hardware configuration and the display server in use, the fullscreen functionality may sometimes behave erratically. For example, you might encounter issues where the game appears stretched, launches on the incorrect screen, or allows your mouse to move freely across screens instead of staying locked on a single display.
By implementing the right configurations and adjustments, you can achieve a seamless fullscreen experience on one monitor while still utilizing your secondary display. Additionally, for those who desire a panoramic gaming view, tools like Gamescope or methods like creating a virtual monitor with XRandR or Nvidia TwinView can enable an immersive gameplay experience across both screens.
Switching to Wayland as Your Display Server
Linux offers flexibility in display options, primarily through X11 and Wayland. The legacy X11 system often treats your monitors as a single expansive surface; this can lead to games stretching across displays, launching on unintentional screens, or reducing refresh rates due to mismatched monitor capabilities.
By contrast, Wayland serves as a more advanced replacement, handling fullscreen requests with adept precision, thereby isolating games to one specific monitor without disrupting the overall desktop experience. Most contemporary distributions, such as Fedora and Ubuntu, have made Wayland the default setting, resulting in a more polished gaming experience. If you’re still on X11, switching to Wayland may resolve numerous fullscreen issues effectively.
To check your current session type, you can open a terminal and execute:
echo $XDG_SESSION_TYPE

Should the output reveal “x11, ”it indicates you’re on the legacy system. Conversely, “Wayland”shows you’re using the modern configuration. Log out from your current session, click the gear icon on the login screen, and select Wayland (or Plasma on Wayland if using KDE) before logging back in.
Correctly Designate Your Primary Monitor
Often, fullscreen complications arise because the incorrect monitor is designated as the primary display. To set your gaming monitor as primary in KDE, navigate to System Settings and select Display. In GNOME, follow a similar path through Settings > Displays.
After saving your changes, restart your game. If the issue persists and the game opens on the undesired monitor, consider launching Steam directly from the monitor where you want the game to be displayed, as many games adopt Steam’s position as their baseline.
Utilizing Borderless Window Mode
The disparity in performance between exclusive fullscreen and borderless windowed mode has significantly diminished under modern environments like Wayland and current compositors such as KDE Plasma or GNOME.
To implement this, access your game settings and modify the Display Mode to Borderless Windowed. Ensure the resolution matches your monitor’s native settings, and verify that your gaming monitor is set as Primary in system preferences.
This approach allows the compositor to maintain control, eliminating issues like display switching and blackout of the second monitor while enabling smooth navigation via Alt + Tab. For most gaming titles, this setup suffices. If native support is lacking, various tools exist to enforce this mode.
Employing Gamescope Compositor
Gamescope, a micro-compositor developed by Valve, is designed to create an optimal gaming environment, particularly on the Steam Deck. It manages mouse capture, resolution enforcement, refresh rates, and even focuses for multi-monitor setups, significantly reducing fullscreen-related glitches.
You can install Gamescope in different ways depending on your Linux distribution. For example, on distributions that are regularly updated like Arch Linux and Fedora, you can find it in the official repositories. For Arch Linux (or Arch-based distributions), install it using:
sudo pacman -S gamescope
For Fedora, use:
sudo dnf install gamescope
If a recent version isn’t available for your distribution, building Gamescope directly from the official GitHub repository is always an option.
Once installed, configure your Steam Launch Options as follows:
gamescope -f -w 2560 -h 1440 -r 144 -- %command%
Modify the -w and -h flags to match your monitor’s resolution and set -r to correspond to your refresh rate. The -f flag ensures fullscreen mode, effectively constraining the game to avoid interference with the second monitor.
Optimizations for Steam, Lutris, and Heroic
For many Linux gamers who use Steam with Proton, there are additional adjustments to enhance fullscreen behavior. Right-click on your game in Steam, go to Properties, and find the Launch Options under the General tab. You can add the following:
SDL_VIDEO_FULLSCREEN_DISPLAY=0 %command%

This variable instructs SDL-based games regarding the appropriate monitor for fullscreen mode. If the game still defaults to the incorrect screen, change the 0 value to 1 (or another number) based on your monitor configuration.
Additionally, testing various Proton versions might yield beneficial results. Under the Compatibility tab, consider selecting Proton Experimental or the latest stable version. Certain fullscreen and multi-monitor issues may stem from specific Proton builds, and switching versions could resolve these conflicts seamlessly.
For games outside of Steam, frameworks like Lutris and Heroic Games Launcher provide similar functionalities. In Lutris, right-click the game, select Configure, navigate to Runner Options, and enable Windowed (Virtual Desktop).

This option creates a virtual desktop in a single window at a resolution you choose. Match this resolution to your monitor’s native size to prevent stretching across multiple displays and losing focus with Alt + Tab.
In Heroic Games Launcher, you can enable Gamescope through the game’s Wine or Proton settings with a straightforward toggle. It ensures the game runs within a controlled environment, locking it to one display without needing complex command-line setups.
Controlling Displays with XRandR
If you prefer remaining on X11, monitor management can be achieved using the XRandR tool. Use the terminal command xrandr to display connected monitors and identify their names (for instance, HDMI-1 or DP-1).
To promptly disable the secondary monitor prior to starting a game, use the command:
xrandr --output HDMI-1 --off
Ensure to replace HDMI-1 with your actual secondary monitor identifier. Once finished, re-enable the monitor with:
xrandr --output HDMI-1 --auto
This approach may be more hands-on, but it effectively guarantees the game is rendered in true fullscreen mode on your remaining display.
Both KDE (KWin) and GNOME (Mutter) feature configurations, such as enabling unredirect fullscreen windows or disabling compositing for fullscreen applications. Activating these settings can noticeably increase performance and help eliminate minor stuttering issues.
Concluding Remarks
Optimizing your Linux gaming setup requires a basic understanding of your system’s capabilities. With suitable configurations, you can successfully manage multiple displays for gaming while concurrently keeping your secondary monitor functional for other tasks. Also, consider exploring methods to enhance gaming performance in Linux, such as using GameMode.
Leave a Reply