SUMMARY After upgrading to KDE 6.2.0 on Wayland on Fedora 40, I experienced screen "flickering" on my external monitors connected to a laptop. Most visible on updating items, such as panels with widgets or movies. STEPS TO REPRODUCE 1. Run KDE 6.2.0 on Wayland on an optimus laptop with AMD Radeon 780M/NVidia 4070 graphic cards 2. Connect any external monitor (HDMI or USB-C->DP) 3. Observe the flickering on updating objects (panels, movies) on external monitors OBSERVED RESULT By "flickering" I mean very short corruptions of parts of the screen. Too short to notice what the corruptions "include", but I think sometimes garbage, sometimes parts of windows from other parts of the screen. Not sure though. Most visible on movies, because occupying bigger part of the screen (not whole image though). Tried with movies playing both in Firefox and through the system player. EXPECTED RESULT No flickering/corruption. Was perfectly fine before the update, on Plasma 6.1. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 40 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 ADDITIONAL INFORMATION 1. Bug present regardless if 1 or 2 external monitors is connected, and which one of them (HDMI or USB-C->DP) 2. Not present on the built-in monitor of the laptop, regardless of the refresh rate (144 Hz, or 60 Hz like the external monitors) 3. Chaning scaling on the external monitors did not help 4. I am not sure if both my external monitors are connected to the dGPU, or just one. My laptop is ASUS TUF Gaming A15 FA507XI_FA507XI
An update: after ~3 hours of work, screens started flickering very often even with all programs minimised, and kwin_wayland process started using >=62% of a single core. Closing the programs did not help, but logging out and back into KDE brought the situation back to the somewhat less intrusive flickering described in the main bug report.
Git commit 0133431c1d4b8a07ff5027df7f59928382562b38 by Xaver Hugl. Committed on 12/10/2024 at 17:00. Pushed by zamundaaa into branch 'master'. backends/drm: disable triple buffering on NVidia by default There's some unresolved glitches on multi gpu systems. Until that's taken care of, triple buffering is disabled by default on NVidia unless the environment variable KWIN_DRM_DISABLE_TRIPLE_BUFFERING=0 is set Related: bug 494407 M +3 -2 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/0133431c1d4b8a07ff5027df7f59928382562b38
Thank you! export KWIN_DRM_DISABLE_TRIPLE_BUFFERING=1 for the session fixed the problem. When will it no longer be needed?
Git commit b3358350b67b39ecea8fd4234df4ad8c0fa99017 by Xaver Hugl. Committed on 12/10/2024 at 20:14. Pushed by zamundaaa into branch 'Plasma/6.2'. backends/drm: disable triple buffering on NVidia by default There's some unresolved glitches on multi gpu systems. Until that's taken care of, triple buffering is disabled by default on NVidia unless the environment variable KWIN_DRM_DISABLE_TRIPLE_BUFFERING=0 is set Related: bug 494407 (cherry picked from commit 0133431c1d4b8a07ff5027df7f59928382562b38) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +3 -2 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/b3358350b67b39ecea8fd4234df4ad8c0fa99017
(In reply to Lech from comment #3) > Thank you! export KWIN_DRM_DISABLE_TRIPLE_BUFFERING=1 for the session fixed > the problem. When will it no longer be needed? Lech - How did you apply that fix? (thanks)
I've created kwin_settings.sh file in ~/.config/plasma-workspace/env and added there: export KWIN_DRM_DISABLE_TRIPLE_BUFFERING=1 This way the file is called when KDE is started and the variable is set for the whole session. It can be confirmed with "printenv".
*** Bug 494675 has been marked as a duplicate of this bug. ***