Fix Xorg hang in Elder Scrolls Online Installer (306130)#186
Open
sulix wants to merge 1 commit intoValveSoftware:experimental_7.0from
Open
Fix Xorg hang in Elder Scrolls Online Installer (306130)#186sulix wants to merge 1 commit intoValveSoftware:experimental_7.0from
sulix wants to merge 1 commit intoValveSoftware:experimental_7.0from
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_WindowPosChanged
callssync_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_positiontoggles _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.)