Steam freezes in certain cases on XWayland
Steam freezes in some cases running on XWayland. I can reproduce the issue by connecting a controller (DualShock 4 or Steam Controller). After Steam initializes the controller it just freezes. After some testing it seems to be an issue with XWayland, as I could bisect this issue to a commit.
git bisect log
# bad: [d68b50ec032fe4f02bde817abfd30328ec96a11c] Fix compilation with windows.h from latest w32api # good: [1dbb96ae48f1fa69752e71f25f03d2f733918ffb] Bump version for the Xwayland 21.1.2 release git bisect start 'd68b50ec032fe4f02bde817abfd30328ec96a11c' 'xwayland-21.1.2' # good: [c7730cfe5577ebde006d408f502766d8c3a73670] xwayland: Translate keyboard grabs on the root window git bisect good c7730cfe5577ebde006d408f502766d8c3a73670 # good: [407a2234b32d9cb3fed2cc7e8069bb41b98e143f] test/xi2: Update tests for gesture event types git bisect good 407a2234b32d9cb3fed2cc7e8069bb41b98e143f # good: [b6d54b0f5d2fb3dc8a4b2812bfee94112c332256] present: Dispatch clear_window_flip via present_screen_priv hook git bisect good b6d54b0f5d2fb3dc8a4b2812bfee94112c332256 # bad: [31d2ebca77fcabec81194ae6dcd724c699b1b513] xwayland/present: Drop target_msc member from struct xwl_present_event git bisect bad 31d2ebca77fcabec81194ae6dcd724c699b1b513 # good: [0c0cbbc7cb4fa917a2b33494efb6dc03e5de9051] present: Remove present_wnmd_info_rec git bisect good 0c0cbbc7cb4fa917a2b33494efb6dc03e5de9051 # good: [fc53e3c536b5a338c595b5724c7d0b4734e45871] xwaland/present: Drop flip_pending member of struct xwl_present_window git bisect good fc53e3c536b5a338c595b5724c7d0b4734e45871 # bad: [f8c086b2145d1c9364e9b43ff4d796791d8af169] xwayland/present: Fold xwl_present_event_notify into its caller git bisect bad f8c086b2145d1c9364e9b43ff4d796791d8af169 # bad: [4503c8d9ea7df5bda470501e638a730d91d718c9] xwayland/present: Fold xwl_present_idle_notify into its caller git bisect bad 4503c8d9ea7df5bda470501e638a730d91d718c9 # bad: [b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb] xwayland/present: Drop sync_flip member of struct xwl_present_window git bisect bad b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb # first bad commit: [b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb] xwayland/present: Drop sync_flip member of struct xwl_present_window
First bad commit: b2a06e07
- Run XWayland with b2a06e07 or later
- Start Steam
- Connect your controller (probably doesn't matter which one)
- Observe how Steam freezes shortly after
I suspect that this issue occurs because of Steam trying to show a little popup informing about the controller's profile.
See https://github.com/ValveSoftware/steam-for-linux/issues/7992 for additional info and a video demonstration.