Xwayland completely freezes in some apps after upgrading to 23.1.0
After upgrading to Xwayland 23.1.0 I no longer can launch some fullscreen apps (e.g. ETS2 game from Steam using built-in Proton ). When I launch such app Xwayland freezes (I see only the first frame sent by the app, I cannot interact with desktop even on second display, while switching to other TTY works) and I'm forced to kill Xwayland (killing the app does not help) to be able to control my desktop again. The issue is 100% reproducible with same app on same PC. I tried to bisect the issue and here is bisect result:
bddfe190de4dea9ca2d9cdaca5ed98caacbd014c is the first bad commit
commit bddfe190de4dea9ca2d9cdaca5ed98caacbd014c
Author: Austin Shafer <ashafer@nvidia.com>
Date: Tue Dec 20 12:15:15 2022 +0100
xwayland: Implement linux_dmabuf_feedback event handlers
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
[ Michel Dänzer:
* Sort protocol #includes lexically.
* memcpy to &xwl_feedback->main_dev directly in
xwl_dmabuf_feedback_main_device. ]
hw/xwayland/xwayland-glamor.c | 217 +++++++++++++++++++++++++++++++++++++++++-
hw/xwayland/xwayland-glamor.h | 1 +
hw/xwayland/xwayland-screen.c | 2 +
hw/xwayland/xwayland-screen.h | 3 +
hw/xwayland/xwayland-window.c | 48 ++++++++++
hw/xwayland/xwayland-window.h | 43 +++++++++
6 files changed, 313 insertions(+), 1 deletion(-)
System info:
OS: Arch Linux
Xwayland: 23.1.0 (bddfe190 and newer according to git bisect)
NVIDIA driver: 530.41.03 proprietary (525.89.02 works, but with screen noise-like artifacts on screen in Xwayland fullscreen apps). When Xwayland is rolled back to 22.1.8, no such issues are present.
GPU: NVIDIA GeForce GTX 1080 Ti (with two displays, 1440p@60fps and 1080p@60fps, connected via DP)
Env: GNOME Shell 43.3, GDM 43.0, Mesa 23.0.1, Wayland 1.21.0, egl-wayland 1.1.11
This issue may be related to #1444 as all errors I found in logs are
gnome-shell[6715]: XXX fail to create fbo.
gnome-shell[6715]: (EE) glamor0: GL error: GL_INVALID_OPERATION error generated. <image> and <target> are incompatible
gnome-shell[6715]: (EE)
gnome-shell[6715]: (EE) Backtrace:
gnome-shell[6715]: (EE) 0: /usr/bin/Xwayland (0x55ec6350c000+0x16b405) [0x55ec63677405]
gnome-shell[6715]: (EE) 1: /usr/lib/libnvidia-eglcore.so.530.41.03 (0x7f527ac00000+0x11a7b45) [0x7f527bda7b45]
gnome-shell[6715]: (EE) 2: /usr/lib/libnvidia-eglcore.so.530.41.03 (0x7f527ac00000+0x11a7e9a) [0x7f527bda7e9a]
gnome-shell[6715]: (EE) 3: /usr/lib/libnvidia-eglcore.so.530.41.03 (0x7f527ac00000+0x128e8ba) [0x7f527be8e8ba]
gnome-shell[6715]: (EE) 4: /usr/bin/Xwayland (0x55ec6350c000+0x49642) [0x55ec63555642]
gnome-shell[6715]: (EE) 5: /usr/bin/Xwayland (0x55ec6350c000+0x4a42d) [0x55ec6355642d]
gnome-shell[6715]: (EE) 6: /usr/bin/Xwayland (0x55ec6350c000+0x1757e0) [0x55ec636817e0]
gnome-shell[6715]: (EE) 7: /usr/bin/Xwayland (0x55ec6350c000+0x1786fb) [0x55ec636846fb]
gnome-shell[6715]: (EE) 8: /usr/bin/Xwayland (0x55ec6350c000+0xa73a8) [0x55ec635b33a8]
gnome-shell[6715]: (EE) 9: /usr/bin/Xwayland (0x55ec6350c000+0x311df) [0x55ec6353d1df]
gnome-shell[6715]: (EE) 10: /usr/lib/libc.so.6 (0x7f528156e000+0x23790) [0x7f5281591790]
gnome-shell[6715]: (EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0x8a) [0x7f528159184a]
gnome-shell[6715]: (EE) 12: /usr/bin/Xwayland (0x55ec6350c000+0x32a95) [0x55ec6353ea95]