Bug 475468 - On X11 with NVIDIA GPU, window and panel resizing is very laggy when any panels are set to Floating or Adapting transparency
Summary: On X11 with NVIDIA GPU, window and panel resizing is very laggy when any pane...
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: git master
Platform: Other Linux
: HI normal
Target Milestone: ---
Assignee: ratijas
Keywords: regression
: 482100 482193 482717 483015 485254 (view as bug list)
Depends on:
Reported: 2023-10-11 14:12 UTC by ratijas
Modified: 2024-06-13 01:38 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2023-10-11 14:12:36 UTC

The lag and jitter during panel floating and defloating has gotten much worse recently. Not sure whether to attribute it to panels refactoring or a random NVIDIA driver update. The lag makes fullscreen effects such Desktop Grid and Overview open practically without animation; everything is a slideshow running in seconds per frame when a panel or window resizes.

Note that in case or maximizing a window in a way that does not involve panel (de-)floating (say, horizontally with a bottom panel) only skips first couple of frames due to a window being resized only once, and then simply cross-fading inside compositing.

1. Run Plasma 6 on X11 with NVIDIA
2. Set panels floating to auto.
3. Move windows around, touching panels borders, so they float/defloat; add virtual desktops, have a window that touches a panel on one of them, the other is empty, and Slide between them.

LL..aaag  g   gggggg

No lag

Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.3
Kernel Version: 6.5.5-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2


Screen recording on YouTube: https://www.youtube.com/watch?v=uDtBd3sOm5I
Comment 1 Nate Graham 2023-10-12 20:50:50 UTC
Is it just floating panels, or does the lag happen for anything else? Like notifications appearing, panel pop-ups opening, etc
Comment 2 Nate Graham 2023-10-12 20:51:10 UTC
Also do you see it on Wayland too, or just X11?
Comment 3 Justin Zobel 2023-11-29 09:35:18 UTC
Setting to NEEDSINFO.
Comment 4 ratijas 2023-11-29 11:36:44 UTC
This is X11. The lag happens on any window resize. Less for Qt Widgets apps, more for QtQuick apps. Since panels are QtQuick views, and they animate by interpolating their window size, they lag a lot to the point where it is a complete slideshow at seconds per frames.

On Wayland window resizing is 60fps smooth for Qt Widgets & QtQuick apps and Plasma panels.

I think we should be able to detect if animation takes too long to draw a frame, and when it does — fall back to a different strategy, like changing size once and animating panel internally, or not animating at all.
Comment 5 Jianqing Liu 2023-12-06 23:02:01 UTC
Also observed this problem on intel integrated graphics

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.4-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i7-12700K
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 770
Comment 6 David Edmundson 2024-02-22 15:48:30 UTC
> random NVIDIA driver update

Please confirm if this issue still persists
Comment 7 ratijas 2024-02-24 05:30:52 UTC
Can confirm this issue still persists on a fresh installation of Arch Linux with a fresh build of packages from git master.
Comment 8 ratijas 2024-03-19 12:12:03 UTC
How to brig back UI smoothness if you have a laggy panel on Plasma 6:

