Registered Member
|
For the past years I've been wishing to switch from X11 to Wayland and enjoy its performance improvements and other capabilities. Unfortunately even in the latest openSUSE Tumbleweed snapshot, a KDE / Plasma session will cause not just graphical glitches but also session crashes back to the login screen. I wanted to discuss the main one I've ran into during today's tests, before deciding if I should report this as a bug too.
Apart from the changing cursor size and harmless graphical glitches I could live with temporarily, Wayland seems to introduce a strange bug on amdgpu: Sometimes when you open an application, like from say the Kickoff launcher, the window of that application will never appear. The application process itself does start as I can see it in KSysGuard without any sleep status applied, where sending it a kill signal will quickly shut it down proving it's responsive. There is however no window or taskbar entry, although it feels like the desktop is trying to select something that doesn't exist. At this stage, if I use the scroll wheel to go to the other desktop and then back, everything will freeze for a few seconds followed by a black screen and waking up back in the login manager. Someone suggested I try booting with amdgpu.dc=0. I did so but due to there still being crashes and bizarre visual glitches, it was hard to tell if that made this particular issue go away. I still crashed back to SDDM once but I think it may have been a different trigger. Anyone else getting this particular problem and knows when we can expect a solution? |
Manager
|
Did you file a bug? Please do and provide a link to it.
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Haven't gathered enough data yet, wanted to wait for responses here first. If there's no solution till tomorrow I will. |
Registered Member
|
Went ahead and reported the issue where relevant, it contains more detail on what's happening. Unfortunately the Freedesktop team adopted a "not our problem, ask the Plasma devs to deal with it" approach and instantly closed my ticket... really hoping the KDE team won't circle the issue back to Wayland, which would mean no one's going to fix it and though luck to us users; x11 is starting to have its noticeable limitations, switching to Wayland may become a requirement... but it's an impossible nightmare to deal with those invisible windows until we find what setting or driver is causing this bug on setups similar to mine. Will wait for more info.
https://bugzilla.opensuse.org/show_bug.cgi?id=1169304 https://bugs.kde.org/show_bug.cgi?id=420039 https://gitlab.freedesktop.org/wayland/ ... issues/155 |
Registered Member
|
Following a suggestion on the openSUSE bug tracker: I switched to the default Breeze KWin theme followed by logging out and back in. No change, issue still occurred.
Attempting to start a test session with "LIBGL_ALWAYS_SOFTWARE=1 dbus-launch-session startplasmacompositor" wasn't possible as dbus-launch-session was reported as an unrecognized command when I looked at it. However I could solve this by adding "export LIBGL_ALWAYS_SOFTWARE=1" to ~/.profile then starting a new session normally: I can tell it worked since all desktop effects were disabled and the mouse cursor was extremely laggy (everything felt like it ran at 5 FPS). To my surprise even this didn't affect the issue, both the missing windows and session crash could still be reproduced after a number of attempts. |
Registered Member
|
Thanks again Fabian Vogt from the openSUSE tracker for the new suggestions. Sharing the tests and results here too once more.
Regarding whether this affects just Wayland or X11 clients: I don't know how to check which is which. However the issue does affect both Qt and GTK applications, KDE components or otherwise; So far I've seen it happen to KWrite, Konsole, KSysGuard, Firefox, Thunderbird, Audacious, etc. Since the first are default KDE components I'm assuming they're ran as native WL clients? In a console I set "export WAYLAND_DEBUG=1" followed by repeatedly launching and closing "kwrite". When eventually it opened with a hidden window, nothing was printed to this console. I killed the process and it only said "Terminated". I took a backup of ~/.config/plasma-org.kde.plasma.desktop-appletsrc to save my widget config, then successfully managed to use "dbus-run-session startplasma-wayland --xwayland --x11-display $DISPLAY --exit-with-session=/usr/lib64/libexec/startplasma-waylandsession" and start another session in a smaller window from within my normal session... I also set "export WAYLAND_DEBUG=1" in the console that spawned this debug session. I could reproduce the crash in this controlled environment too! Here's the output that was produced in the console running the nested session as that session collapsed:
|
Registered Member
|
It appears that on rare occasions, some of these windows will end up causing graphical corruption and leaving weird trails behind. I noticed something like this before but didn't make a connection until now. Just caught a lucky break and managed to take a screenshot, posting in case it helps offer a pointer.
https://i.imgur.com/z07tI8P.png |
Registered Member
|
Output of gdb debug session recorded with: dbus-run-session gdb --args startplasma-wayland --xwayland --x11-display $DISPLAY --exit-with-session=/usr/lib64/libexec/startplasma-waylandsession > ./output 2>&1
I'm also glad to announce I've apparently discovered an essential piece of the puzzle, just tested this heavily and will continue to do so. It appears this glitch only occurs when minimized windows are present in the session; If there are either no other windows or the existing windows are all maximized or restored, opening a new application seems to work just fine. This further caught my attention as some existing windows also rarely freeze (still rendered but visually unchanged) until I minimize and restore them... one of the similar bug reports additionally stated that minimizing and restoring hidden windows with a shortcut might recover them (I don't have this shortcut to test). |
Registered Member
|
It appears I found a workaround and potentially the culprit, more testing required but it seems pretty certain so far. System Settings - Hardware - Display and Monitor - Compositor: "Keep window thumbnails" has to be set to "Always", the options "Never" or "Only for Shown Windows" are introducing this glitch. Although taskbar thumbnails still don't show up when hovering over an icon, I've been able to minimize and play around with opening / closing windows without getting the invisible windows and associated crashes any more.
This also seems to fix another crash I thought was unrelated: When reordering applications on the taskbar (icon-only task manager widget) by click-dragging them, a crash would also occur for some applications. I'm reordering those applications now and no longer seem to be getting a session lock. |
Registered Member
|
PROPER gdb debug of the nested session as it crashes:
|
Manager
|
If you posted all this in your bug report there is no need to post it here, too. What counts is the bug report.
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Fair enough... just trying to be comprehensive in hopes of getting as many answers as possible. I seem to have found a simple and convenient workaround that fixes the issue for now, so at least it's no longer an emergency and Wayland is finally usable. Fabian seems to have understood the core culprit in the code so I shall wait for the fixes now. |
Registered Member
|
Thank you very much MirceaKitsune for sharing your fix here. Google lead me here and your solutions works very well for me. I am saddened Plasma Wayland and Xwayland are still deal breakers in 2021. I just cannot afford to tank all these nasty bugs on my main workstation.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]