Closed matte-schwartz closed 1 month ago
Thread 1 (Thread 0x7f142e8fa980 (LWP 3177)):
Here's this part without optimizations, the crash happens because xwl_screen->shm
is NULL:
#0 0x00007f2ec1f2832c in ?? () from /usr/lib/libc.so.6
#1 0x00007f2ec1ed76c8 in raise () from /usr/lib/libc.so.6
#2 0x00007f2ec1ebf4b8 in abort () from /usr/lib/libc.so.6
#3 0x00005645de428fb8 in OsAbort () at ../xwayland-23.2.6/os/utils.c:1363
#4 0x00005645de431d90 in AbortServer () at ../xwayland-23.2.6/os/log.c:879
#5 0x00005645de4322c8 in FatalError (f=0x5645de494d80 "Caught signal %d (%s). Server aborting\n") at ../xwayland-23.2.6/os/log.c:1017
#6 0x00005645de424ea5 in OsSigHandler (signo=11, sip=0x7fffc3d796f0, unused=0x7fffc3d795c0) at ../xwayland-23.2.6/os/osinit.c:156
#7 <signal handler called>
#8 0x00007f2ec241a4d9 in wl_proxy_get_version (proxy=0x0) at ../wayland-1.23.0/src/wayland-client.c:2313
#9 0x00005645de243f9f in wl_shm_create_pool (wl_shm=0x0, fd=20, size=1024) at /usr/include/wayland-client-protocol.h:1950
#10 0x00005645de2444e6 in xwl_shm_create_pixmap (screen=0x5645de706480, width=16, height=16, depth=32, hint=2) at ../xwayland-23.2.6/hw/xwayland/xwayland-shm.c:271
#11 0x00005645de23f817 in xwl_realize_cursor (device=0x5645df125960, screen=0x5645de706480, cursor=0x5645df115f90) at ../xwayland-23.2.6/hw/xwayland/xwayland-cursor.c:85
#12 0x00005645de2b3792 in miPointerRealizeCursor (pDev=0x5645df125960, pScreen=0x5645de706480, pCursor=0x5645df115f90) at ../xwayland-23.2.6/mi/mipointer.c:181
#13 0x00005645de36fb45 in AnimCurRealizeCursor (pDev=0x5645df125960, pScreen=0x5645de706480, pCursor=0x5645df115f90) at ../xwayland-23.2.6/render/animcur.c:229
#14 0x00005645de2f44d8 in InitializeSprite (pDev=0x5645df125960, pWin=0x5645df0e87c0) at ../xwayland-23.2.6/dix/events.c:3389
#15 0x00005645de2d1633 in EnableDevice (dev=0x5645df125960, sendevent=1 '\001') at ../xwayland-23.2.6/dix/devices.c:379
#16 0x00005645de2d2798 in InitCoreDevices () at ../xwayland-23.2.6/dix/devices.c:751
#17 0x00005645de2e8393 in dix_main (argc=13, argv=0x7fffc3d7a338, envp=0x7fffc3d7a3a8) at ../xwayland-23.2.6/dix/main.c:244
#18 0x00005645de25afe8 in main (argc=13, argv=0x7fffc3d7a338, envp=0x7fffc3d7a3a8) at ../xwayland-23.2.6/dix/stubmain.c:34
Ah, that certainly looks more conclusive! I've tested a few different avenues of trying to get this working again and so far none have been too successful. I thought it was maybe a gamescope
issue at first so I downgraded quite a few versions in the jupiter-main
repo to no effect. Same with downgrading to xwayland
23.2.6 (which also doesn't matter obviously, given the log you shared). same applies to KWin
. I also tried the old steamos-nested-desktop
script before the cleanup up a couple months back, and that also has the same freeze.
My latest line of testing was trying to check if kwin_wayland_wrapper
is still trying to launch a plasma-wayland
session and failing or if it falls back to a plasma-x11
session. If I recall, I remember seeing logs from steamos-nested-desktop
in the past that it would start with plasma-wayland
and then fallback to plasma-x11
, and the current plasma-wayland
workspace on SteamOS Preview/Main does seem to freeze during loading as well... maybe a useful breadcrumb? Or perhaps unrelated.
Will write another comment if I find anything useful.
@bertogg https://bugreports.qt.io/browse/QTBUG-126379 appears to be related to this bug report, or at least has the same root cause. I confirmed by downgrading wayland to 1.22 on SteamOS, then nested desktop launched. Wayland 1.23 is a dependency of Gamescope though...
Rebuilding kwayland5 and then kwin is enough to fix this.
Rebuilding kwayland5 and then kwin is enough to fix this.
Rebuilding what versions?
The same as currently in extra-3.6 and holo-3.6 - 5.115.0-1 and 5.27.10-2/5.27.10-3.
From what I'm seeing, kwin 5.27.10-3 is already a no-change rebuild of 5.27.10-2. What I did was to use a holo container in order to rebuild kwayland5 5.115.0-1, install the resulting package and then rebuild kwin 5.27.10-3, and such rebuilt kwin fixed the problem when installed on the device (didn't even have to install rebuilt kwayland5 there).
KWayland implements its own interface generator - https://invent.kde.org/plasma/kwayland/-/blob/master/src/tools/generator.cpp - and it's the part that ends up providing the interfaces for KWin to be compiled against. If KWayland was built against Wayland 1.22, then KWin built against such KWayland only has access to interfaces generated from wayland.xml defining wl_shm version 1, which causes the problem (KWin fails to export wl_shm global and then Xwayland crashes when attempting to use it).
Of course this is still fighting the symptoms rather than the problem, which appears to be a bug somewhere in the stack as merely updating libwayland shouldn't require such rebuilds, but I haven't dug that far yet.
When testing on my SteamOS Dev rig (running Main right now), I also needed to grab the latest upstream extra-cmake-modules
but with that + rebuilding and installing those two packages it is now working again 🎉
EDIT: tested and works on Deck too with only the rebuilt kwin
package
Also, rebuilding kwin
after kwayland5
fixes SteamOS' plasma-wayland session freezing on launch similar to how nested desktop did previously. Will leave this issue open until a fix is shipped in an image. Thanks for the great work @dos1 and @bertogg
Confirmed in 3.6 and 3.7. FWIW rebuilding kwin is enough, no need to touch kwayland5.
Hah, turns out KWin uses its own scanner: https://invent.kde.org/plasma/kwin/-/tree/Plasma/5.27/src/wayland/tools
I guess I shouldn't have assumed that 5.27.10-3's PKGBUILD stating:
# KWin is included in holo unpatched as it needs building against holo's libwayland
means that it was actually built against holo's libwayland :laughing:
can confirm nested desktop + plasma-wayland work again with the latest versions in the -main repo
Your system information
Please describe your issue in as much detail as possible:
Using Nested Desktop, either from within gamescope-session or from a VT, leads to Xwayland crashing as KDE attempts to launch. System report after the issue, plus a full coredump w/ backtrace, included below.
Steps for reproducing this issue:
steamos-nested-desktop
so you can access it from gamescope-sessionsudo pacman -Syu
on Main if you notice no coredump being generated. happens on stock Preview too though)Logs:
SteamOS system report: systemreport-20240911211325.txt
coredump + backtrace for xwayland with symbols
``` Sep 11 14:09:48 steamdeck systemd-coredump[3210]: [🡕] Process 3177 (Xwayland) of user 1000 dumped core. Stack trace of thread 3177: #0 0x00007f142f62832c __pthread_kill_implementation (libc.so.6 + 0x8d32c) #1 0x00007f142f5d76c8 __GI_raise (libc.so.6 + 0x3c6c8) #2 0x00007f142f5bf4b8 __GI_abort (libc.so.6 + 0x244b8) #3 0x000055e508c3e03d OsAbort (Xwayland + 0x17403d) #4 0x000055e508c3e41d AbortServer (Xwayland + 0x17441d) #5 0x000055e508c3e550 OsSigHandler (Xwayland + 0x174550) #6 0x00007f142f5d7770 __restore_rt (libc.so.6 + 0x3c770) #7 0x00007f142fb0dbb4 wl_proxy_get_version (libwayland-client.so.0 + 0x7bb4) #8 0x000055e508b0f7b3 wl_shm_create_pool (Xwayland + 0x457b3) #9 0x000055e508b072a6 xwl_realize_cursor (Xwayland + 0x3d2a6) #10 0x000055e508bd2d45 AnimCurRealizeCursor (Xwayland + 0x108d45) #11 0x000055e508b86e5e InitializeSprite (Xwayland + 0xbce5e) #12 0x000055e508b70c49 EnableDevice (Xwayland + 0xa6c49) #13 0x000055e508b00015 InitCoreDevices (Xwayland + 0x36015) #14 0x00007f142f5c0cd0 __libc_start_call_main (libc.so.6 + 0x25cd0) #15 0x00007f142f5c0d8a __libc_start_main_impl (libc.so.6 + 0x25d8a) #16 0x000055e508b02015 _start (Xwayland + 0x38015) Stack trace of thread 3179: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3181: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3180: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3186: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3182: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3183: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3185: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) Stack trace of thread 3184: #0 0x00007f142f622ebe __futex_abstimed_wait_common64 (libc.so.6 + 0x87ebe) #1 0x00007f142f625750 __pthread_cond_wait_common (libc.so.6 + 0x8a750) #2 0x00007f142d2d9b6e cnd_wait (radeonsi_dri.so + 0xd9b6e) #3 0x00007f142d2ba30c util_queue_thread_func (radeonsi_dri.so + 0xba30c) #4 0x00007f142d2d9a9c impl_thrd_routine (radeonsi_dri.so + 0xd9a9c) #5 0x00007f142f62655a start_thread (libc.so.6 + 0x8b55a) #6 0x00007f142f6a3a5c __clone3 (libc.so.6 + 0x108a5c) ELF object binary architecture: AMD x86-64 Sep 11 14:09:48 steamdeck systemd[1]: systemd-coredump@0-3208-0.service: Deactivated successfully. Core was generated by `/usr/bin/Xwayland :2 -auth /run/user/1000/nested_plasma/xauth_BQmWyD -listen 56'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (threadid=Edit:
steamos-nested-desktop
script itself still works on upstream Plasma 6.1, double checked on a different setup. There was some time where it was broken with Plasma 6 in a similar way though, not sure if that helps.