1. Home
  2. Linux
  3. Prevent windows games from changing monitor resolution on linux

How to prevent Windows games from changing monitor resolution on Linux

A lot of Windows games, when running on Linux can manipulate the native display resolution of Linux desktop sessions and change them to the wrong size. Games switching resolutions is a severe annoyance, and it’s something that many Linux users would like to know how to fix. So, here’s how to prevent Windows games from changing monitor resolution on Linux.

Method 1 – change game display mode to windowed

One way to prevent Windows games you run on Linux via Wine is to go into the settings of the game itself and change it to “windowed” mode. To set your game in windowed mode, locate “Settings,” followed by “Video” and set it to “Windowed” mode.

Windows mode puts the game into a window, like every other program on your Linux desktop, which will prevent it from manipulating the display size (which windows games often do on Linux.)

Keep in mind that all games are different, and the game you are playing through Wine on Linux may not support non-fullscreen modes. If this is the case, you’ll need to try out some of the other method covered in this guide.

Method 2 – install games in Proton via SteamPlay

Proton and SteamPlay are technologies that Valve has been working on to vastly improve generic Wine on Linux, and how it handles video games. By far one of the best things about this new technology is that it requires little to no configuration, and also comes with several Linux fixes that enable Windows games to run better than they would on traditional Wine. There’s a lot less likelihood of these Windows games messing with your Linux desktop’s screen resolution while playing with SteamPlay.

Access SteamPlay/Proton on Linux

To install games through this method, all that’s required is that you install the latest release of Steam. To do this on Linux, head over to Pkgs.org and get the app working on your Linux OS of choice.

Once you’ve got the latest release of the Linux Steam client up and running, click here to follow our in-depth guide all about enabling SteamPlay on Linux. Then, search your Steam library for a game and click the “install” button to get it working with SteamPlay!

Method 3 – use Wine virtual desktop feature

Wine has a built-in feature called “virtual desktop.” When enabled, this feature can be used to generate a safe, Windows-like space to execute programs where none of the running applications interact with the Windows ones.

The virtual desktop feature isn’t very well-known to Linux users on Wine, and many don’t bother to mess with it because of it. However, if you’re running Windows games on Linux through Wine, and can’t use SteamPlay or enable windowed mode within the game, this is your best bet.

Before we begin

The virtual desktop feature in Wine is accessible in nearly every version of Wine — even old ones. That said, if you’re running into graphical issues when playing your Windows games, it’s a great idea to get Wine up to date, as it includes tons of graphical patches and improvements for gamers.

To update to the latest stable version of Wine, open up your Linux software updater and install all available software patches. Or, consider following our guide to learn how to upgrade from the version of Wine you’re currently running to version 4.

Detect your desktop resolution

The best way to use the Wine virtual desktop feature is to have it mimic the exact screen resolution of your monitor. So, before setting Wine’s virtual desktop to use your monitor’s resolution, you must figure out what it is.

Look inside of the display settings on your Linux desktop for “display,” or “resolution” and open it. It should print out the resolution. Or, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard and enter one of the commands below.

Xdpyinfo

xdpyinfo  | grep 'dimensions:'

Xrandr

xrandr | grep '*'

Keep the terminal window open, as it will have the display size information listed, as you will need it later.

Set Wine virtual desktop

All configuration for Wine is done inside of the Wine configuration app. To access this app, press Alt + F2 on the keyboard to open up the desktop quick-launcher. Then, write the following command into the launch window to access the Wine settings.

winecfg

With the Wine configuration settings window open, you’ll see several different tab pages to choose from. Locate the tab called “Graphics” and click on it with the mouse to access it.

On the “Graphics” page, locate “Emulate a virtual desktop” and check the box next to it to enable the feature. Then, move on down to the “Desktop size” area and write in your monitor’s display resolution.

Click the “Apply” button to change the settings and enable the Wine virtual desktop feature. Once enabled, all Windows games running on Linux will not be able to manipulate the screen resolution on your computer.

Comments are closed.