Bug 494156 - Windows flicker and contents deform when connecting/turning on monitors
Summary: Windows flicker and contents deform when connecting/turning on monitors
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 6.1.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-10-05 07:25 UTC by Kai Krakow
Modified: 2024-11-06 21:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
smartphone recording showing the issue (3.67 MB, video/webm)
2024-10-05 07:25 UTC, Kai Krakow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Krakow 2024-10-05 07:25:41 UTC
Created attachment 174442 [details]
smartphone recording showing the issue

SUMMARY

I have a setup of three monitors:
- left 16:18 2880p, plasma bar left
- main 16:9 4k, plasma bar bottom
- right 16:9 4k, plasma bar right
- scaling set to 125%

Almost always when I turn my monitors back on, windows get moved from one monitor to another - which is expected (although this does not work properly and windows often end up on a monitor different from that one when I left the computer, but that's a probably different bug).

But what happens now is that windows often start to flicker between two states: One image is just the contents scaled from the previous monitor (take into account that depending on the plasma bar position, all monitors have different real estate and maximized window aspect ratio), the other image is the properly re-rendered video.

This flickering stops as soon as I click into the window. I'm not sure if this simply triggers a redraw, or somehow resyncs the rendering/composition. To me, this looks like out of sync buffer bouncing in double or triple buffer rendering. I've seen similar effects 1-2 years ago with plasma 5 and using gamescope to render games where games would render frames out of order resulting in extreme flickering.


STEPS TO REPRODUCE
1. setup a asymmetric monitor/desktop layout as above
2. turn monitors off step by step, xrandr should show them as disconnected, windows should move to a remaining display
3. turn monitors back on, the order should not matter but may differ from the order in step 2
4. find flickering windows until you click into them

OBSERVED RESULT

Window contents flicker between two states (rescaled and properly rerendered). See attached mp4 video. Clicking into a windows fixes it. I see this most prominently with Chrome windows but that's just because most of my windows are Chrome windows. Other apps should be affected, too.

EXPECTED RESULT

Windows should properly rerender after being repositioned on a monitor, and should not flicker.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0 
Qt Version: 6.7.2

NVIDIA RTX 3080 Ti
Driver 560.35.03 (kernel open driver with drm framebuffer)

ADDITIONAL INFORMATION

See attached video.