Xwayland crashes every time one tries to start any Xwayland app in KDE Plasma Wayland
Trying to start any Xwayland app like VLC, Discord, Jetbrains IDEs or any other app results in a "Xwayland has crashed" messsage and a coredump like this:
#0 0x00007f047544d36c in ?? () from /usr/lib/libc.so.6
#1 0x00007f04753fd838 in raise () from /usr/lib/libc.so.6
#2 0x00007f04753e7535 in abort () from /usr/lib/libc.so.6
#3 0x0000556dc4d99851 in OsAbort () at ../xwayland-22.1.1/os/utils.c:1353
#4 0x0000556dc4da363f in AbortServer () at ../xwayland-22.1.1/os/log.c:879
#5 FatalError (f=<optimized out>) at ../xwayland-22.1.1/os/log.c:1017
#6 0x0000556dc4d97843 in OsSigHandler (unused=<optimized out>, sip=<optimized out>, signo=11) at ../xwayland-22.1.1/os/osinit.c:156
#7 OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at ../xwayland-22.1.1/os/osinit.c:110
#8 <signal handler called>
#9 xwl_screen_destroy_drm_lease_device (xwl_screen=0x556dc61be830, wp_drm_lease_device_v1=0x556dc61be7d0) at ../xwayland-22.1.1/hw/xwayland/xwayland-drm-lease.c:430
#10 0x00007f04752c5536 in ffi_closure_unix64 () at ../src/x86/unix64.S:315
#11 0x0000000000000000 in ?? ()
Or
#0 0x00007f8d4cd0a36c in ?? () from /usr/lib/libc.so.6
#1 0x00007f8d4ccba838 in raise () from /usr/lib/libc.so.6
#2 0x00007f8d4cca4535 in abort () from /usr/lib/libc.so.6
#3 0x000055dc1393b851 in OsAbort () at ../xwayland-22.1.1/os/utils.c:1353
#4 0x000055dc1394563f in AbortServer () at ../xwayland-22.1.1/os/log.c:879
#5 FatalError (f=<optimized out>) at ../xwayland-22.1.1/os/log.c:1017
#6 0x000055dc13939843 in OsSigHandler (unused=<optimized out>, sip=<optimized out>, signo=11) at ../xwayland-22.1.1/os/osinit.c:156
#7 OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at ../xwayland-22.1.1/os/osinit.c:110
#8 <signal handler called>
#9 xwl_screen_destroy_drm_lease_device (xwl_screen=0x55dc149593e0, wp_drm_lease_device_v1=0x55dc14959380) at ../xwayland-22.1.1/hw/xwayland/xwayland-drm-lease.c:430
#10 0x00007f8d4cb822fe in ffi_call_unix64 () at ../src/x86/unix64.S:105
#11 0x00007f8d4cb81692 in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:672
#12 0x00007f8d4d19a523 in wl_closure_invoke (closure=closure@entry=0x55dc14696860, target=<optimized out>, target@entry=0x55dc14959380, opcode=opcode@entry=3, data=<optimized out>, flags=1)
at ../wayland-1.20.0/src/connection.c:1025
#13 0x00007f8d4d19ace3 in dispatch_event (display=0x55dc13e0b210, queue=<optimized out>) at ../wayland-1.20.0/src/wayland-client.c:1583
#14 0x00007f8d4d19aeec in dispatch_queue (queue=0x55dc13e0b2e0, display=0x55dc13e0b210) at ../wayland-1.20.0/src/wayland-client.c:1729
#15 wl_display_dispatch_queue_pending (display=0x55dc13e0b210, queue=0x55dc13e0b2e0) at ../wayland-1.20.0/src/wayland-client.c:1971
#16 0x00007f8d4d19af51 in wl_display_dispatch_pending (display=<optimized out>) at ../wayland-1.20.0/src/wayland-client.c:2034
#17 0x000055dc1380a73d in xwl_read_events (xwl_screen=0x55dc13d6e700) at ../xwayland-22.1.1/hw/xwayland/xwayland-screen.c:482
#18 xwl_read_events (xwl_screen=0x55dc13d6e700) at ../xwayland-22.1.1/hw/xwayland/xwayland-screen.c:469
#19 0x000055dc1393acb2 in ospoll_wait (ospoll=0x55dc13d62be0, timeout=<optimized out>) at ../xwayland-22.1.1/os/ospoll.c:657
#20 0x000055dc13873f89 in WaitForSomething (are_ready=0) at ../xwayland-22.1.1/os/WaitFor.c:208
#21 Dispatch () at ../xwayland-22.1.1/dix/dispatch.c:492
#22 0x000055dc1380084c in dix_main (envp=<optimized out>, argv=<optimized out>, argc=<optimized out>) at ../xwayland-22.1.1/dix/main.c:271
#23 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../xwayland-22.1.1/dix/stubmain.c:34
This happens on up to date Arch Linux, KDE Plasma Wayland but not on Gnome (wayland). This issue has also been reported here: https://bugs.kde.org/show_bug.cgi?id=452062 and/or https://bugs.kde.org/show_bug.cgi?id=452243
Someone suggested this only happens on Multi GPU systems, or iGPU + dGPU.
EDIT: Formatting
Edited by mthw0