protonscr

weird multi-monitor cursor issues: need ability to set initial monitor for game to spawn in

protonopen
ValveSoftware/Proton#5053 · opened 2021-08-08 by ExpandingMan · updated 2021-09-29 · 6 comments · github
EExpandingMan 2021-08-08 github

Compatibility Report

  • Name of the game with compatibility issues: many, if not all, have seen in "Elite Dangerous", "the Ascent", "Mechwarrior 5", "Phoenix Point"

System Information

Below is output of inxi -SMG

System:    Host: asus-desk-1 Kernel: 5.10.53-1-MANJARO x86_64 bits: 64 Desktop: i3 4.19.1 Distro: Manjaro Linux
Machine:   Type: Desktop Mobo: ASUSTeK model: TUF GAMING X570-PLUS (WI-FI) v: Rev X.0x serial: <superuser required>
           UEFI-[Legacy]: American Megatrends v: 0807 date: 07/08/2019
Graphics:  Device-1: NVIDIA TU104 [GeForce RTX 2080 SUPER] driver: nvidia v: 470.57.02
           Display: x11 server: X.Org 1.20.11 driver: loaded: nvidia resolution: 1: 2560x1440 2: 2560x1440~144Hz
           OpenGL: renderer: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 470.57.02
  • Proton version: 6.3-20210730

Steam system info here.

I confirm:

I couldn't find an issue that I thought was the same. There are several games with reports which are maybe related, but I don't see a report of the entire issue.

Symptoms

When using multiple monitors, the mouse cursor will have some pretty strange behavior depending on the window mode. In particular, I have two monitors one to the left (starting at x-coordinate 0) with the other to the right. The monitor on the right is my primary monitor (at least nvidia-settings recognizes it as such). Most games seem to want to start on my left monitor, despite that fact that it is not primary. I have tried physically swapping the monitor outputs in case there is some preference, but it doesn't seem to make any difference. When I move the game from the left monitor to the center monitor, in many cases when I try to play the game (which is now in the the correct, right, monitor) the cursor will stay stuck in the left monitor (sometimes this is even the game cursor and not the OS cursor). Weirdly, the game still controls as if it were in the left screen with the cursor in the right.

The only workarounds I can find are to change the window settings in-game. Fullscreen usually seems better than borderless. I have never had this problem with a game in true windowed mode even if it is actually running in fullscreen. Some (too few) games have a monitor select, but the consequences of using this are a little unpredictable and frankly I haven't documented carefully enough what happened when trying to use it.

It may well be that the mouse issue in particular is some sort of artifact of using i3, but regardless of what window manager is being used, it seems like a problem that games output monitor can't be configured easily. It would be really great if this could be a compatibility setting (I didn't see it), though I of course have no idea if this is easier said than done.

Reproduction

Launch any of the above mentioned games for the first time. Sometimes changing window configuration in game (e.g. fullscreen instead of borderless) seems to fix the issue permanently for that game.

Iipr 2021-08-09 github

That may be related to Nvidia drivers or the window manager (i3)/Xorg.

I have seen similar problems before but currently on Gnome/Wayland + Debian/testing (AMDGPU) majority of games open on correct monitor.

Can you test different window managers?

Aarrowgent 2021-08-09 github

many games wish to start on Display:0 which is the main window
preferably we could have a wine/proton option for which display area (monitor) that wine opens windows on

many times we can push a window to Display:1 but the mouse retains active on display:0 requiring alt-tabbing and then clicking over to the "right" window

if a game is designed to close the main window during transitions it REOPENS on the "left" display:0, requiring moving it again to the "right"

its not unique to specific WM or DE, this happens across many WM and drivers

note that SOME games retain this information of which display area position it was last opened on, and always opens on the second "right" monitor ie: display:1

this is also not specific to wine/proton, this happens for native linux games also.

example:
full display area is "3840x1080" monitor left display:0 starts at 0x0, monitor right display:1 starts at 1921x0

EExpandingMan 2021-08-09 github

I have done some more experimenting with this, there seems to be good evidence that everything just wants to open at the X11 x coordinate of 0 regardless of monitor configuration. For the time being, I strongly suggest anyone using multiple monitors to set up whichever monitor they want to use for gaming as being the left-most. This can be really annoying and inconvenient, but at least you will never have to worry about where your games open and trying to move them.

Of course, it's still very much desirable to give wine/proton a way around this, despite how pervasive the problem is (would be kind of funny but cool if this worked better on wine/proton than native linux games).

Btw, Windows is not without similar problems. Occasionally a game would open in a wrong monitor and just refuse to move, though in window the "borderless" window format usually makes things "just work", whereas it still seems somewhat problematic in linux under wine/proton.

Hhashworks 2021-09-14 github

Also: Even when the game stays on the monitor it was started on, the mouse is bound to the left monitor.

EExpandingMan 2021-09-14 github

Also: Even when the game stays on the monitor it was started on, the mouse is bound to the left monitor.

That depends on whether the program is set to "capture" the cursor, but yes, it is incredibly annoying and wonky, Programs that don't try to do this work fine, but right now you don't have any options if a program does do it (and it can also sometimes cause weird bugs in the program).

Iipr 2021-09-29 github

At least KDE handles things differently than Gnome: I see some issues on KDE kwin that are not there on Gnome. Some games open on the wrong monitor, some don't update their display when dragged to another screen.. This is with kwin 5.21.

Nothing extracted yet.