SUMMARY Visual glitches in Firefox STEPS TO REPRODUCE 1. Using KDE Plasma (Wayland) set your monitor scaling factor to a fractional value like 150%, 195%, etc. 100% and 200% do not have this problem. 2. Open Firefox in Wayland mode with "MOZ_ENABLE_WAYLAND=1 firefox" and check if it is actually running in Wayland mode using "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole" in the terminal. 3. Open a YouTube video in full screen an let it play. 4. Move the mouse cursor slowly. OBSERVED RESULT When moving the mouse cursor depending on which scaling value is chosen exactly and the monitor resolution one or both glitches occur: 1) The mouse cursor flickers, jumps or changes in size (from it's 100% scale size to f.e. 150% and back and forth) 2) The whole window jitters left and right by a few pixels. Maybe this is related to https://bugs.kde.org/show_bug.cgi?id=459373 where full screen applications leave pixel gaps. EXPECTED RESULT When moving the mouse cursor it should stay consistently in size and the browser content should not wiggle. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.2.1-arch1-1 (64-bit) KDE Plasma Version: 5.27.2 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Graphics Platform: Wayland
I'm having the same problem, but only for scaling factors below 150%. This might be because it's my secondary 1080p monitor and my primary 4K monitor is set to 200% scale. The problem also happens in Chromium browsers, but not consistently, and only after the "press Esc to exit fullscreen" popup has disappeared.
This is happening for me as well on 2 machines, one with 4k 150% scaling and the other 1080p 125% scaling
I just discovered that this does not only happen on YouTube, but every website triggering the "full screen" function of Firefox which is not the same as pressing F11. When using F11 the problem is not there. The fullscreen function of the browser can be called by JavaScript and Firefox presents a banner on the top on enabling stating "my.site.com is now full screen. Exit Full Screen (ESC)". It is probably this: docElm.mozRequestFullScreen(); https://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/
I just discovered, that it does not only occur in Firefox but other applications too and seems to be a general problem of KWin, therefore I changed the ticket title. It also happens on Signal. To reproduce it there send a video into a chat and start playback of it, enter fullscreen playback and move the mouse. You see the same glitches and mouse cursor size changes as in Firefox playing a YouTube video.
New info of a chat with a KWin developer: The problem started after "Direct Scanout" was implemented in KDE Plasma 5.27 released on 2023-02-14. Workaround: One can disable the "Direct Scanout" using the environment variable "KWIN_DRM_NO_DIRECT_SCANOUT=1" in /etc/environment and relogging / restarting the computer. The problem should go away.
Afaik this has been fixed in amdgpu, with https://patchwork.freedesktop.org/patch/557059/