Bug 450139 - KolourPaint lags significantly when drawing a line/shape on Wayland with a mouse with high refresh rate
Summary: KolourPaint lags significantly when drawing a line/shape on Wayland with a mo...
Status: REOPENED
Alias: None
Product: kolourpaint
Classification: Applications
Component: general (show other bugs)
Version: 21.12.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kolourpaint-support
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2022-02-13 09:44 UTC by Fushan Wen
Modified: 2024-07-02 15:29 UTC (History)
4 users (show)

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


Attachments
video.mp4 (583.57 KB, video/mp4)
2023-06-02 15:16 UTC, Fushan Wen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-02-13 09:44:34 UTC
SUMMARY
On Wayland, 125% scale, drawing a line in KolourPaint has a significant lag between the cursor and the actual line on the canvas.


STEPS TO REPRODUCE
1. Log in to Wayland, and set 125% scale in Display settings.
2. Open KolourPaint
3. Choose "Line" tool and draw something on the canvas

OBSERVED RESULT
Significant lag

EXPECTED RESULT
No lag like on X11

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220210
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.4-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
Information for package kolourpaint:
------------------------------------
Repository     : unstable-kde-applications
Name           : kolourpaint
Version        : 22.03.70git.20220128T234302~ec495309-ku.7.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 1.9 MiB
Installed      : Yes
Status         : up-to-date
Source package : kolourpaint-22.03.70git.20220128T234302~ec495309-ku.7.1.src
Summary        : Paint Progra
Comment 1 Fushan Wen 2022-09-20 16:33:56 UTC
Can't reproduce on master
Comment 2 Oxalica 2022-09-20 17:41:10 UTC
I can reproduce it with 22.08.1, which is also current master, under sway window manager (wayland).

SOFTWARE/OS VERSIONS
sway version: both 1.7 and current master cffb006feba52c318e66f73c3463032fa76782dc reproduce
kolourpaint version: 22.08.1
Qt version: 5.15.5
OS: NixOS unstable
CPU/GPU: AMD Ryzen 7 5700G with integrated GPU
RAM: 16GiB

ADDITIONAL INFORMATION
1. 100% scale or 200% scale both work flawlessly. Only 125% scale causes significant redraw lag (500ms to 1s delay) even when selecting "Brush" tool and moving the cursor fast on the canvas, no need to press mouse button. 
2. There are also many lines of "QWaylandShmBuffer: mmap failed (Invalid argument)" printed in console.
Comment 3 tidal3179 2023-05-19 23:31:34 UTC
I'm also encountering this error when using kolourpaint 23.04.1 on opensuse tumbleweed when running my desktop under wayland at 150% scaling. The temporary workaround I use is to force kolourpaint to run via xwayland using 'QT_QPA_PLATFORM=xcb'
Comment 4 Fushan Wen 2023-06-02 15:16:35 UTC
Created attachment 159412 [details]
video.mp4

Can reproduce with 200% scale
Comment 5 deadmeu 2023-08-25 05:54:08 UTC
Also an issue for me at 100% scale

Operating System: Arch Linux 
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-arch2-1 (64-bit)
Graphics Platform: Wayland
Comment 6 Bug Janitor Service 2024-01-01 14:43:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/kolourpaint/-/merge_requests/47
Comment 7 Nate Graham 2024-01-02 16:57:03 UTC
It's an upstream issue which will be fixed in Qt by Kai Uwe Broulik with https://codereview.qt-project.org/c/qt/qtwayland/+/527980.
Comment 8 Fushan Wen 2024-01-06 15:44:14 UTC
Not fully fixed. Reopened
Comment 9 Fushan Wen 2024-02-14 01:21:56 UTC
According to kbroulik, On X11 AA_CompressHighFrequencyEvents is enabled
Comment 10 Nate Graham 2024-07-02 15:29:10 UTC
This might be fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/5984. Can you re-test with KWin from git master?