Bug 494382

Summary: KDE 6.2 with lag when moving windows with ICC profiles
Product: [Plasma] kwin Reporter: Elvis Douglas Janegitz <edjelvis>
Component: performanceAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alex, claudio, crazycableguy, daltonminer, dave, filip.kendes1, hahnt9009, jeroni, kde, kotarf, liangrui.ch, lopezcardonapablo, mathieu.laboureau, matrixc7p, max, me, nate, p3ybnyhv, sven, techsav, unix1, xaver.hugl, zongze.lee
Priority: NOR Keywords: regression
Version: 6.2.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Elvis Douglas Janegitz 2024-10-09 23:23:10 UTC
KDE 6.2 has a strange lag in window movement relative to the cursor; it feels like there's a delay, just like it was in Xorg (I'm on Fedora 40 with Wayland). I recorded two slow-motion videos to try to show the difference:
  
- Video for 6.1.5 = https://drive.google.com/file/d/1-Dht6JaIamnWXKC7mFuvroMRG6Cft-FM/view?usp=sharing
- Video for 6.2.0 = https://drive.google.com/file/d/1-8Q9eoJ58cO8wbNjQDsAgp41lwalF35y/view?usp=sharing

SOFTWARE/OS VERSIONS
Linux:  Fedora 40
KDE Plasma Version: 6.2.0
KDE Frameworks Version:  6.6.0
Qt Version: 6.7.2
Comment 1 Filip 2024-10-10 07:59:55 UTC
Can confirm. Also it's not just a delay with cursor, but also a lot of stuttering when dragging the windows (at least on my end).

I use Nvidia GPU with proprietary drivers.
Comment 2 jeroni 2024-10-10 08:50:03 UTC
For me it's only happening with Nvidia 560.35.03 drivers (tested on Arch and Fedora) while in Opensuse Tumbleweed with 550.120 drivers is working fine.
Comment 3 Elvis Douglas Janegitz 2024-10-10 13:05:41 UTC
[UPDATE]
I noticed that when the cursor is zoomed in, this doesn't happen. What an annoying bug.

- Video for 6.2.0 when cursor is zoomed = https://drive.google.com/file/d/1-_vGNY9vs7K2CzrPDDNUuMOG82rel6ge/view?usp=sharing

[UPDATE 2]
I forgot to mention my hardware, but I don't have an NVidia here. It's an Intel Core 5 120u with Intel Xe Graphics and Mesa version 24.1.7 with Linux Kernel 6.10.12-200 (current Fedora 40 default kernel)
Comment 4 Pablo Lopez 2024-10-10 15:12:31 UTC
I also have this issue but I don't think is as obvious as the OP one.
One thing that I've observed and I think it has to do with the bug is that the cursor gets duplicated (but can't be seen in OP video, but it can be seen in mine, maybe because the themed mouse pointer or because the size of the pointer is bigger than default).

https://drive.google.com/file/d/13cUcLHbJc6Sv3b9HaRDn5Tta64Cmn8Of/view?usp=sharing

