Bug 491827 - Visual glitches with windows on primary monitor when dragging window on secondary monitor
Summary: Visual glitches with windows on primary monitor when dragging window on secon...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.1.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-08-17 15:05 UTC by Adi Efendic
Modified: 2024-11-22 03:46 UTC (History)
4 users (show)

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


Attachments
Demonstration of the glitching (3.75 MB, video/x-matroska)
2024-08-17 15:07 UTC, Adi Efendic
Details
Another instance (2.79 MB, video/x-matroska)
2024-09-01 11:44 UTC, Adi Efendic
Details
Showcase of the bug with KWIN_USE_BUFFER_AGE=0. (891.38 KB, video/mp4)
2024-09-20 16:07 UTC, madness742
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adi Efendic 2024-08-17 15:05:52 UTC
SUMMARY
I have two monitors, a primary 1440p 155Hz one and a secondary 1080p 75Hz monitor. When I have windows maximized on each, and then try to drag the window that's maximized on my secondary, the window on my primary immediately starts to display visual glitches and artifacting of some sort. Clicking on it resolves it.

I've attached a video demonstration of the bug.

STEPS TO REPRODUCE
1. Have a window maximized on each of the monitors
2. Drag the window that's maximized on the secondary monitor so it stops being maximized.

OBSERVED RESULT
Visual glitches start appearing on the main monitor.

EXPECTED RESULT
Nothing to happen with the window on the main monitor.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 40 KDE Edition
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Kernel version: 6.10.4-200.fc40.x86_64
CPU: AMD Ryzen 5 5600
GPU: AMD Radeon RX 6600
Mesa version: 24.1.5
Comment 1 Adi Efendic 2024-08-17 15:07:57 UTC
Created attachment 172707 [details]
Demonstration of the glitching

What happens when I drag my secondary monitor's window.
Comment 2 madness742 2024-08-25 09:13:32 UTC
I can reproduce this, but not consistently. A workaround I have found is holding the shift button before releasing the window instead of maximising. You need to split the screen in at least two ways (horizontal/vertical) for that feature to work. 

I experience it in both chromium and firefox, but the former has it much worse.

Monitor 1: 2560x1440@144hz 100% scaling
Monitor 2: 3840x2160@60hz 150% scaling (left of monitor 1, 90 degrees tilted)

Kernel:  6.10.6-arch1-1
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Mesa version: 24.1.6
CPU: AMD Ryzen 9 7950X3D
GPU: AMD Radeon 7900 XTX
Comment 3 Adi Efendic 2024-08-26 10:23:30 UTC
Yeah, I can also reproduce it with both a Brave and Firefox window. Happens almost consistently in my case, unless I have some window opened in the foreground as well. In that case, sometimes it does not glitch out.
Comment 4 Adi Efendic 2024-09-01 11:43:46 UTC
Today it happened in a worse format than before, this time with OnlyOffice on the primary monitor. Moving any kind of window on the secondary monitor causes it. I added an attachment with this one.
Comment 5 Adi Efendic 2024-09-01 11:44:09 UTC
Created attachment 173197 [details]
Another instance
Comment 6 Adi Efendic 2024-09-01 11:47:36 UTC
Are there any specific logs I can provide that might give some insight?
Comment 7 Zamundaaa 2024-09-05 12:21:01 UTC
Does this still happen if you put KWIN_USE_BUFFER_AGE=0 into /etc/environment and reboot?
Comment 8 Bug Janitor Service 2024-09-20 03:47:03 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 madness742 2024-09-20 16:05:52 UTC
(In reply to Zamundaaa from comment #7)
> Does this still happen if you put KWIN_USE_BUFFER_AGE=0 into
> /etc/environment and reboot?

This visual glitch still occurs when setting that variable to 0 and rebooting. I've also tried KWIN_DRM_NO_DIRECT_SCANOUT=1 which did not solve it either.
Comment 10 madness742 2024-09-20 16:07:41 UTC
Created attachment 173913 [details]
Showcase of the bug with KWIN_USE_BUFFER_AGE=0.
Comment 11 Adi Efendic 2024-09-20 16:09:08 UTC
I managed to figure out that, at least on my end, the issue is completely resolved if I set my bottom floating panel to dodge window. Any other setting causes the windows to have these glitches.
Comment 12 madness742 2024-09-20 16:20:49 UTC
(In reply to Adi Efendic from comment #11)
> I managed to figure out that, at least on my end, the issue is completely
> resolved if I set my bottom floating panel to dodge window. Any other
> setting causes the windows to have these glitches.

I can confirm! It does take a reboot for that workaround. There's just a tiny visual glitch left when clicking on 'Restore Down' on a maximized window, but nothing major as in the video I sent. It also disappears very quickly.
Comment 13 madness742 2024-09-22 15:33:38 UTC
Having only 1 panel also fixes the problem. After removing all other panels you still need to reboot the machine.
Comment 14 Bug Janitor Service 2024-10-07 03:47:21 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Bug Janitor Service 2024-10-22 03:47:24 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 16 Zamundaaa 2024-10-23 12:23:07 UTC
hmm, this wasn't supposed to be closed, was it? It's still happening for you, right?
Comment 17 Zamundaaa 2024-10-23 12:24:09 UTC
If it does still happen, one more thing you could test: Does disabling the maximize effect change anything?
Comment 18 Bug Janitor Service 2024-11-07 03:46:39 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 19 Bug Janitor Service 2024-11-22 03:46:46 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.