SUMMARY In Electron apps, all of them running in XWayland in a wayland plasma 6 session, with an nvidia GPU, keyboard input is very laggy. I don't know if it's input processing or painting or refresh. STEPS TO REPRODUCE - On Arch Linux, install Discord or Slack with system electron (which is electron 25 at the time of writing), and type. Input will be very laggy. OBSERVED RESULT Laggy keyboard input. EXPECTED RESULT Normal keyboard input performance. Native wayland applications like Konsole are not affected. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.27.80 KDE Frameworks Version: 5.240.0 Qt Version: 6.6.0 Kernel Version: 6.5.7-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 7950X3D 16-Core Processor Memory: 62.5 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 4090/PCIe/SSE2 Nvidia: 535.113.01 ADDITIONAL INFORMATION No abnormal journal log or CPU activity. System is otherwise idle.
Is this reproducible in Plasma 5 as well for you? Or only in Plasma 6?
Only plasma 6. Does not repro in plasma 5 on the exact same system.
Thanks.
I've made a video recording of Element (desktop electron version) in plasma 5 and plasma 6 on the exact same system. It shows the issue pretty well, especially with audio to hear the keyboard keys. From the video, it seems plasma 6 is delaying buffer swaps or swapping the wrong buffer. Plasma 5: https://drive.google.com/file/d/16zjCf5JwWq7yHWCKCgbUXV8zYQ69wX_c/view?usp=sharing Plasma 6: https://drive.google.com/file/d/1Vkcy7VQGg1OOY-uBSUEJEKn1yHLybx7U/view?usp=sharing
This is a NVidia driver bug, it's missing implicit synchronization (you can follow progress on that at https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317 if you want). The fact that you see it in Plasma 6 and not Plasma 5 is because the issue is effectively a race condition, changes in timings (which we've introduced some time ago) or GPU load can cause the issue to appear or disappear.
I've been following the xwayland nvidia situation (both that bug and the patch to add explicit sync to xwayland https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967). I filed this report because the difference between 5 and 6 was so pronounced.