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. ***
I have the same problem (i.e. flickering on external screens on Nvidia GPU, using Wayland) on openSUSE Tumbleweed with latest KDE (kernel 6.12 with nouveau, Wayland, KDE Plasma 6.2.3, KDE Frameworks 6.8, Qt 6.8): $ lspci |grep VGA # Thinkpad P16 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-HX GT1 [UHD Graphics 770] (rev 0c) 01:00.0 VGA compatible controller: NVIDIA Corporation GA107GLM [RTX A1000 Laptop GPU] (rev a1) Problem raised with update to KDE 5. I was able to reproduce the issue with Neon live CD: neon-user-20241117-0745.iso and neon-user-20241110-0746.iso (kernel 6.8 with nouveau, Wayland, KDE Plasma 6.2.3, KDE Frameworks 6.8, Qt 6.8) Because I was unable to modify Neon live CD, I tried the workaround with setting KWIN_DRM_DISABLE_TRIPLE_BUFFERING=1 and KWIN_DRM_FORCE_MGPU_GL_FINISH=1 in Tumbleweed. It did not help as well.
Created attachment 176112 [details] Neon flickering console
Created attachment 176113 [details] Neon GIMP flickering
Created attachment 176114 [details] Neon affected versions
OK, 0133431c1d4b8a07ff5027df7f59928382562b38 has not been released yet even in 6.2.3, thus setting back the original status resolved fixes. But I wonder why "Version Fixed In" is set to 6.2.1.
Even with kwin6-6.2.5-1.1.x86_64 (openSUSE Tumbleweed) and both KWIN_DRM_DISABLE_TRIPLE_BUFFERING=1 and KWIN_DRM_FORCE_MGPU_GL_FINISH=1 set there is flickering. I suppose the problem is because I use nouveau. But kwin5 was working.
I still keep having flickered output on when using nouveau on the latest 6.13.0-rc6-1.g52cb4dc-default kernel. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20250103 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 Kernel Version: 6.13.0-rc6-1.g52cb4dc-default (64-bit) Graphics Platform: offscreen Processors: 24 × 12th Gen Intel® Core™ i9-12950HX Memory: 31.0 GiB of RAM kernel: 6.13.0-rc6-1.g52cb4dc-default kernel GPU driver: nouveau nothing modeset specific in /proc/cmdline, nothing in dmesg. Any more logs you need? I was even able to reproduced on latest neon: neon-unstable-developer-20250106-0043.iso. Because I don't have problem using nouveau on kwin5 or on the latest GNOME I would say it's a kwin6 bug.