SUMMARY XWayland applications do not continue to run correctly when on a virtual desktop or activity that the Xwayland applocation isn't on. (Massively reduced framerate, choppy audio) *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Launch a game thay uses Xwayland (i.e. mGBA emulator) 2. Swap to a different virtual desktop OBSERVED RESULT Hear audio slow to a choppy mess until you swap back to the same desktop as the game EXPECTED RESULT Game continues to run as if it is still on the same desktop with no reduction in fps/audio SOFTWARE/OS VERSIONS Linux/KDE Plasma: Pop!_OS 22.04 LTS (available in About System) KDE Plasma Version: 5.25 KDE Frameworks Version: TBD Qt Version: TBD ADDITIONAL INFORMATION Running Wayland on an AMD RX 6650 XT GPU Will be coming back to add Framework and Qt version numbers
There's similar reports for Gnome: https://bugs.launchpad.net/ubuntu/+source/xwayland/+bug/1906792, https://gitlab.gnome.org/GNOME/mutter/-/issues/1563, which suggests that this is an issue of XWayland
(In reply to Nicolas Fella from comment #1) > There's similar reports for Gnome: > https://bugs.launchpad.net/ubuntu/+source/xwayland/+bug/1906792, > https://gitlab.gnome.org/GNOME/mutter/-/issues/1563, which suggests that > this is an issue of XWayland Both of those mention having 2 xwayland windows open, I only have 1 open. It could be the same thing, but I haven't had it happen on Gnome with only 1 window open
Xwayland reduces the refresh rate of a window to 1Hz once it no longer gets frame callbacks, which KWin stops sending if a window is minimized or on another virtual desktop. If an app misbehaves with that, there's nothing we can do. You might want to report this to https://gitlab.freedesktop.org/xorg/xserver/-/issues though, maybe something can be done on the Xwayland side
(In reply to Zamundaaa from comment #3) > Xwayland reduces the refresh rate of a window to 1Hz once it no longer gets > frame callbacks, which KWin stops sending if a window is minimized or on > another virtual desktop. > If an app misbehaves with that, there's nothing we can do. You might want to > report this to https://gitlab.freedesktop.org/xorg/xserver/-/issues though, > maybe something can be done on the Xwayland side Upon checking that page, they seem tonhave been made aware of this 2 years ago and have ignored it as intentional behavior. Thanks, I'll see if I can get anyone over there to look at it again.
(In reply to Zamundaaa from comment #3) > Xwayland reduces the refresh rate of a window to 1Hz once it no longer gets > frame callbacks, which KWin stops sending if a window is minimized or on > another virtual desktop. > If an app misbehaves with that, there's nothing we can do. You might want to > report this to https://gitlab.freedesktop.org/xorg/xserver/-/issues though, > maybe something can be done on the Xwayland side Upon checking that page, they seem tonhave been made aware of this 2 years ago and have ignored it as intentional behavior. Thanks, I'll see if I can get anyone over there to look at it again.(In reply to Zamundaaa from comment #3) > Xwayland reduces the refresh rate of a window to 1Hz once it no longer gets > frame callbacks, which KWin stops sending if a window is minimized or on > another virtual desktop. > If an app misbehaves with that, there's nothing we can do. You might want to > report this to https://gitlab.freedesktop.org/xorg/xserver/-/issues though, > maybe something can be done on the Xwayland side According to Xwayland people it's the Wayland compositor's fault, not Xwayland https://gitlab.freedesktop.org/xorg/xserver/-/issues/1118#note_1722316
If I read the link correctly, your specific case is that you need the window to not slow down while recording it, right? That would be a bit of a special case that we can and should fix.
(In reply to Zamundaaa from comment #6) > If I read the link correctly, your specific case is that you need the window > to not slow down while recording it, right? > That would be a bit of a special case that we can and should fix. Yes, and in addition there's something with kwin sometimes not sending frames to OBS (or maybe pipewire since that's what's use for sending video) with window captures of xwayland windows. Not sure if that's related or a separate issue but I figure it's worth mentioning.
*** Bug 463374 has been marked as a duplicate of this bug. ***
Git commit b89009f9e18af6ce9331487f7a6a7308c5e2be26 by Vlad Zahorodnii, on behalf of Xaver Hugl. Committed on 18/01/2023 at 08:01. Pushed by vladz into branch 'master'. plugins/screencast: send frame callbacks if the window is otherwise invisible If we don't send frame callbacks, the application might stop rendering or throttle to single digit fps. M +1 -1 src/plugins/screencast/windowscreencastsource.cpp M +3 -2 src/plugins/screencast/windowscreencastsource.h M +40 -0 src/window.cpp M +19 -0 src/window.h https://invent.kde.org/plasma/kwin/commit/b89009f9e18af6ce9331487f7a6a7308c5e2be26