Bug 469151 - On Wayland and Plasma 6 with 200% scale and AMS on, mouse cursor lags while any Plasma panel pop-ups are open
Summary: On Wayland and Plasma 6 with 200% scale and AMS on, mouse cursor lags while a...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6, wayland
: 441208 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-04-29 17:07 UTC by Nate Graham
Modified: 2023-07-06 10:26 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-04-29 17:07:35 UTC
When moving the cursor over Plasma panel pop-ups--specifically areas in scrollable views that contain content--the cursor lags. It only affects widgets with *Panel* popups; when an affected widget is placed on the desktop, the issue is not seen. In affected widgets, the issue goes away when moving the cursor over a part of a scrollview that is empty (because the view does not contain enough content to become scrollable).

This affects all widgets with scrollviews when placed on a Panel, including Kickoff, all widgets that can live in the System Tray, Digital Clock, and Stocky Note.

However the issue does not affect popups for Task Manager tooltips, which I know internally have a scrollview.

Other relevant parts of my environment:
- Qt 6.4.3
- 200% scale
- Wayland
Comment 1 Nate Graham 2023-05-06 14:48:12 UTC
Issue only seen on Wayland; X11 Plasma 6 session is unaffected.

Nicolas did some Heaptrack investigation with me and we found something a bit odd: when it's laggy, it's using *less* CPU time and generating *fewer* cursor position change events. So it's not an issue of being bottlenecked on system resources; rather it's not requesting enough of them!
Comment 2 Nate Graham 2023-05-07 08:00:44 UTC
Another data point: I can reproduce it with 200% scale, but colleagues using Wayland with 100% scale cannot reproduce it.
Comment 3 Vlad Zahorodnii 2023-05-31 13:06:13 UTC
I can't reproduce it on my laptop. I use 200% scale. I have Qt 6.5.1, Arch linux
Comment 4 Nate Graham 2023-06-19 19:57:55 UTC
With https://invent.kde.org/plasma/kwin/-/merge_requests/4161 merged, the manifestation of this issue is now different:

AMS enabled (the default): Cursor lags on any part of the screen when any Plasma Panel popups are open
AMS disabled with KWIN_DRM_NO_AMS=1: Cursor never lags
Comment 5 Nate Graham 2023-06-23 10:47:47 UTC
And with https://invent.kde.org/plasma/kwin/-/merge_requests/4207 applied, the manifestation is different again: now I get back to the original issue of mouse lag when moving over delegated of plasma popups. It appears to be the background Contrast effect that causes this problem; if I turn it off, the problem goes away. And if I have it on--even with the Blur effect off--the problem remains.
Comment 6 Bug Janitor Service 2023-06-23 15:43:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4211
Comment 7 David Edmundson 2023-06-24 08:09:23 UTC
Git commit b22e58846a998080c992a69b7a2306ac288b768c by David Edmundson.
Committed on 24/06/2023 at 07:54.
Pushed by davidedmundson into branch 'master'.

contrast: Improve performance

glCopyTexSubImage2D is super slow on Intel GPUs on wayland.

We have an existing method to read from the framebuffer that is used in
the blur and other effects.

Rather than creating a scratch framebuffer every frame we keep a cache
per window for the lifespan of the effect.

M  +28   -22   src/plugins/backgroundcontrast/contrast.cpp
M  +4    -1    src/plugins/backgroundcontrast/contrast.h

https://invent.kde.org/plasma/kwin/-/commit/b22e58846a998080c992a69b7a2306ac288b768c
Comment 8 David Edmundson 2023-07-06 10:26:31 UTC
*** Bug 441208 has been marked as a duplicate of this bug. ***