You can see that the cursor gets duplicated when dragging the window, but if you "embiggen" the cursor and drag the window, the cursor is not getting duplicating, thus aligning with OP issue of not experiencing the bug with the big cursor. 
My specs:
Operating System: EndeavourOS 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.11.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30,6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: ASUS
Comment 5 jeroni 2024-10-10 15:55:03 UTC
It seems to happen when you have ICC profiles set on the monitors, disabling them all works pretty well
Comment 6 Elvis Douglas Janegitz 2024-10-10 16:22:18 UTC
(In reply to jeroni from comment #5)
> It seems to happen when you have ICC profiles set on the monitors, disabling
> them all works pretty well

I'm not using an ICC profile, it's set to default, just for the laptop's internal monitor I left the color profile setting to 'built-in', but even disabling it and keeping everything at default, the issue remains the same.
Comment 7 Elvis Douglas Janegitz 2024-10-11 00:24:11 UTC
I turned off the night light (I usually keep it active by default at 5200k), and it reduced the issue, although it still persists...
Comment 8 Bela Drescher 2024-10-11 15:52:28 UTC
Turning off night light completely solved the issue for me. But I only had a problem with the choppy cursor. I have wobbly windows enabled, so I don't care about a small lag. Switching the color profile between None and Built-in doesn't change anything.
Comment 9 Filip 2024-10-11 16:14:24 UTC
Turning off night light (or just setting it to the coolest tone) completely resolves my issue of stuttering while dragging windows
Comment 10 Antemyste 2024-10-11 21:25:02 UTC
Hi all, same problem here, incredible lags after upgrade from 6.1.5 to 6.2 on wayland.
(it was very smooth before upgrade, even on my low hardware)

- Now, when the new "shake cursor zoom" animation is triggered, it make all the desktop EXTREMELY laggy: freeze for 3 secondes.
  (it was smooth on 6.1.5)

- Disabling KDE night color (Nightshift) make things WAY better (for me not as smooth as before the upgrade, but not 100% sure about that).

- NOT on Nvidia GPU, its a Intel integrated Graphics (Intel(R) Core(TM) i7 CPU  M 640  @ 2.80GHz)
- I dont use ICC profile, tried to use 'integrated' one, don't change anything.

Complete wayland debug infos in this pastbin: https://pastebin.com/kZgev8PN

Operating System: Arch Linux 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.1.55-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7 CPU M 640 @ 2.80GHz
Memory: 7.7 Gio of RAM
Graphics Processor: Mesa Intel® HD Graphics
Manufacturer: Dell Inc.
Product Name: Latitude E6410
System Version: 0001
Comment 11 Juan Francisco 2024-10-12 00:04:12 UTC
If you need a workaround until the devs find the real bug, I'm using this script:

#!/bin/sh
export KWIN_COMPOSE=Q

Add it to the autostart as a pre-startup script. It will use software rendering for kwin instead of opengl. You will lose the effects and the night light but at least the desktop is usable with that.
Comment 12 Elvis Douglas Janegitz 2024-10-12 20:51:16 UTC
In version 6.2, there are performance issues with anything that alters color calibration, whether it's an ICC profile, the laptop's internal screen profile, or night light. I recorded a video toggling the night light on and off while monitoring performance (using the 'intel_gpu_top' command). It's bizarre how enabling the night light causes the effect of enlarging the cursor to exceed 50% GPU usage.

Video link: https://www.youtube.com/watch?v=6W_G9bmMKnQ

Note: I recorded the screen with my phone to avoid any interference from a screen recording application.
Comment 13 Lee Zongze 2024-10-13 02:53:35 UTC
The same problem occurs, the graphics card is Intel+Nvidia is severely sluggish and tears the picture on the Nvidia output screen, Intel is normal but has a slight picture delay, and the GPU can be seen to soar significantly, and Nvidia directly soars to 100% instantly.

It has been fully downgraded to 6.1.5 and is waiting for a developer fix
Comment 14 Lee Zongze 2024-10-13 03:45:27 UTC
Multiple attempts the issue is caused by the Kwin package, just roll back the kwin package to 6.1.5, but I don't know for some reason or if there will be other issues with just downgrading kwin

Waiting for developer fix problem
Comment 15 Junakreiter 2024-10-13 13:19:06 UTC
Same Problem here, thanks for reporting.
Comment 16 Elvis Douglas Janegitz 2024-10-13 14:04:44 UTC
I switched to X11 and it's normal now, it's something related to Kwin + color calibration + Wayland. I hope they can fix it, because on X11 I don't have the correct RGB on my laptop. :(
Comment 17 Amir 2024-10-13 14:58:33 UTC
It's already being discussed at bug 477223 and bug 493438
Comment 18 David S 2024-10-13 15:21:24 UTC
I just reported a similar issue (see below link) and was directed to this thread
https://bugs.kde.org/show_bug.cgi?id=494496

For me, I can confirm "Night Light" causes the issue. This is why ever morning I would think "Oh good, looks like the devs fixed it", then later in the day, massive lag. Just confirmed activating Night Light causes my issue and without it, its mostly if not totally ok. 

Thanks for everyone's work with diag! Interesting issue
Comment 19 Fangru Shao 2024-10-13 19:02:02 UTC
Got the same issue with my LNL laptop with xe while no ICC profile installed ane night time disabled. Thanks everyone for reporting.

Operating System: EndeavourOS 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ Ultra 7 258V
Memory: 30.8 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ASUS Zenbook S 14 UX5406SA_UX5406SA
System Version: 1.0
Comment 20 claudio 2024-10-13 21:03:25 UTC
Same lag when dragging any window. There two monitors, one is native laptop, the other external is 4K. No ICC profile set. Disabling the night light mode seems to fix the problem.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.10.12-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11850H @ 2.50GHz
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
System Version: ThinkPad P1 Gen 4i
Comment 21 Timothy 2024-10-14 05:39:46 UTC
I am seeing this on EndeavourOS. Since upgrading  'plasma-desktop 6.2.0-1' I have been experiencing major lag/latency when dragging windows as well as icons (directories or individual files in dolphin/on the desktop). As others have reported it seems to resolve itself when I disable the night light. I have a single 3440x1440 monitor to my laptop (with screen disabled) and no ICC profile(s) configured.
Comment 22 David S 2024-10-14 12:20:05 UTC
*** Bug 494496 has been marked as a duplicate of this bug. ***
Comment 23 unix1 2024-10-16 06:23:02 UTC
I can also confirm the symptoms on openSUSE Tumbleweed - dragging windows has a bad lag and choppiness when Night Light is active. Turning off the Night Light feature (or when it is not active by schedule) fixes the problem.

Operating System: openSUSE Tumbleweed 20241014
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.3
Kernel Version: 6.11.2-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 30.9 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: Dell Inc.
Product Name: XPS 13 9300
Comment 24 Fangru Shao 2024-10-16 13:14:13 UTC
With the new update my mouse disappears except when making bigger of it 😂 Any ideas?

Operating System: EndeavourOS 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ Ultra 7 258V
Memory: 30.8 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ASUS Zenbook S 14 UX5406SA_UX5406SA
System Version: 1.0
Comment 25 David Edmundson 2024-10-16 13:23:22 UTC
*** Bug 477223 has been marked as a duplicate of this bug. ***
Comment 26 David Edmundson 2024-10-16 13:23:53 UTC
*** Bug 493438 has been marked as a duplicate of this bug. ***
Comment 27 Filip 2024-10-16 17:50:52 UTC
Stuttering issue with night light enabled is fixed for me in Plasma 6.2.1
Comment 28 Junakreiter 2024-10-16 21:32:01 UTC
For me kwin 6.2.1.1-1 solved the problem.
Thanks !
Comment 29 Fangru Shao 2024-10-16 21:47:03 UTC
With kwin 6.2.1.1-1 the mouse appears again but sadly the lag is still there for me :(
I have ICC profile installed and night time disabled.
Comment 30 Lee Zongze 2024-10-16 22:23:25 UTC
For me kwin 6.2.1.1-1 solved the problem.
I am loading ICC profiles and night light enabled and it is not happening.

However, some users still have this problem
Comment 31 Elvis Douglas Janegitz 2024-10-16 23:49:20 UTC
Waiting for the 6.2.1 update on Fedora 40 to verify if there have been any improvement
Comment 32 Elvis Douglas Janegitz 2024-10-20 18:33:42 UTC
I've updated to version 6.2.1, and the GPU overconsumption issue has been resolved. However, it still doesn't have the pixel-perfect precision when moving windows like in 6.1.5 with Wayland, but compared to 6.2.0, it has improved significantly.
Comment 33 jeroni 2024-10-21 06:29:04 UTC
(In reply to Elvis Douglas Janegitz from comment #32)
> I've updated to version 6.2.1, and the GPU overconsumption issue has been
> resolved. However, it still doesn't have the pixel-perfect precision when
> moving windows like in 6.1.5 with Wayland, but compared to 6.2.0, it has
> improved significantly.

I completely agree
Comment 34 Nate Graham 2024-10-22 17:27:33 UTC
Some folks are saying the same thing in Bug 477223. Since ultimately that's the same issue as this one, and people are reporting similar experiences, let's track everything there. Marking as a duplicate.

*** This bug has been marked as a duplicate of bug 477223 ***