Bug 494611 - Poor performance with Nvidia + nightlight
Summary: Poor performance with Nvidia + nightlight
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: 6.2.0
Platform: Manjaro Linux
: HI major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-10-12 18:13 UTC by medin
Modified: 2024-11-13 23:07 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.1.1
Sentry Crash Report:


Attachments
T4400_drm_info (22.44 KB, text/plain)
2024-10-25 10:00 UTC, medin
Details
i3-1005g1_drm_info (221.45 KB, text/plain)
2024-10-25 10:03 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2024-10-12 18:13:20 UTC
I have 3 laptops (cheap/old and medium range) only using Intel iGPUs (two i3 and one dual core), the mouse movements became laggy, animations are rendered slowly and the whole experience is really worse and severe on Plasma 6.2.

Disabling all desktop effects and setting animation speed to instant seems to improve responsiveness of the system and apps.

Plasma 6.1 was truthfully perfect, smooth and fast, but 6.2 cannot be used at all.
Comment 1 S. Bryant 2024-10-13 17:55:43 UTC
I have a i7-6700K (4GHz), 32GB RAM and an Nvidia 4060, and I'm seeing the exact same problems with Plasma 6.2 (6.1 was fine for me too).  The problem doesn't look to be related to any specific hardware.

My system has openSUSE Slowroll installed, using the precompiled RPMs.  kwin_wayland varies between 130% and 250% CPU; with 6.1 it was a fraction of this.

I'll note that VLC can't display video with 6.2.  Video playback in the browser (both FF & Chrome) is not at all smooth either.
Comment 2 medin 2024-10-13 18:15:03 UTC
I would like to add that even with all effects disabled, I found it hard to smoothly move cursor, even typed text is slow to appear, even the highlight color of border that appears around buttons, scrollbars, text fields..., when cursor hovers over them, takes longer to appear.
Comment 3 medin 2024-10-13 21:19:14 UTC
X11 seems to be really fast and smooth and doesn't suffer from any slowness with all defaults effects enabled, so the problem is only on Wayland.
Comment 4 medin 2024-10-15 18:50:21 UTC
The culprit is Night Light, it causes the slowness when it's enabled and only during its time of activation.

I disabled it then rebooted and Wayland became usable again.
Comment 5 Bug Janitor Service 2024-10-16 17:29:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6646
Comment 6 Zamundaaa 2024-10-16 18:50:08 UTC
Git commit d9ce40c06f3bfb4da84d59be9c3b358281f9aa40 by Xaver Hugl.
Committed on 16/10/2024 at 18:21.
Pushed by zamundaaa into branch 'master'.

backends/drm: don't skip colorops when matching the pipeline

We combine all possible operations from the pipeline into one hardware color op,
there's no reason to skip any - it just prevents matching a pipeline that could
actually be represented in hardware just fine.

M  +0    -1    src/backends/drm/drm_colorop.cpp

https://invent.kde.org/plasma/kwin/-/commit/d9ce40c06f3bfb4da84d59be9c3b358281f9aa40
Comment 7 Zamundaaa 2024-10-16 18:58:26 UTC
Git commit d1eb9f0534cb454b173ce758d84956aae52b507c by Xaver Hugl.
Committed on 16/10/2024 at 18:57.
Pushed by zamundaaa into branch 'Plasma/6.2'.

backends/drm: don't skip colorops when matching the pipeline

We combine all possible operations from the pipeline into one hardware color op,
there's no reason to skip any - it just prevents matching a pipeline that could
actually be represented in hardware just fine.


(cherry picked from commit d9ce40c06f3bfb4da84d59be9c3b358281f9aa40)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +0    -1    src/backends/drm/drm_colorop.cpp

https://invent.kde.org/plasma/kwin/-/commit/d1eb9f0534cb454b173ce758d84956aae52b507c
Comment 8 S. Bryant 2024-10-16 19:42:45 UTC
(In reply to medin from comment #4)
> The culprit is Night Light, it causes the slowness when it's enabled and
> only during its time of activation.
> 
> I disabled it then rebooted and Wayland became usable again.

Not in my case -  wasn't enabled.  I enabled it, and while the colours changed, the performance was the same.  :-(

Anyway, I see there's already a commit in.  Looking forward to trying the new version.
Comment 9 medin 2024-10-17 13:24:18 UTC
I installed kwin 6.2.1.1 and rebooted, the fix really improved the slowness when Night Light is enabled, but it's not at the level like it was on Plasma 6.1, mouse and animations lagging is still noticeable. May be for people with powerful CPUs it's not noticeable but for my case it's still there.

For now, speed, responsiveness and performance on X11 are better than Wayland.
Comment 10 medin 2024-10-24 10:51:43 UTC
On Plasma 6.2.2, Night Light is still producing slowness and lagging on intel iGPUs.
Comment 11 Zamundaaa 2024-10-24 14:04:25 UTC
How old are those iGPUs? Could you attach the output of drm_info on those PCs?
Comment 12 medin 2024-10-25 10:00:55 UTC
Created attachment 175222 [details]
T4400_drm_info
Comment 13 medin 2024-10-25 10:03:02 UTC
Created attachment 175223 [details]
i3-1005g1_drm_info
Comment 14 Bug Janitor Service 2024-11-09 03:46:49 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 15 medin 2024-11-13 20:37:31 UTC
Already done.
Comment 16 Zamundaaa 2024-11-13 21:25:59 UTC
(In reply to medin from comment #12)
> Created attachment 175222 [details]
> T4400_drm_info
I see what's going on in this case, and it's very different from this. Please make a separate bug report about it.

(In reply to medin from comment #13)
> Created attachment 175223 [details]
> i3-1005g1_drm_info
I'm not sure why this one would have issues... Only thing I see is
> "GAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 262145
which is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3916 and needs to be guarded against in some new code, but should only cause performance issues while the color temperature is changing and not when it stays the same.
Please also make a new bug report about that one, it needs further investigation.
Comment 17 medin 2024-11-13 23:07:23 UTC
(In reply to Zamundaaa from comment #16)
> (In reply to medin from comment #12)
> > Created attachment 175222 [details]
> > T4400_drm_info
> I see what's going on in this case, and it's very different from this.
> Please make a separate bug report about it.
> 
> (In reply to medin from comment #13)
> > Created attachment 175223 [details]
> > i3-1005g1_drm_info
> I'm not sure why this one would have issues... Only thing I see is
> > "GAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 262145
> which is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3916 and
> needs to be guarded against in some new code, but should only cause
> performance issues while the color temperature is changing and not when it
> stays the same.
> Please also make a new bug report about that one, it needs further
> investigation.

I add that night light was enabled and working fine in Plasma 6.1 on all laptops. The regression was done in 6.2.