SUMMARY When an application goes full-screen on KWin-Wayland it becomes unusable due to lag when KWin disables compositing. Using the "Show Compositing" effect to display when compositing is active shows this is the issue. STEPS TO REPRODUCE 1. Enable "Show Compositing" effect (optional) 2. Open any full-screen application (Video players, games) 3. Put the application into a full-screen state, if not already in full-screen. OBSERVED RESULT Extreme frame-rate drops, stuttering mouse. "Feels" within the range of 12fps. EXPECTED RESULT Smooth video playback, or smooth gameplay under low load. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Neon 6.2 KDE Plasma Version: 6.2.4 (also present in at least 6.2.3) KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 ADDITIONAL INFORMATION - The "Show FPS" effect forces compositing to be enabled, so it cannot be used to benchmark. It does prove that it's not otherwise a performance issue. - For quick testing, shaking the mouse momentarily enables compositing. You can shake the mouse to instantly see full-screen applications run smoothly. - Some applications, like Firefox, do not disable compositing in full-screen mode. Applications exhibiting this effect include Haruna (Video player), Factorio (Game), Oxygen not Included (Game). - Using Intel Arc Graphics WORKAROUNDS: - Using a brew of KWin rules, games can be forced to run full-screen in a composited environment.
KWin doesn't disable compositing on Wayland, JFYI; this only happens on X11. So if you're using Wayland, the issue isn't caused by disabling compositing.
Here is a video of the issue as described: https://youtu.be/KkPrFrWLmaI Specifically during the Factorio segments you can see the game visibly speed up and slow down depending on the state of 'compositing' (as reported by the plugin); I shake the mouse several times during the video to force compositing during gameplay. When 'compositing' is off, the mouse is also incredibly sluggish and stuttery. Big buck bunny is a bit harder to see the issue with, but it's in the video as well. It's likely an issue when Kwin kicks into direct scanout, but that's a lamens' best guess. If there's a method to disable direct scanout, I'm willing to give it a shot.
Thanks. I'll let the KWin devs investigate from here.
(In reply to Ken Vermette from comment #2) > It's likely an issue when Kwin kicks into direct scanout, but that's a > lamens' best guess. If there's a method to disable direct scanout, I'm > willing to give it a shot. There's https://invent.kde.org/plasma/kwin/-/wikis/Environment-Variables#kwin_drm_no_direct_scanout for that
(In reply to Zamundaaa from comment #4) > (In reply to Ken Vermette from comment #2) > > It's likely an issue when Kwin kicks into direct scanout, but that's a > > lamens' best guess. If there's a method to disable direct scanout, I'm > > willing to give it a shot. > There's > https://invent.kde.org/plasma/kwin/-/wikis/Environment- > Variables#kwin_drm_no_direct_scanout for that Okay, aaaaannnnddd.... That works like a charm! So it seems scanout and Intel Arc don't play too nicely. I personally am happy, but I'll check into this ticket later and do any troubleshooting steps in case you want to use me as your guinea pig. :) For any Googlers, run the command "kate /etc/environment" (might create a new file) and add the line: KWIN_DRM_NO_DIRECT_SCANOUT=1 Then save & restart.
The assumption that it's a driver bug seems likely, but let's try to verify it and move the bug report to the driver devs if possible. To do that, can you follow the steps at https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues?redirected_from=Debugging-DRM-issues to get a drm debug log for when direct scanout kicks in?
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone!
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.