- For each Plasma panel out there:
- Floating: OFF
- Opacity: either always opaque or always translucent.
Comment 9 Nate Graham 2024-03-19 19:12:04 UTC
*** Bug 482717 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2024-03-19 19:12:15 UTC
*** Bug 483015 has been marked as a duplicate of this bug. ***
Comment 11 rickard 2024-03-19 20:10:38 UTC
(In reply to Nate Graham from comment #1)
> Is it just floating panels, or does the lag happen for anything else? Like
> notifications appearing, panel pop-ups opening, etc

I have only checked moving windows and switching desktops. Can't say I've noticed anything else but I did a quick check and popups etc didn't lag. 

Floating panels needs to be OFF, otherwise the stutter will always occur if a window is close to the panel, even if you set it to opaque.

I don't think the bug is present with the nouveau driver, I ran it for a while to test out NVK. So it could be a proprietary driver issue, don't quote me on that tho'.
Comment 12 Nate Graham 2024-03-27 16:42:16 UTC
*** Bug 482193 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2024-03-27 16:42:20 UTC
*** Bug 482100 has been marked as a duplicate of this bug. ***
Comment 14 Andy B 2024-04-09 16:55:39 UTC
Chiming in to say that I'm experiencing this issue too:

- I am using X11, on Arch Linux, using latest Nvidia drivers (550.67-1)
- It seems to affect most animations (or it could be anything that involves transparency, not sure).
- For me, it affects nearly all popups, modals and windows, not just the panel. Anything that fades/animates in/out of view stutters like crazy
- Stuttering causes the entire desktop to lag, including the cursor
- Disabling compositing doesn't help
- I'm unable to test with animations fully disabled as there is no option to disable "Window Open/Close Animation", it only lets me choose between "Fade", "Glide" and "Scale"
- Last time I tried Wayland it was not affected and was buttery smooth. However, I am no longer able to test Wayland as it seems to have broken itself recently somehow. This is probably related to my multi-GPU setup, but I haven't been able to fix it yet.
- Disabling transparency on the panel seems to have fixed the issue on the panel, however other animations are still affected.
Comment 15 Andy B 2024-04-09 18:06:27 UTC
Sorry for the additional comment, but I have managed to disable all the animations by setting the animation speed in "General Behavior" to "Instant" and unchecking all the animations in "Desktop Effects" (the radio buttons were a bit confusing). There still seems to be animations playing though, for example, the tooltips in the icon tray still "morph" and this causes large stutters.

Even with animations off though, there is stuttering all over the place, so not sure what's going on. For example, if I enable the "Show FPS" "Desktop Effect", every time I maximize a window there's a big red spike in the "Paint Duration" graph. Strangely enough, shrinking the window doesn't cause any stuttering. This happens even with "simple" applications like "Konsole" and "System Settings".
Comment 16 Nate Graham 2024-04-09 18:47:49 UTC
*** Bug 485254 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2024-04-09 19:49:09 UTC
*** Bug 485254 has been marked as a duplicate of this bug. ***
Comment 18 rickard 2024-04-22 09:19:35 UTC
Seems like there's more to this, I noticed having 2 windows on top of eachother can cause stutter too. In my case it was Firefox.
Window 1 had many tabs opened.
Window 2 had 1 tab opened.
If window 1 was over window 2 - Stutter.
If window 2 was over window 1 - Smooth
If I closed window 2 - Smooth
Comment 19 Bug Janitor Service 2024-04-25 19:02:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4265
Comment 20 Gregorplanet 2024-04-26 14:21:27 UTC
I am having the same issue with window resizing and panel set to floating on Fedora 40 (X11) with Nvidia Driver 550.76. Before the upgrade (Fedora 39 with Plasma 5.27.11) and with the same configuration, it was smooth.
Comment 21 rickard 2024-04-27 03:48:52 UTC
nvidia vulkan dev 550.40.61

I can't reproduce this anymore so it seems like it's fixed?

The nvidia changelog:

    Fixed crash in vkLatencySleepNV that happened under some circumstances
    Fixed performance drop when NVIDIA Reflex was enabled under some circumstances
    Fixed HEVC decode scaling list and made them universal
    Fixed indexed draws after executing secondary command buffer with index type change
    Fixed reconvergence hang with partitioned subgroup operations
    Fixed inconsistency between vkGetPhysicalDeviceSurfaceSupportKHR and vkGetPhysicalDevicePresentRectanglesKHR on certain displays
Comment 22 petrk 2024-05-24 22:40:04 UTC
I can reproduce it on Plasma 6.1 beta. Moving windows with adaptive transparency causes stutters and input lag. Increasing animation speed to immediate works as a workaround.
After switching taskbar to solid color windows are no longer stuttering on "snapping to taskbar" and I can use slower animations.
Works fine with transparent taskbar as well.
Wayland doesn't seem to be affected.

Nvidia 555.42.02

Operating System: Arch Linux 
KDE Plasma Version: 6.0.90
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.10-273-tkg-eevdf (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 93.9 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2
Manufacturer: ASRock
Product Name: B650I Lightning WiFi
Comment 23 ratijas 2024-05-26 08:54:48 UTC
Git commit da26b03076aaff5ca51039d700ad9daabdd5d80b by ivan tkachenko.
Committed on 26/05/2024 at 08:37.
Pushed by ratijas into branch 'master'.

PanelView: Add framework for dealing with unsupported configurations

This quick primarily targets NVIDIA & X11 combination, which is known to
lag hard when resizing. More may be added in the future, but hopefully
not.  Properties and methods names are intentionally generic enough to
not imply any particular vendor or technology.

M  +71   -2    shell/panelview.cpp
M  +21   -0    shell/panelview.h

Comment 24 petrk 2024-05-26 14:53:53 UTC
So as I understand it, the commit adds warning when user wants to use settings which cause performance issues. Correct?

Is anyone with AMD GPU affected? I am seriously considering selling my GeForce. Although I would miss CUDA.
I can reliably cause frame drops in glxgears just by cycling through kicker menu. Basic stuff like launching applications can cause stutters on my PC.
Comment 25 petrk 2024-05-26 19:39:38 UTC
Well, it's super smooth with AMD iGPU, so that's rather disappointing.
Comment 26 evgeniyharchenko.dev 2024-05-26 20:13:35 UTC
It seems, it is because of upgrading to Qt 6, so maybe we have a small chance that it can be fixed.
Comment 27 ratijas 2024-05-27 20:34:15 UTC
Git commit 258774f2d832500be542afb0298d6477a84c251e by ivan tkachenko.
Committed on 27/05/2024 at 10:10.
Pushed by ratijas into branch 'master'.

desktoppackage: Add UI to warn about and fix unsupported configurations

Requires https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4265

M  +32   -0    desktoppackage/contents/configuration/PanelConfiguration.qml

Comment 28 ratijas 2024-05-29 12:30:14 UTC
> It seems, it is because of upgrading to Qt 6, so maybe we have a small chance that it can be fixed.

This is caused by the constant resizes and redraw calls in Plasma panels. Seems like fixing it not possible due to the way the Panels work in Plasma 6 (they change size during transitions). Another interesting data point is that the Pager applet contributes to the stutter just by being there: https://bugs.kde.org/show_bug.cgi?id=475872
Comment 29 zellox 2024-06-01 00:34:51 UTC
I have the same problem with Wayland and AMD gpu. It only started happening with plasma 6.
Comment 30 Nate Graham 2024-06-07 21:12:56 UTC
We now have a thing that warns people about this. At the moment there's nothing else we can do on our side as it's an upstream issue.
Comment 31 MaxProPlus 2024-06-13 01:38:42 UTC
I have the same issue. It lags everywhere if there is any load. For example: open browser, ide(webstorm), slack and any rerender(windows resize, popups, many other things) is very laggy. It's not related with animation, I tried to turn off all animation, disable compositor and still have lags

Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.6.32-1-lts (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
GPU Driver: NVIDIA 550.90.07