Bug 490830

Summary: Visual Artifacts Appearing on second monitor, when i maximize and minimize the application on the other screen
Product: [Plasma] kwin Reporter: Syntist <syed.talha.khalid>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: arsen, gandalf1783, kdedev, nate, sebastian.pb31
Priority: NOR Keywords: multiscreen
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:
Attachments: Visual Artifacts

Description Syntist 2024-07-25 19:14:51 UTC
Created attachment 171991 [details]
Visual Artifacts

SUMMARY
Artifacts on other screen when maximize and minimize, It shouldn't effect other windows on other screen

More samples showing the artifacts
https://imgur.com/a/HXw965i

STEPS TO REPRODUCE
1. Open two application on both display, keep one maximize
2. On Other screen, maximize and minimize the application and you should be able to see the artifacts.
3. I think it's more prominent with xwayland applications

OBSERVED RESULT
Artifacts appearing doing that

EXPECTED RESULT
Shouldn't be an artifacts

SOFTWARE/OS VERSIONS
           .-------------------------:                    syntist@syntist-pc
          .+=========================.                    ------------------
         :++===++==================-       :++-           OS: CachyOS Linux x86_64
        :*++====+++++=============-        .==:           Host: Precision 5570
       -*+++=====+***++==========:                        Kernel: Linux 6.10.1-3-cachyos-lto
      =*++++========------------:                         Uptime: 7 mins
     =*+++++=====-                     ...                Packages: 1331 (pacman), 14 (flatpak)
   .+*+++++=-===:                    .=+++=:              Shell: zsh 5.9
  :++++=====-==:                     -*****+              Display (DELL U2913WM): 2560x1080 @ 60 Hz in 29″ [External]
 :++========-=.                      .=+**+.              Display (SHP1515): 1920x1200 @ 66 Hz (as 1536x960) in 22″ [Built-in] *
.+==========-.                          .                 DE: KDE Plasma 6.1.3
 :+++++++====-                                .--==-.     WM: KWin (Wayland)
  :++==========.                             :+++++++:    WM Theme: Breeze
   .-===========.                            =*****+*+    Theme: Breeze (Dark) [Qt], Adwaita-dark [GTK2/3/4]
    .-===========:                           .+*****+:    Icons: breeze-dark [Qt], breeze-dark [GTK2/3/4]
      -=======++++:::::::::::::::::::::::::-:  .---:      Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
       :======++++====+++******************=.             Cursor: Breeze_Light (24px)
        :=====+++==========++++++++++++++*-               Terminal: konsole 24.5.2
         .====++==============++++++++++*-                Terminal Font: MesloLGL Nerd Font (10pt)
          .===+==================+++++++:                 CPU: 12th Gen Intel(R) Core(TM) i7-12800H (20) @ 4.80 GHz
           .-=======================+++:                  GPU 1: NVIDIA RTX A1000 Laptop GPU
             ..........................                   GPU 2: Intel Iris Xe Graphics @ 1.40 GHz [Integrated]
                                                          Memory: 5.13 GiB / 15.30 GiB (34%)
                                                          Swap: 0 B / 31.55 GiB (0%)
                                                          Disk (/): 130.57 GiB / 237.41 GiB (55%) - xfs
                                                          Disk (/mnt/Drive): 876.89 GiB / 931.06 GiB (94%) - xfs
                                                          Local IP (wlan0): 10.108.235.118/16
                                                          Battery: 100% [AC Connected]
                                                          Locale: en_US.UTF-8
Comment 1 Zamundaaa 2024-07-29 12:50:33 UTC
*** Bug 490947 has been marked as a duplicate of this bug. ***
Comment 2 gandalf1783@gmail.com 2024-07-29 13:50:12 UTC
Did not find this duplicate, sorry.
Got a video of the behaviour here:
https://youtu.be/DKbxVx80Ozk
Comment 3 gandalf1783@gmail.com 2024-07-29 13:52:12 UTC
I just noticed, Syntist is running a Precision 5570, which is also a Dell notebook, similar to mine (Dell XPS 17 9720).
I was wondering if any other devices, e.g. HP or so are also seeing this issue, however I guess time will tell if people start reporting here.
Comment 4 TraceyC 2024-07-30 15:41:05 UTC
Thank you for the screen recordings, they definitely highlight what's going on.

