Bug 152911 - VIEWING - High CPU and lag when scrolling on Wayland with modified display scale (KF5)
Summary: VIEWING - High CPU and lag when scrolling on Wayland with modified display sc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Keywords: perf
Depends on:
Blocks: Wayland Crash Scrolling-Performance
  Show dependency treegraph
Reported: 2023-01-07 13:25 UTC by bugs
Modified: 2023-05-18 15:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description bugs 2023-01-07 13:25:50 UTC
When using KDE Wayland on a laptop with an AMD integrated GPU, I get some high CPU spikes and massive lag when i scroll through a document. Large documents (tens of thousands of words, zero images) are near-unusable, but this is noticeable even on an empty one-page document. On an X11 session, scrolling is perfectly smooth.

Steps to Reproduce:
1. Start a KDE Wayland session
2. Open LibreOffice Writer
3. Scroll

Actual Results:
Choppy scrolling and high CPU usage

Expected Results:
Smooth scrolling, like in X11

Reproducible: Always

User Profile Reset: No

Additional Info:
This is on LO, kf5 (cairo+wayland) Linux 6.0 (Fedora 37). I have smooth scrolling disabled and hardware acceleration enabled (toggling any of these settings makes no difference). I do use fractional scaling on Wayland, but then again it doesn't make a difference, the only factor that makes it not lag seems to be not using Wayland at all. Starting LO in Safe Mode does not make a difference either.
Comment 1 Stéphane Guillou (stragu) 2023-01-11 08:18:58 UTC
Could not reproduce with:

Version: / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Integrated GPU: Intel Corporation UHD Graphics 620 (rev 07)

Could you maybe share an example document where the lag is clearly visible, for others to test?
Comment 2 bugs 2023-01-11 20:07:47 UTC
Upon further testing the problem does seem to be fractional scaling, since setting scaling to 1x and only then opening a new instance of LO has no issues. Since KDE renders at double the resolution to achieve fractional scaling, it may just be my computer not being able to render LO scrolling at 4K (AMD Ryzen 5 laptop). The Flatpak version runs better (still choppy), the non-Flatpak skips all the graphics tests so I may be missing something graphics related as well.

I'll leave it up to you whether to close this one. Thanks!
Comment 3 QA Administrators 2023-01-12 03:21:26 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2023-01-12 09:57:42 UTC
I could actually reproduce some very sluggish scrolling. On Ubuntu 20.04 with GNOME + Wayland, all my displays at 200% scaling, starting LO with:

And then changing all my displays' scaling back to 100% (with LO still open), I end up with extremely choppy scrolling with the mousewheel, and even more so by dragging the scrollbar: it struggles so much that it hangs, and I managed to make it crash(?) with the console message:

   The Wayland connection broke. Did the Wayland compositor die?

(The LO window disappears, but I still had to kill the process in the console.)

Version: (X86_64) / LibreOffice Community
Build ID: 92deea6301a02f5530f17263f58402344f82013c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Not reproducible with GTK3.