Summary: | Periodic flicker on secondary monitor with fullscreen window on any monitor | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Johan Sköld <johan> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, xaver.hugl |
Priority: | NOR | Keywords: | qt6 |
Version First Reported In: | 5.93.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/75b741128ebd662e832dae333a683dbd3a5317de | Version Fixed In: | 6.0.0 |
Sentry Crash Report: | |||
Attachments: | Image shifting on monitor before it turns off. |
Description
Johan Sköld
2024-02-24 07:53:51 UTC
To clarify: It flickers regardless of if a window is fullscreened on my first or second monitor. I wrote most of the original summary before verifying that, and forgot to update parts of it. Sorry, one more thing to add that I just noticed. If I open Spectacle and press "Rectangular Region", the monitor flickers off/on every single time I move the mouse cursor. Regardless of which monitor I move it on. And I thought to check `journalctl`. Looking at the last 50 thousand lines, just about every single line says: feb 24 00:13:58 pc kwin_wayland[2937]: kwin_scene_opengl: 0x2: GL_INVALID_OPERATION in glUniformMatrix(matrix size mismatch) The even remotely relevant lines that don't say that are: feb 24 00:09:34 pc kwin_wayland[2937]: kwin_core: Cannot grant a token to KWin::ClientConnection(0x592bbe8e7690) [...] feb 24 00:10:16 pc systemd[2870]: Starting Spectacle screenshot capture utility... [...] feb 24 00:10:16 pc spectacle[6436]: QApplication: invalid style override 'adwaita-dark' passed, ignoring it. Available styles: Breeze, Oxygen, Windows, Fusion [...] feb 24 00:10:16 pc spectacle[6436]: kpipewire_record_logging: VAAPI: Failed to initialize display feb 24 00:10:16 pc spectacle[6436]: kpipewire_record_logging: DRM device not found feb 24 00:10:16 pc spectacle[6436]: kpipewire_record_logging: VAAPI: Failed to initialize display feb 24 00:10:16 pc spectacle[6436]: kpipewire_record_logging: DRM device not found feb 24 00:10:16 pc systemd[2870]: Started Spectacle screenshot capture utility. [...] feb 24 00:10:16 pc plasmashell[3214]: QQuickItem: Cannot set FocusScope once item has children and is in a window. [...] feb 24 00:11:18 pc plasmashell[3214]: error creating screencast "Could not find window id 0" Thanks for the report, this should already be fixed in 6.0.0 with https://invent.kde.org/plasma/kwin/-/commit/a649be64db7c66eee5ed26e26ea3f5aeb45552d8 Created attachment 166080 [details]
Image shifting on monitor before it turns off.
Thanks for the link. I applied that patch to version 5.93.0 of kwin and built it, and while it did get rid of the journalctl spam, my monitor still flickers when I enter or exit fullscreen with some window, and occasionally while just having a window fullscreened. So the original problem is still there.
If it helps, just before the monitor turns off the image shifts a bit. When entering fullscreen it shifts down, while when leaving fullscreen it shifts up. Attaching a slow-mo clip of what it looks like when entering fullscreen on my other monitor (just out of view).
That's, uhh, beyond weird. If you disable direct scanout with KWIN_DRM_NO_DIRECT_SCANOUT=1, does that make a difference? It does not, the same thing still happens. Even more weirdly, it happens when I fullscreen a transparent window as well, so I don't think direct scanout would be active either way? Although I just realized what's causing it. I remembered my second monitor technically supports VRR, but tends to flicker when it's enabled (only in Linux though, likely a driver bug). Both my monitors had VRR set to "Automatic". If I disable it on the second monitor the flicker stops. Is it possible that KWin enabled VRR on the second monitor too when fullscreening something on my main monitor? Otherwise this may also be some driver bug. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5312 That MR should fix vrr wrongly enabling on the second screen; the display content shifting and turning off is a driver bug though - most likely it doesn't handle the refresh rate going below the minimum refresh rate correctly. You can report that at https://gitlab.freedesktop.org/drm/amd/-/issues Git commit af4e12c5fc03c4d5981a92010d7a50c3a2187d12 by Xaver Hugl. Committed on 27/02/2024 at 14:20. Pushed by zamundaaa into branch 'master'. comopsitor: only activate VRR if the active window is on the current screen M +1 -1 src/compositor.cpp https://invent.kde.org/plasma/kwin/-/commit/af4e12c5fc03c4d5981a92010d7a50c3a2187d12 Git commit 75b741128ebd662e832dae333a683dbd3a5317de by Xaver Hugl. Committed on 27/02/2024 at 14:33. Pushed by zamundaaa into branch 'Plasma/6.0'. comopsitor: only activate VRR if the active window is on the current screen (cherry picked from commit af4e12c5fc03c4d5981a92010d7a50c3a2187d12) M +1 -1 src/compositor.cpp https://invent.kde.org/plasma/kwin/-/commit/75b741128ebd662e832dae333a683dbd3a5317de |