Xwayland: !1570 breaks screen sharing in Chromium and Electron-based applications
Attempting to share a window in Chromium will often cause Xwayland to crash. This causes issues for me because Electron-based applications like Discord use Chromium's screen sharing mechanism (and the PipeWire path, WebRTCPipeWireCapturer
, doesn't work in Discord). Reverting !1570 (merged) resolves the problem.
The stack trace always looks similar to this:
Stack trace of thread 198998:
#0 0x00007699d4d6e3f4 n/a (libc.so.6 + 0x963f4)
#1 0x00007699d4d15120 raise (libc.so.6 + 0x3d120)
#2 0x00007699d4cfc4c3 abort (libc.so.6 + 0x244c3)
#3 0x000056d1fc056b4a OsAbort (Xwayland + 0x1d2b4a)
#4 0x000056d1fc05b8d3 AbortServer (Xwayland + 0x1d78d3)
#5 0x000056d1fc05c909 FatalError (Xwayland + 0x1d8909)
#6 0x000056d1fc053f45 OsSigHandler (Xwayland + 0x1cff45)
#7 0x00007699d4d151d0 n/a (libc.so.6 + 0x3d1d0)
#8 0x000056d1fbf5c636 RegionNull (Xwayland + 0xd8636)
#9 0x000056d1fbfb0058 compHandleMarkedWindows (Xwayland + 0x12c058)
#10 0x000056d1fbfb1d49 FreeCompositeClientWindow (Xwayland + 0x12dd49)
#11 0x000056d1fbfa294d doFreeResource (Xwayland + 0x11e94d)
#12 0x000056d1fbfa34a1 FreeResource (Xwayland + 0x11f4a1)
#13 0x000056d1fbfb0632 compUnredirectWindow (Xwayland + 0x12c632)
#14 0x000056d1fbf0a66d unredirect_window (Xwayland + 0x8666d)
#15 0x000056d1fc04d116 DoTimer (Xwayland + 0x1c9116)
#16 0x000056d1fc04d368 DoTimers (Xwayland + 0x1c9368)
#17 0x000056d1fbf7b201 Dispatch (Xwayland + 0xf7201)
#18 0x000056d1fbf7f353 dix_main (Xwayland + 0xfb353)
#19 0x00007699d4cfde08 n/a (libc.so.6 + 0x25e08)
#20 0x00007699d4cfdecc __libc_start_main (libc.so.6 + 0x25ecc)
#21 0x000056d1fbf025a5 _start (Xwayland + 0x7e5a5)
Minimal steps to reproduce:
- Run
glxgears -fullscreen -swapinterval 0
- Run Chromium with
XDG_SESSION_TYPE=x11 chromium
- Navigate to https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia and attempt to share the glxgears window
- Xwayland will crash most of the time, usually when glxgears receives or loses focus
I'm using KDE Plasma 6.1 and AMD with mesa-git, so explicit sync should be active and might be involved. The latest stable Xwayland build is not affected.