Bug 158650 - Scrolling is lagging/freezing everywhere
Summary: Scrolling is lagging/freezing everywhere
Status: RESOLVED DUPLICATE of bug 155266
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectNotNeeded, regression
: 158662 158705 159352 (view as bug list)
Depends on:
Blocks: Scrolling-PageUpDown
  Show dependency treegraph
 
Reported: 2023-12-11 23:11 UTC by gP
Modified: 2024-02-10 15:23 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Skia/Metal checkbox settings (243.21 KB, image/png)
2023-12-13 13:07 UTC, Patrick Luby (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gP 2023-12-11 23:11:49 UTC
Description:
Scrolling is very slow, often freezes or produces display bugs in Calc, Writer, Draw, Preferences window, Startcenter, menu's dialogboxes, etc. Seems to be generalized... It is very confusing :(

Steps to Reproduce:
1.Scroll
2.
3.

Actual Results:
slow, often freezes or produces display bugs

Expected Results:
Scroll smoothly with no bugs


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 4; OS: Mac OS X 11.7.10; UI render: default; VCL: osx
Locale: fr-CA (fr_CA.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Steven Casey 2023-12-12 02:38:31 UTC
Scrolling results in no lag for me, however I am on Windows:

Version: 7.5.6.0.0+ (X86_64) / LibreOffice Community
Build ID: f0e825382a76d685998be702ed551a00b73476a5
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

(In reply to gP from comment #0)
> Description:
> Scrolling is very slow, often freezes or produces display bugs in Calc,
> Writer, Draw, Preferences window, Startcenter, menu's dialogboxes, etc.
> Seems to be generalized... It is very confusing :(

Is this occurring on all documents? Sounds like it is, but, if its on specific documents, could you attach one so we can test using those documents? If possible, adding a screen capture would be extremely helpful as well :)

Could you also try starting LO in safe mode (Open LO > Help > Restart in safe mode) and see if the same thing occurs? 

I have set this report to NEEDINFO, once you reply, please change it back to UNCONFIRMED. Thanks!
Comment 2 gP 2023-12-12 03:34:16 UTC
Thanks for your reply Steven,

Yes, it's occurring on all documents.

I also tried LO in safe mode and the same thing occurs.
Comment 3 m_a_riosv 2023-12-12 13:46:40 UTC
*** Bug 158662 has been marked as a duplicate of this bug. ***
Comment 4 m_a_riosv 2023-12-12 13:48:12 UTC
Setting as new, because it is reproduced also on tdf#158662
Comment 5 Stéphane Guillou (stragu) 2023-12-12 14:19:00 UTC
If it started in 7.5.9, I assume it is related to b8910f2a00119e2de136b00567d5f9704f84ac25 for bug 155266.
John confirms the regression in bug 155266 comment 59.
Comment 6 steve 2023-12-13 13:06:21 UTC
I believe this is a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=155266 which now is fixed.

Please re-test and see if you are able to reproduce this problem using todays or later build from https://dev-builds.libreoffice.org/daily/master/current.html

This is either a duplicate of #155266 or if you argue it is not, it is fixed in master builds and 7.5 branch will see the fix in next update.

Can someone affected by this please retest with master build and report how that behaves?
Comment 7 Patrick Luby (volunteer) 2023-12-13 13:07:04 UTC
Created attachment 191409 [details]
Skia/Metal checkbox settings
Comment 8 Patrick Luby (volunteer) 2023-12-13 13:07:55 UTC
Is there any improvement if you enable Skia/Metal rendering? A tester reported that switching to Skia/Metal improved performance.

To enable Skia/Metal rendering, do the following steps:

1. Open the Options dialog by selecting the LibreOffice > Preferences menu
2. Select LibreOffice > View in the left panel
3. In the right panel, check the "Use Skia for all rendering" and uncheck "Force Skia software rendering" checkboxes as shown in the following screen snapshot:
     https://bugs.documentfoundation.org/attachment.cgi?id=191409
4. Press the "OK" button and restart if prompted
Comment 9 aniseed.rumors.0i 2023-12-13 18:10:00 UTC
After reading Comment # 8 on bug 158650 from Patrick Luby

"Is there any improvement if you enable Skia/Metal rendering? A tester reported
that switching to Skia/Metal improved performance.

To enable Skia/Metal rendering, do the following steps:

1. Open the Options dialog by selecting the LibreOffice > Preferences menu
2. Select LibreOffice > View in the left panel
3. In the right panel, check the "Use Skia for all rendering" and uncheck
"Force Skia software rendering" checkboxes as shown in the following screen
snapshot:
     https://bugs.documentfoundation.org/attachment.cgi?id=191409
4. Press the "OK" button and restart if prompted?",


I would like to let you know that scrolling is trouble-free (at last!).


Thank you for the advice!
Comment 10 steve 2023-12-14 10:45:29 UTC
That is known. I was slightly surprised that Patrick asked about that. But probably wanted to double check and it is valuable information to have that faact verified.

What now still needs additional testing is, is skia / raster improved when running a master build from https://dev-builds.libreoffice.org/daily/master/current.html
Comment 11 m_a_riosv 2023-12-14 21:49:44 UTC
*** Bug 158705 has been marked as a duplicate of this bug. ***
Comment 12 Sam Ragucci 2023-12-20 03:35:36 UTC
Switching to Skia/Metal fixed the issue for me (LibreOffice 7.5.9.2 on an iMac with MacOS 13.6.3) in Calc and Writer, which is great.
Comment 13 steve 2023-12-20 11:38:43 UTC
Skia/Metal is known to work.

Can affected users please test and see if Skia/Raster works when running a master build from https://dev-builds.libreoffice.org/daily/master/current.html
Comment 14 matt 2023-12-29 19:50:39 UTC
(In reply to steve from comment #13)
> Skia/Metal is known to work.
> 
> Can affected users please test and see if Skia/Raster works when running a
> master build from
> https://dev-builds.libreoffice.org/daily/master/current.html

Skia/Raster performance seems to be significantly improved with the following development build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0f6f5048d223731aa52b768a77244d0208711391
CPU threads: 16; OS: macOS 13.6.1; UI render: Skia/Raster; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

It's still noticeably slower than Skia/Metal, but I'm guessing that is expected.

I encountered the issue in this ticket after upgrading to 7.6.4 (I think from 7.5.9, but not certain). However, at least in my case, I think there is something else going on here. After experiencing slowness I deleted ~/Library/Application Support/LibreOffice in attempt to reset, which seemed to resolve the problem. However, after some time had elapsed I noticed performance had degraded again. I did not change any settings or even enter the LibreOffice preferences dialog. After repeating this process a few times over several days I decided to diff the directory indicated earlier and noticed that the following setting exists when things become unusable--but not initially:

> <item oor:path="/org.openoffice.Office.Common/VCL"><prop oor:name="ForceSkiaRaster" oor:op="fuse"><value>true</value></prop></item>

So after reset UI render is as follows (and performance is great):

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 16; OS: Mac OS X 13.6.1; UI render: Skia/Metal; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

Later UI render has been changed (not by me) to:

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 16; OS: Mac OS X 13.6.1; UI render: Skia/Raster; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

...and Calc is unusable. I expect, with the changes in the development build I tried, performance will be alright when this happens--but I don't think it should be changing to Skia/Raster by itself. I had a quick grep through the codebase and I think SkiaZone::hardDisable() is being called for some reason?
Comment 15 Patrick Luby (volunteer) 2023-12-31 15:38:11 UTC
(In reply to matt from comment #14)
> So after reset UI render is as follows (and performance is great):
> 
> Version: 7.6.4.1 (X86_64) / LibreOffice Community
> Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
> CPU threads: 16; OS: Mac OS X 13.6.1; UI render: Skia/Metal; VCL: osx
> Locale: en-CA (en_CA.UTF-8); UI: en-US
> Calc: threaded
> 
> Later UI render has been changed (not by me) to:
> 
> Version: 7.6.4.1 (X86_64) / LibreOffice Community
> Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
> CPU threads: 16; OS: Mac OS X 13.6.1; UI render: Skia/Raster; VCL: osx
> Locale: en-CA (en_CA.UTF-8); UI: en-US
> Calc: threaded
> 
> ...and Calc is unusable. I expect, with the changes in the development build
> I tried, performance will be alright when this happens--but I don't think it
> should be changing to Skia/Raster by itself. I had a quick grep through the
> codebase and I think SkiaZone::hardDisable() is being called for some reason?

I think you are seeing a known Skia/Metal bug. In most cases, using Skia/Metal is a lot faster than using Skia/Raster. But, every once in while, Skia/Metal gets stuck in a very lengthy loop and LibreOffice appears to be hanging.

To handle this unpredictable Skia/Metal behavior, LibreOffice has a background thread (i.e. the "Watchdog" thread) that detects if Skia/Metal has been stuck for several seconds. If yes, LibreOffice invokes SkiaZone::hardDisable() which switches to Skia/Raster to break out of whatever loop Skia/Metal is stuck in.

If you are seeing SkiaZone::hardDisable() frequently, you may want to consider downloading LibreOffice 24.2 Beta1 from the following URL. That version already has the fix for tdf#155266 that LibreOffice 7.6.4 is missing so you should be able to use Skia/Raster with LibreOffice 24.2 Beta1. LibreOffice 7.6.5 will include the missing fix, but IIRC that won't be released until February 2024:

https://www.libreoffice.org/download/download-libreoffice/?type=mac-x86_64&version=24.2.0&lang=en-US

Note: LibreOffice 24.2 Beta1 will not overwrite your LibreOffice 7.6.4 installation. Instead, it will be installed in /Appplications/LibreOfficeDev.app so that you can run both 24.2 Beta1 and 7.6.4 at the same time.
Comment 16 Patrick Luby (volunteer) 2023-12-31 15:40:12 UTC
(In reply to Patrick Luby from comment #15)
> https://www.libreoffice.org/download/download-libreoffice/?type=mac-
> x86_64&version=24.2.0&lang=en-US
> 
> Note: LibreOffice 24.2 Beta1 will not overwrite your LibreOffice 7.6.4
> installation. Instead, it will be installed in
> /Appplications/LibreOfficeDev.app so that you can run both 24.2 Beta1 and
> 7.6.4 at the same time.

I forget to mention that the above link is for Mac Intel machines. For Mac Silicon machines, use the following link:

https://www.libreoffice.org/download/download-libreoffice/?type=mac-aarch64&version=24.2.0&lang=en-US
Comment 17 Stéphane Guillou (stragu) 2024-01-24 04:08:25 UTC
*** Bug 159352 has been marked as a duplicate of this bug. ***
Comment 18 dhina 2024-01-30 16:34:55 UTC
(In reply to Patrick Luby from comment #8)
> Is there any improvement if you enable Skia/Metal rendering? A tester
> reported that switching to Skia/Metal improved performance.
> 
> To enable Skia/Metal rendering, do the following steps:
> 
> 1. Open the Options dialog by selecting the LibreOffice > Preferences menu
> 2. Select LibreOffice > View in the left panel
> 3. In the right panel, check the "Use Skia for all rendering" and uncheck
> "Force Skia software rendering" checkboxes as shown in the following screen
> snapshot:
>      https://bugs.documentfoundation.org/attachment.cgi?id=191409
> 4. Press the "OK" button and restart if prompted



I had both "Use Skia for all rendering" and "Force Skia software rendering"  checked.

Unchecking "Force Skia software rendering" and restart removed the issue.

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Mac OS X 10.15.7; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (en_FR.UTF-8); UI: en-US
Calc: threaded
Comment 19 dhina 2024-01-30 16:42:56 UTC
(In reply to steve from comment #13)
> Skia/Metal is known to work.
> 
> Can affected users please test and see if Skia/Raster works when running a
> master build from
> https://dev-builds.libreoffice.org/daily/master/current.html

I confirm that the scroll smoothing issue is not present anymore in :

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4f09826f731d5ecfc1ed094e2f9e720071b1e58d
CPU threads: 8; OS: macOS 10.15.7; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_FR.UTF-8); UI: en-US
Calc: threaded

while it is in (when "Force Skia software rendering" is checked in Preferences > LO > Display:)

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Mac OS X 10.15.7; UI render: Skia/Metal; VCL: osx
Locale: fr-FR (en_FR.UTF-8); UI: en-US
Calc: threaded
Comment 20 steve 2024-01-31 17:04:38 UTC Comment hidden (obsolete)
Comment 21 DoodleGarbage 2024-02-08 19:37:13 UTC Comment hidden (off-topic)
Comment 22 Stéphane Guillou (stragu) 2024-02-10 01:24:26 UTC
(In reply to DoodleGarbage from comment #21)
>  Apologies if this isn't the correct place to put this, but this bug is
> present on Fedora 39 with a KDE display manager.
Indeed, this is not the right place. This issue is macOS-specific. Yours is likely KDE+Wayland in bug 153111 or bug 152911.

(In reply to dhina from comment #19)
> (In reply to steve from comment #13)
> > Skia/Metal is known to work.
> > 
> > Can affected users please test and see if Skia/Raster works when running a
> > master build from
> > https://dev-builds.libreoffice.org/daily/master/current.html
> 
> I confirm that the scroll smoothing issue is not present anymore in :
> 
> Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 4f09826f731d5ecfc1ed094e2f9e720071b1e58d
Thanks dhina.
Patrick, I'm not following if this can be considered fixed or not.
Comment 23 Patrick Luby (volunteer) 2024-02-10 15:23:14 UTC
(In reply to Stéphane Guillou (stragu) from comment #22)
> Thanks dhina.
> Patrick, I'm not following if this can be considered fixed or not.

It is fixed in LibreOffice 24.2.0.3 as well as the soon-to-be-released LibreOffice 7.6.5 so closing this bug as duplicate of tdf#155266.

*** This bug has been marked as a duplicate of bug 155266 ***