Bug 439393

Summary: Terrible performance when resizing windows with NVIDIA GPU+driver and compositing enabled
Product: [Plasma] kwin Reporter: Matty R <dev>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate
Priority: NOR    
Version: 5.22.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=414785
Latest Commit: Version Fixed In:
Attachments: demo
moving items around in application launcher

Description Matty R 2021-07-02 07:34:27 UTC
SUMMARY
Desktop drops to 20-30fps when resizing windows, such as dolphin, firefox (blank tab), and Plasma Settings window. Display is 100 FPS, 3440x1440 on an nVidia 3070ti. 

STEPS TO REPRODUCE
1. Resize any of the windows listed in summary

OBSERVED RESULT
FPS drops from 100 to 20-30 FPS, and windows 

EXPECTED RESULT
Minimal FPS drop.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.12.13-zen1-2-zen (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA Graphics Device/PCIe/SSE2
Comment 1 Matty R 2021-07-02 07:39:20 UTC
Created attachment 139796 [details]
demo
Comment 2 Matty R 2021-07-03 02:26:04 UTC
Created attachment 139814 [details]
moving items around in application launcher

Found that it also drops significantly when moving items in the application launcher.
Comment 3 Nate Graham 2021-07-29 23:26:27 UTC
Does performance improve when compositing is disabled?
Comment 4 Matty R 2021-07-30 05:40:27 UTC
(In reply to Nate Graham from comment #3)
> Does performance improve when compositing is disabled?

Yes, there is a significant improvement. At most it will drop to 80fps.
Comment 5 Nate Graham 2021-07-30 14:04:15 UTC
I wonder if this is a driver issue. I don't see this kind of stuttering with much weaker hardware than yours (crappy Intel 10th gen i7 with HD620 iGPU). What NVIDIA hardware are you using for your GPU?
Comment 6 Matty R 2021-07-30 14:17:19 UTC
(In reply to Nate Graham from comment #5)
> I wonder if this is a driver issue. I don't see this kind of stuttering with
> much weaker hardware than yours (crappy Intel 10th gen i7 with HD620 iGPU).
> What NVIDIA hardware are you using for your GPU?

3070ti - I've switched to using beta drivers as well 470.57.02-1
Comment 7 Nate Graham 2021-07-30 14:18:37 UTC
Thanks. And did that help at all? Or is resizing performance still bad?
Comment 8 Matty R 2021-07-30 14:26:09 UTC
(In reply to Nate Graham from comment #7)
> Thanks. And did that help at all? Or is resizing performance still bad?

Still just as bad. Moving windows around is fine, it's just resizing.
Comment 9 Martin Droessler 2021-09-13 09:42:14 UTC
Same here - not only on resizing, but especially when it comes to overlay-popups e.g. notifications! Especially notifications! The FPS drops to around 7, every time a notification pops up.
But also the overall responsiveness is quite bad and sluggish.

I tried disabling most effect-plugins - but nothing changed.

When disabling compositing, everything is fast and smooth.

OS: Arch Linux
Kernel: 5.13.13-arch1-1
Plasma/kwin: 5.22.5
Graphics Platform: X11
Frameworks: 5.85.0
QT: 5.15.2
CPU: AMD Ryzen Threadripper 1920X
RAM: 32GB
GPU: NVidia GeForce RTX 2080
Driver: 470.63.01
Comment 10 Nate Graham 2021-09-13 14:54:41 UTC
The notification issue specifically is tracked with Bug 414785.
Comment 11 Vlad Zahorodnii 2021-09-14 07:39:57 UTC
(In reply to Nate Graham from comment #5)
> I wonder if this is a driver issue. I don't see this kind of stuttering with
> much weaker hardware than yours (crappy Intel 10th gen i7 with HD620 iGPU).
> What NVIDIA hardware are you using for your GPU?

yeah, it might be a driver issue https://github.com/ValveSoftware/steam-for-linux/issues/3429#issuecomment-54098190
Comment 12 Nate Graham 2021-09-14 20:20:38 UTC
Oof. :(

I guess you can report this issue to the NVIDIA folks, either by sending an email to linux-bugs@nvidia.com or making a post at https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/

It would be helpful to the NVIDIA developers if you could run nvidia-bug-report.sh and attach the resulting file in your report. Thanks!
Comment 13 Matty R 2021-09-14 20:48:43 UTC
(In reply to Vlad Zahorodnii from comment #11)
> (In reply to Nate Graham from comment #5)
> > I wonder if this is a driver issue. I don't see this kind of stuttering with
> > much weaker hardware than yours (crappy Intel 10th gen i7 with HD620 iGPU).
> > What NVIDIA hardware are you using for your GPU?
> 
> yeah, it might be a driver issue
> https://github.com/ValveSoftware/steam-for-linux/issues/3429#issuecomment-
> 54098190

I don't think it's the same problem. I don't have any problems with Steam notifications, it's specific to Plasma.
Comment 14 Nate Graham 2021-09-14 21:25:19 UTC
Sure, it's not the exact same issue, but it's probably still a driver bug.
Comment 15 Matty R 2021-09-14 21:47:08 UTC
(In reply to Nate Graham from comment #14)
> Sure, it's not the exact same issue, but it's probably still a driver bug.

That specific bug appears to have been resolved with Driver 343.36:

* Fixed an OpenGL issue that could cause glReadPixels() operations to be improperly clipped when resizing composited application windows, potentially leading to momentary X freezes.