Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Xorg hang in Elder Scrolls Online Installer (306130) #186

Open
wants to merge 1 commit into
base: experimental_7.0
Choose a base branch
from

Conversation

sulix
Copy link
Contributor

@sulix sulix commented Apr 11, 2023

The Elder Scrolls Online Installer (which runs the first time the game is played), is something of a stress-test for Wine's X11 backend.

In particular, it resizes, moves, and maximizes (for fullscreen) several windows with logos, before toggling fullscreen off and using an alpha-blended "launcher" UI. Interestingly the "fullscreen" windows end up 1442×902 on my 1440×900 display, which possibly contributes to the issues (maybe WM_BORDER?).

When doing this, it can end up in a loop whereby X11Drv_WindowPosChangedcallssync_window_position``, which triggers a reconfigure, etc. This endless stream of reconfigures causes Xorg to effectively hang, making interaction with the computer impossible. This happens for me with a KWin/nVidia setup, on both real Xorg and via Xwayland.

Using KWin may be part of the issue, as sync_window_position toggles _NET_WM_FULLSCREEN when KWin is used, as its not possible to move/resize fullscreen windows under KWin.

By making sync_window_position() only reconfigure things which have actually changed, the issue goes away, and the installer works fine.

(I'm not an expert on this code, so it's possible I've broken something else. I can put it behind a SteamGameId check if that'd help.)

sync_window_position() calls XReconfigureWMWindow() to update the window
with a new position or size. However, it unconditionally assumes that
the size has changed, and sets the mask and calls XReconfigureWMWindow()
anyway. In addition, it will toggle the fullscreen state on KWin, to
work around the fact that _NET_WM_FULLSCREEN windows can't be moved
there.

Instead, only set the mask based on which properties have actually
changed, and don't do anything (except updating shaped windows, if
required) if the resulting mask is 0.

This fixes an issue with the Elder Scrolls Online installer, which can
cause Xorg (and even Xwayland) to hang due to ending up in a Reconfigure
loop.

Signed-off-by: David Gow <david@ingeniumdigital.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant