How to select monitor to launch games in dual-monitor setup?

Someone else posted a similar query was posted several months ago but was not answered.

I have a dual-monitor setup. Left monitor is a 144Hz AOC and is the primary monitor. Right monitor is an older 60Hz Dell.

Game will only launch on the right monitor. If it’s set to windowed mode and moved to the left monitor, the game will relaunch on the right.

Information on the system is here: https://paste.ubuntu.com/p/8NPjXTjBkq/

I’m hoping there are options in Lutris to select which monitor games are launched on.

Hey,

did you set your 144hz monitor as the primary monitor in your graphics settings?

In Lutris? The 144Hz monitor is set as primary in Displays.

Does that mean that all games do not start on the 144 hz monitor?

Really only have two games in Lutris right now, and only play one of them.

don’t start both games on the 144 hz monitor?

I had a similar question and got it resolved by doing the following steps

  • Open Terminal and run xrandr

  • Identify the monitor i want my game to run on.
    In my case I have two monitors connected which had the identifiers of “DP-1” and “DP-3”.
    I want the game to use the display identified by DP-1.

  • Launch Lutris.

  • Right Click game and select configure.

  • Navigate to system options.

  • Scroll down to Game execution.

  • Add the following in the “Key” field: __GL_SYNC_DISPLAY_DEVICE

  • Add your previous identified identifier in my case DP-1 to the Value field.

  • Save and start the game

So, I entered “xrandr” into my terminal and it showed “DisplayPort-2” as my primary display.
I entered the information you said to enter into the “Game execution” table and it isn’t working. The game keeps showing up on the wrong monitor.

I’m having the same problem. xrandr identified two monitors: eDP-1 and HDMI-2. In my case I’m trying to play (classic) Starcraft. The trouble is that Lutris doesn’t launch the game directly; it first launches a Battle.net window which then, in turn, launches the game. So even when I set __GL_SYNC_DISPLAY_DEVICE to HDMI-2 it launches Battle. net on the correct monitor, but then when I click on the button inside the Battle.net window to separately launch Starcraft, that gets shunted back over to the first monitor.

I have the same problem when I attach my HDMI projector. If I boot with it attached, it becomes display #1, and everything is drawn to it, so I plug it in after system is running. Its down to WINE providing a display list to Battlenet and then that is going wherever the priority is.

Lutris’s only option at the moment is to disable other screens.

Outside of Lutris you can use gamescope to do this (-O displayid), but it needs a capable graphics driver, and that option is not something Lutris supports in gamescope settings right now.

Since Lutris runs the required display detection on startup, and support is going in a Proton/gamescope direction, it seems right for a feature request on GitHub.

Edit: Quick hacky PoC to the python code, calls in DISPLAY.MANAGER.get_display_names for a list, then the edited gamescope launch options uses it as a parameter for -O
image