Bug 443511 - "prefer smoother animations" required on Nvidia to prevent lag increase and stutter with multiple windows
Summary: "prefer smoother animations" required on Nvidia to prevent lag increase and s...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.22.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-09 10:47 UTC by tempel.julian
Modified: 2023-06-24 20:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tempel.julian 2021-10-09 10:47:32 UTC
SUMMARY
"prefer smoother animations" is required on Nvidia to prevent lag increase and stutter with multiple windows.

STEPS TO REPRODUCE
1. With Nvidia proprietary driver in an Xorg session, set latency reduction to "force lowest latency"
2. Close all windows and e.g. open Dolphin as sole new window
3. Move its window and witness smoothness and lowest lag
4. Additionally open a window of KWrite or Kate

OBSERVED RESULT
Now moving the Dolphin window has more lag (larger distance between hardware cursor and window) and it sometimes stutters.

EXPECTED RESULT
Ideally also "force lowest latency" should work on fast Nvidia cards on Xorg. I might be mistaken, but I think it did with kwin-lowlatency fork.

My impression is that the issue also can occur with the default setting of "balance of latency and smoothness", though one is a bit more prone to overlook it due to the lower difference in lag. With "prefer smoother animations" the issue seems to be gone, then there is only the usual terrible Nvidia Xorg driver performance left, e.g. playing a video in mpv which makes scrolling in Firefox stuttery (not sure if an Xorg compositor can fix that).


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 5.14.10
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Nvidia 470.62.05 & RTX 3060
Comment 1 tempel.julian 2021-11-19 22:56:42 UTC
Side note: The issue exists in a somewhat similar way for Gnome Mutter, though in an even worse fashion when it comes to moving windows. Probably not worth investigating further for hacky Nvidia Xorg driver.

However, on a more general note, I also found "prefer smoother animations" a better default setting for slow GPUs like that in Gemini Lake SoCs. With the default of "balanced", there are already noticeable frame drops (not just for animations) when using Firefox or mpv on Wayland etc. So I think it might be worth considering to make "prefer smoother animations" the default setting, as users likely will think Plasma not being optimized enough when they encounter stutter and likely are unaware of the existence of the latency setting. I think the input lag with "prefer smoother animations" is still very competitive for regular desktop usage or perhaps even casual games. I even got it set to "force smoothest animations" with that slow GPU, just to play it safe, and I can't really say that it would be more laggy than e.g. Windows (more like the opposite).
Comment 2 David Edmundson 2023-06-24 20:44:00 UTC
Smoother animations increase lag. 

We have some work to do to improve render timings which will make these settings more effective. Changing defaults before that is jumping the gun.