SUMMARY Having multiple screens with different scaling factors in the plasma wayland session makes it impossible to exit fullscreen video playback. The screen that played back the video becomes unusable, the second screen works fine. Graphical glitches can be observed on the primary screen when trying to exit the full screen playback. STEPS TO REPRODUCE 1. Set different scaling factors on two monitors. 2. Start playing back video in full screen mode (tried firefox (Youtube, Netflix) as well as VLC (local file). 3. Try exiting the playback. OBSERVED RESULT The screen becomes unresponsive and shows graphical artifacts. EXPECTED RESULT The video playback can be exited normally. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux 6.1.12-arch (available in About System) KDE Plasma Version: 5.27.1 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION AMD GPU with open source drivers, though proprietary OpenGL driver is installed. Hardware acceleration is enabled.
(In reply to Rune from comment #0) > SUMMARY > > Having multiple screens with different scaling factors in the plasma wayland > session makes it impossible to exit fullscreen video playback. The screen > that played back the video becomes unusable, the second screen works fine. > Graphical glitches can be observed on the primary screen when trying to exit > the full screen playback. > > > STEPS TO REPRODUCE > 1. Set different scaling factors on two monitors. > 2. Start playing back video in full screen mode (tried firefox (Youtube, > Netflix) as well as VLC (local file). > 3. Try exiting the playback. > > OBSERVED RESULT > > The screen becomes unresponsive and shows graphical artifacts. > > EXPECTED RESULT > > The video playback can be exited normally. > > SOFTWARE/OS VERSIONS > Linux/KDE Plasma: Arch Linux 6.1.12-arch > (available in About System) > KDE Plasma Version: 5.27.1 > KDE Frameworks Version: 5.103.0 > Qt Version: 5.15.8 > > ADDITIONAL INFORMATION > > AMD GPU with open source drivers, though proprietary OpenGL driver is > installed. Hardware acceleration is enabled. The graphical glitches also occur with non-mixed scaling factors. It is possible to exit fullscreen though. Graphical artifafcts on newly drawn elements persist until reboot.
What scale factors are you using on each screen?
(In reply to Nate Graham from comment #2) > What scale factors are you using on each screen? 1.5 on my primary and 1 on my secondary.
Tried to reproduce this with 1.5x scale on my primary laptop screen and 1x scale on my secondary HDMI screen on Wayland. No issues when exiting a full-screen video in Firefox+YouTube or a local video played with either VLC or DragonPlayer when the player is on either screen. Likely related to GPU drivers, as you're using AMD while I have an Intel iGPU. I'll let the KWin devs take it from here.
(In reply to Rune from comment #0) > SUMMARY > > Having multiple screens with different scaling factors in the plasma wayland > session makes it impossible to exit fullscreen video playback. The screen > that played back the video becomes unusable, the second screen works fine. > Graphical glitches can be observed on the primary screen when trying to exit > the full screen playback. > > > STEPS TO REPRODUCE > 1. Set different scaling factors on two monitors. > 2. Start playing back video in full screen mode (tried firefox (Youtube, > Netflix) as well as VLC (local file). > 3. Try exiting the playback. > > OBSERVED RESULT > > The screen becomes unresponsive and shows graphical artifacts. > > EXPECTED RESULT > > The video playback can be exited normally. > > SOFTWARE/OS VERSIONS > Linux/KDE Plasma: Arch Linux 6.1.12-arch > (available in About System) > KDE Plasma Version: 5.27.1 > KDE Frameworks Version: 5.103.0 > Qt Version: 5.15.8 > > ADDITIONAL INFORMATION > > AMD GPU with open source drivers, though proprietary OpenGL driver is > installed. Hardware acceleration is enabled. More info: Even without mixed scaling factors, being unable to exit fullscreen is a problem. Wether it occurs or not seems to be linked to the time spent in fullscreen mode, It also does only happen with video playback, not when playing e.g. video games in full screen.
(In reply to Rune from comment #5) > (In reply to Rune from comment #0) > > SUMMARY > > > > Having multiple screens with different scaling factors in the plasma wayland > > session makes it impossible to exit fullscreen video playback. The screen > > that played back the video becomes unusable, the second screen works fine. > > Graphical glitches can be observed on the primary screen when trying to exit > > the full screen playback. > > > > > > STEPS TO REPRODUCE > > 1. Set different scaling factors on two monitors. > > 2. Start playing back video in full screen mode (tried firefox (Youtube, > > Netflix) as well as VLC (local file). > > 3. Try exiting the playback. > > > > OBSERVED RESULT > > > > The screen becomes unresponsive and shows graphical artifacts. > > > > EXPECTED RESULT > > > > The video playback can be exited normally. > > > > SOFTWARE/OS VERSIONS > > Linux/KDE Plasma: Arch Linux 6.1.12-arch > > (available in About System) > > KDE Plasma Version: 5.27.1 > > KDE Frameworks Version: 5.103.0 > > Qt Version: 5.15.8 > > > > ADDITIONAL INFORMATION > > > > AMD GPU with open source drivers, though proprietary OpenGL driver is > > installed. Hardware acceleration is enabled. > > More info: Even without mixed scaling factors, being unable to exit > fullscreen is a problem. Wether it occurs or not seems to be linked to the > time spent in fullscreen mode, > It also does only happen with video playback, not when playing e.g. video > games in full screen. Uninstalling the amdgpu-pro-oglp package (Proprietary AMD OpenGL driver) did not help.
I have to add: the HDMI monitor (secondary) has a different refresh rate (66Hz) than the primary one (60Hz).
Please attach the output of > journalctl --user-unit plasma-kwin_wayland --boot 0 after making the bug happen again
(In reply to Zamundaaa from comment #8) > Please attach the output of > > journalctl --user-unit plasma-kwin_wayland --boot 0 > after making the bug happen again Output attached.
Created attachment 157039 [details] Output of journalctl --user-unit plasma-kwin_wayland --boot 0
That's odd, there's not even a single relevant warning in that log. To narrow down where to go from here, please attach the output of drm_info (https://gitlab.freedesktop.org/emersion/drm_info) - once before you play the video, just on the desktop - once while you play the video in fullscreen - twice after you try exiting fullscreen, with at least a few seconds in between Also, if you drag another window on top of the fullscreen video instead of exiting fullscreen, does that also cause the problem?
(In reply to Rune from comment #7) > I have to add: the HDMI monitor (secondary) has a different refresh rate > (66Hz) than the primary one (60Hz). Hmm, maybe it's Bug 465712?
(In reply to Nate Graham from comment #12) > (In reply to Rune from comment #7) > > I have to add: the HDMI monitor (secondary) has a different refresh rate > > (66Hz) than the primary one (60Hz). > Hmm, maybe it's Bug 465712? No, I only see these glitches when I exit fullscreen video playback.
Created attachment 157056 [details] Output of drm_info on the desktop
Created attachment 157057 [details] Output of drm_info during playback
Created attachment 157058 [details] Output of drm_info after trying to exit fullscreen playback
Created attachment 157059 [details] Output of drm_info around 20 seconds later
(In reply to Zamundaaa from comment #11) > That's odd, there's not even a single relevant warning in that log. To > narrow down where to go from here, please attach the output of drm_info > (https://gitlab.freedesktop.org/emersion/drm_info) > - once before you play the video, just on the desktop > - once while you play the video in fullscreen > - twice after you try exiting fullscreen, with at least a few seconds in > between > > Also, if you drag another window on top of the fullscreen video instead of > exiting fullscreen, does that also cause the problem? I attached the requested logs. If I drag a window on top of the video, the behaviour is about the same as when trying to exit fullscreen: artifacts and the screen becomes unresponsive. The window never shows up, it is dragged "behind" the video.
This seems to be caused by direct scanout, which you can disable by putting > KWIN_DRM_NO_DIRECT_SCANOUT=1 into /etc/environment and rebooting. If you do that, does the hang still happen?
(In reply to Zamundaaa from comment #19) > This seems to be caused by direct scanout, which you can disable by putting > > KWIN_DRM_NO_DIRECT_SCANOUT=1 > into /etc/environment and rebooting. If you do that, does the hang still > happen? Yes, that fixes the issue!
good, that narrows it down a lot. To narrow it down further, could you remove that again and test with > KWIN_DRM_PREFER_COLOR_DEPTH=24 and > KWIN_DRM_USE_MODIFIERS=0 (one at a time only) instead?
(In reply to Zamundaaa from comment #21) > good, that narrows it down a lot. To narrow it down further, could you > remove that again and test with > > KWIN_DRM_PREFER_COLOR_DEPTH=24 > and > > KWIN_DRM_USE_MODIFIERS=0 > (one at a time only) instead? Neither one of those helped.
Okay, so the problem could be in either KWin or the driver. Can you remove all the environment variables again, enable drm logging and record the dmesg output while reproducing the bug again? For details on how to do that, see https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues
Created attachment 157144 [details] DRM log
I think this is the same problem, so I am adding to this thread. I have been using the wayland session with KWIN_DRM_NO_DIRECT_SCANOUT=1 since it provided a workaround. Lately (maybe since updating to 5.27.4?), I have been getting screen artifacts in full screen applications, including games, so this is not limited to video playback. Note that this happens pretty irregularily, mostly after a long time of using the fullscreen application, but sometimes directly after starting it. When the flickering artifacts appear, the framerate also becomes very very low.
Do you ever get artifacts with an app in windowed mode?
(In reply to Zamundaaa from comment #27) > Do you ever get artifacts with an app in windowed mode? No, never.
Do you know if this has happened with native Wayland apps, or only with Xwayland?
(In reply to Zamundaaa from comment #29) > Do you know if this has happened with native Wayland apps, or only with > Xwayland? This has happened in both - Xwayland (wine game) and Firefox (wayland enabled)
Can you describe the flicker in more detail? With KWIN_DRM_NO_DIRECT_SCANOUT=1 set, there should be no difference for native Wayland apps vs windowed, at least on the KWin and driver side.
(In reply to Zamundaaa from comment #31) > Can you describe the flicker in more detail? With > KWIN_DRM_NO_DIRECT_SCANOUT=1 set, there should be no difference for native > Wayland apps vs windowed, at least on the KWin and driver side. The "flickering" starts at the upper edge of the screen, it is a multi-colored bar (whole width of the screen) that flickers and sometimes travels down the screen while flickering.
ok, that sounds like a driver bug then. Are you using adaptive sync? If so, does disabling that change anything?
(In reply to Zamundaaa from comment #33) > ok, that sounds like a driver bug then. Are you using adaptive sync? If so, > does disabling that change anything? It was set to automatic, I now have it set to never. For video playback, without the NP_DIRECT_SCANOUT line, exiting full screen still causes the screen to become unresponsive. I will watch if the flickering issue happens again, as it is kind of rare.
(In reply to Rune from comment #34) > (In reply to Zamundaaa from comment #33) > > ok, that sounds like a driver bug then. Are you using adaptive sync? If so, > > does disabling that change anything? > > It was set to automatic, I now have it set to never. For video playback, > without the NP_DIRECT_SCANOUT line, exiting full screen still causes the > screen to become unresponsive. I will watch if the flickering issue happens > again, as it is kind of rare. Okay, the artifacting happened again today while playing back video even though adaptive sync is set to never.
Created attachment 158785 [details] Recording of the artifacts
I've seen glitches similar to that before, they were caused by sort of broken hardware acceleration. Can you check if playing a video without hardware acceleration triggers the glitches and/or the freeze?
It seems like the issue with exiting fullscreen video playback has been fixed in 5.27.5. I can't comment on the flickering issue yet.
(In reply to Rune from comment #38) > It seems like the issue with exiting fullscreen video playback has been > fixed in 5.27.5. I can't comment on the flickering issue yet. It is not fixed completely. It just does not happen every time anymore.
The flickering issue still randomly appears.
Given comment 38, the original issue has been fixed so this bug report can be closed. Please open a new bug report for the flickering issue.
(In reply to Vlad Zahorodnii from comment #41) > Given comment 38, the original issue has been fixed so this bug report can > be closed. Please open a new bug report for the flickering issue. As stated in comment 39, this is not the case. The original issue still exists, it just takes a little bit of time in fullscreen before it happens.