For a data point, I was *not* able to reproduce this behavior on a Dell XPS 17 9710
Intel / nVidia
Screens used for testing
Display (SHP1517): 2560x1600 @ 60 Hz in 17″ [Built-in]
Display (34GK950F): 3440x1440 @ 75 Hz in 34″ [External] *

Are either of you using scaling on your displays? If so what are those settings? I'm using 100% on all displays.


## My system:
Operating System: Solus 4.5
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.12-296.current (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 62.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
Manufacturer: Dell Inc.
Product Name: XPS 17 9710

```
❯ fastfetch
            -```````````                   tracey@tlc-xps17-solus
          `-+/------------.`               ----------------------
       .---:mNo---------------.            OS: Solus resilience 4.5 x86_64
     .-----yMMMy:---------------.          Host: XPS 17 9710
   `------oMMMMMm/----------------`        Kernel: Linux 6.9.12-296.current
  .------/MMMMMMMN+----------------.       Uptime: 54 mins
 .------/NMMMMMMMMm-+/--------------.      Packages: 2383 (eopkg), 21 (flatpak)
`------/NMMMMMMMMMN-:mh/-------------`     Shell: zsh 5.9
.-----/NMMMMMMMMMMM:-+MMd//oso/:-----.     Display (34GK950F): 3440x1440 @ 75 Hz in 34″ [External] *
-----/NMMMMMMMMMMMM+--mMMMh::smMmyo:--     Display (LG ULTRAGEAR): 3440x1440 @ 85 Hz in 34″ [External]
----+NMMMMMMMMMMMMMo--yMMMMNo-:yMMMMd/.    Display (SHP1517): 2560x1600 @ 60 Hz in 17″ [Built-in]
.--oMMMMMMMMMMMMMMMy--yMMMMMMh:-yMMMy-`    DE: KDE Plasma 6.1.3
`-sMMMMMMMMMMMMMMMMh--dMMMMMMMd:/Ny+y.     WM: KWin (X11)
`-/+osyhhdmmNNMMMMMm-/MMMMMMMmh+/ohm+      WM Theme: Breeze
  .------------:://+-/++++++oshddys:       Theme: Breeze (Dark) [Qt], Nordian-Breeze-GTK [GTK2/3/4]
   -hhhhyyyyyyyyyyyhhhhddddhysssso-        Icons: Lavender-Dark-Icons [Qt], Lavender-Dark-Icons [GTK2/3/4]
    `:ossssssyysssssssssssssssso:`         Font: Noto Sans (11pt) [Qt], Noto Sans (11pt) [GTK2/3/4]
      `:+ssssssssssssssssssss+-            Cursor: Dracula (24px)
         `-/+ssssssssssso+/-`              Terminal: konsole 24.5.2
              `.-----..`                   Terminal Font: Source Code Pro for Powerline (11pt)
                                           CPU: 11th Gen Intel(R) Core(TM) i7-11800H (16) @ 4.60 GHz
                                           GPU 1: NVIDIA GeForce RTX 3060 Mobile / Max-Q [Discrete]
                                           GPU 2: Intel UHD Graphics @ 1.45 GHz [Integrated]
                                           Memory: 11.30 GiB / 62.53 GiB (18%)
                                           Swap: Disabled
                                           Disk (/): 98.00 GiB / 191.50 GiB (51%) - ext4
                                           Disk (/home): 433.69 GiB / 479.55 GiB (90%) - ext4
                                           Local IP (enp5s0u2u4): 10.0.0.163/24
                                           Battery: 100% [AC Connected]
                                           Locale: en_US.UTF-8
```
Comment 5 Syntist 2024-07-30 15:46:50 UTC
Yes, I am using scaling on main display, 125% and also i tried 125% scaling on external display and also without, I was able to reproduce the result. But I think, when i scaled then scaled down, I was able to produce the result, but if i had 100% on both display it was okay. 

But i think it's more prominent, when I scale the built in display.
Comment 6 TraceyC 2024-07-30 17:04:50 UTC
I had been testing on X11, so I tested again with Wayland, and am still not able to reproduce the problem (just as a data point)

Displays tested with:
Built-in Screen 3840x2400 125% / 150%
LG external display 3440x1400 100%

I've tried various applications, like Firefox, Discord, VSCode, Visual Studio Code, and Konsole
Comment 7 Syntist 2024-07-30 18:19:38 UTC
I have a question, maybe it can be related to something how dell precision 5570 works, basically, I have to use usb-c to dpi or hdmi port in order to get the screen render. 

So everything pass through igpu.

https://www.dell.com/support/manuals/en-us/precision-15-5570-laptop/precision-5570-external-display-connection-guide/before-you-begin?guid=guid-f9034c20-69b1-4b86-a1b4-bff0566a2364&lang=en-us

Though, I dont know if that's the issue. I am still able to reproduce it, and it's really annoying cause sometimes when you maximize the window on other screen the other screen application is completely distorted

Try to maximize xwayland application? cause it mostly happen if i maximize xwayland application on built-in display
Comment 8 gandalf1783@gmail.com 2024-07-31 10:59:47 UTC
So, my system has an 3050 with the nvidia-535xx-dkms drivers.
The external display is an Asus "Ancor Communcations Inc VS278".
In the meantime, I added a third display: "Belinea 1703S1"

The main (internal) display is scaled by 200% and running at a res of 3840x2400 (native/max res).
The first external (Asus) is running on 1920x1080.
All monitors at 60 Hz.

I assume that all KDE applications are wayland native and dont run over XWayland?
In that case, with other, non-wayland programs in the background (brave browser), I had the System Settings open on the internal and the System Monitor open on the second (Asus) and still got artifacts.

I also know my Notebook also has some kind of pass-through, though I also dont know if this is A. actually being used and B. how I control / check the state of said passthrough.

I have 2 USB-C dongles attached, where none of them are thunderbolt 4, so regular USB 4 devices.

Also, I just got my notebook to change the scaling on clicking in my brave browser. I uploaded another video to YT for you to see: https://youtu.be/oIy06nRXXrw (Turn on your speakers so you hear the mouse clicks)
Comment 9 Syntist 2024-08-23 06:50:20 UTC
Hey, Any update on this issue? 
It's really annoying bug, I can't use multiscreen cause of this annoying bug. I think it's only effecting Laptops with Hybrid GPU but using thunderbolt 4 for display instead of dedicated hdmi.

https://imgur.com/a/9hanMfk

I have posted my display setting and the video too.
Comment 10 TraceyC 2024-08-23 16:31:00 UTC
I'm sorry we haven't been able to get to this bug yet, please be patient.

As a data point, on the system where I cannot reproduce the issue, my laptop is connected to a dock via Thunderbolt 3 (not 4)
Comment 11 Syntist 2024-08-24 08:03:23 UTC
(In reply to TraceyC from comment #10)
> I'm sorry we haven't been able to get to this bug yet, please be patient.
> 
> As a data point, on the system where I cannot reproduce the issue, my laptop
> is connected to a dock via Thunderbolt 3 (not 4)

Is there any way, I can help with the bug? maybe remote desktop session or something.
Maybe it's cause of specific distro, or specific setup?
Comment 12 gandalf1783@gmail.com 2024-08-24 09:11:52 UTC
I would also like to know if I can help, e.g. with debug logs, or like a memory dump while the screen is displaying artifacts.
Comment 13 TYY331 2024-08-29 02:56:49 UTC
I've disabled floating panels and the issue seems to go away, there is a similar issue that happens with just one monitor, you have a maximized window and try to maximize/restore a second one, the floating and defloating effect messes with the window animation geometry.
Comment 14 Syntist 2024-08-29 04:38:41 UTC
(In reply to TYY331 from comment #13)
> I've disabled floating panels and the issue seems to go away, there is a
> similar issue that happens with just one monitor, you have a maximized
> window and try to maximize/restore a second one, the floating and defloating
> effect messes with the window animation geometry.

Yes, this fix the issue, Thank alot. 
Floating panel was causing visual glitches, but now it's good.
Comment 15 Nate Graham 2024-08-29 04:42:43 UTC
Right, this specific issue is fixed in Plasma 6.2.