Bug 144033 - Libreoffice (Calc) rendering very slow on GTK3 with Nvidia proprietary drivers
Summary: Libreoffice (Calc) rendering very slow on GTK3 with Nvidia proprietary drivers
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.1.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 145631 (view as bug list)
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2021-08-23 13:44 UTC by saverio.pub2
Modified: 2024-04-03 08:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saverio.pub2 2021-08-23 13:44:52 UTC
I'm on an Ubuntu MATE 20.04 machine, with Nvidia proprietary drivers (for reference, can't use Nouveau, since my machine doesn't boot with it).

Libreoffice (Calc) renders slow. The delay is very noticeable, even when just typing characters.

If I remove the GTK3 styling (`libreoffice-gtk3` package), then the rendering speed is fine (but of course, the program is unstyled, with some workflow consequences).

I've tried to run on GTK2 (`libreoffice-gtk2` package installed), but I see Calc as unstyled, so it seems it's not actually running on GTK2.

I've also tried to disable HW acceleration, but there is no improvement.

I don't experience this slowness on any other program on my installation.

I've noticed that when there's a delay, the Xorg process CPU occupation skyrockets (depending on how fast I type, it may go even to 100% single thread).

I've reproduced the same problem on all the LO versions, from the Ubuntu 20.04 default (6.4.7) to the latest (7.2).

The kernel version doesn't affect the problem as well (experienced on different 5.x versions).

Interestingly, I've tried a packaged LO (from https://libreoffice.soluzioniopen.com), and, while the Xorg process occupation goes relatively high (~35% while typing), there is no noticeable slowdown.

I'd be perfectly happy to run on GTK2 as workaround, if that allowed persistent copy/paste :)
Comment 1 saverio.pub2 2021-08-23 13:58:00 UTC
> Interestingly, I've tried a packaged LO (from
> https://libreoffice.soluzioniopen.com), and, while the Xorg process
> occupation goes relatively high (~35% while typing), there is no noticeable
> slowdown.

Correction: the behavior of the packaged version is the same (=slow).
Comment 2 Roman Kuznetsov 2021-08-24 06:51:58 UTC
Please write here an info from your LibreOffice's Help->About dialog
Comment 3 Caolán McNamara 2021-08-24 08:58:57 UTC
"disable HW acceleration" doesn't do anything except toggle what is used for full-screen impress presentations so it doesn't have any effect on anything else.

gtk2 support was dropped from trunk in Aug 2019 so there's no contemporary version with support for that anymore.

nvidia drivers and calc is a fairly common reoccurring problem, you might have more luck with your distro rather than here in the app
Comment 4 saverio.pub2 2021-08-24 13:17:17 UTC
(In reply to Roman Kuznetsov from comment #2)
> Please write here an info from your LibreOffice's Help->About dialog

Information follows:

    Version: 7.1.5.2 / LibreOffice Community
    Build ID: 10(Build:2)
    CPU threads: 32; OS: Linux 5.11; UI render: default; VCL: gtk3
    Locale: en-US (en_US.UTF-8); UI: en-US
    Ubuntu package version: 1:7.1.5~rc2-0ubuntu0.20.04.1~lo1
    Calc: threaded

I've also tried with other versions (6.4 and 7.0), and the problem occurs the same way.
Comment 5 QA Administrators 2021-08-25 03:54:01 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2021-08-25 20:59:34 UTC Comment hidden (obsolete)
Comment 7 saverio.pub2 2021-08-26 07:09:16 UTC
(In reply to Roman Kuznetsov from comment #6)
> >Interestingly, I've tried a packaged LO (from https://libreoffice.soluzioniopen.com), and, while the Xorg process occupation goes relatively high (~35% while typing), there is no noticeable slowdown.
> 
> So it can be Ubuntu's LibreOffice build problem only
> 
> I would close it as NOTOURBUG
> 
> Xisco, what do you think?

Before closing, I think it should be verified that an official build works as expected. Are the official deb packages a valid test case (https://www.libreoffice.org/donate/dl/deb-x86_64/7.2.0/en-US/LibreOffice_7.2.0_Linux_x86-64_deb.tar.gz)?
Comment 8 Roman Kuznetsov 2021-08-26 08:40:38 UTC
(In reply to saverio.pub2 from comment #7)
> Are the official deb packages a valid test case
> (https://www.libreoffice.org/donate/dl/deb-x86_64/7.2.0/en-US/LibreOffice_7.
> 2.0_Linux_x86-64_deb.tar.gz)?

Yes, it's a valid build for checking, thank you
Comment 9 saverio.pub2 2021-08-26 20:34:18 UTC
Results of keeping key `s` pressed in a Calc sheet, in a file of mine (not particularly large, around 350 rows in total):

- 7.2.0.4 official (gtk3): 85/90%
- 7.1.5rc2 ppa:libreoffice/ppa (no theme): 5/10%
- 7.1.5rc2 ppa:libreoffice/ppa (gtk3): 85/90%

The value on the right is the CPU occupation while the key is pressed.

The source reported as official is the www.libreoffice.org, installed via DEB packages.

In order to test the official distribution, I've removed (not purged; I think it doesn't make any difference) all the packages matching `libobasis` and `libreoffice`, then installed the DEB packages.
Comment 10 saverio.pub2 2021-08-26 20:37:09 UTC
Note that just today I've swapped the GPU with a more powerful one, which I think explains why the CPU occupation is not reaching 100%+; 85/90% is still very high though, and makes lag still very noticeable.
Comment 11 QA Administrators 2021-08-27 04:05:55 UTC Comment hidden (obsolete)
Comment 12 Timur 2021-10-01 13:33:35 UTC
Not sure if this bug is for LO or Ubuntu or NotOurBug.. but Low anyway.
Comment 13 George James 2021-11-12 19:06:05 UTC
See also bug 145631
where I've not tested as much, 
but new info is that the lag is also not there in LO 6.4
Maybe that will help.
Comment 14 George James 2021-11-14 16:41:04 UTC
from 145631 which I'll mark as Resolved, works for me

I used synaptic to remove older versions of LO 6.2 and 6.3. Now the link to 6.4 brings up the NO LAG version of 7.2.2.2

No Lag
Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Ubuntu package version: 1:7.2.2~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded

and the link to the 'current' LO Calc brings the problem one:
Still Lag
Version: 7.2.2.2 / LibreOffice Community
Build ID: 1eb16ced50a80b7125fabf09652dbb09393766d2
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: CL

That should shed some light for those that know the different packages and delivery.

I'm, unfortunately, still trying to figure out how to deal with LO and Ubuntu, links, software versions, etc. Least there is a fix for my use.
Comment 15 George James 2021-11-14 18:22:37 UTC
See again 145631: (https://bugs.documentfoundation.org/show_bug.cgi?id=145631)
this 6.4 build also has no lag, with or without Open CL

Version: 6.4.7.2
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-CA (en_CA.UTF-8); UI-Language: en-US
Calc: threaded
Comment 16 Telesto 2023-05-18 12:43:07 UTC
@saverio.pub2@gmail.com 
Are you using a 4k monitor? Reason: bug 154602
Comment 17 saverio.pub2 2023-09-15 06:39:27 UTC
(In reply to Telesto from comment #16)
> @saverio.pub2@gmail.com 
> Are you using a 4k monitor? Reason: bug 154602

Hello! No, the resolution was relatively low (I think it was 1080p).

After reading the previous comments, I believe this is a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=145631; I'm on AMD now, and Calc is "not extremely slow" anymore.
Comment 18 Buovjaga 2023-09-27 06:41:14 UTC
*** Bug 145631 has been marked as a duplicate of this bug. ***
Comment 19 Buovjaga 2023-09-27 06:44:00 UTC
Let's set to NEW per the duplicate.

In bug 152657 comment 15 Caolán says about Cairo: "There has been pain points in the past with nvidia and some of those OPERATORS."
Comment 20 Telesto 2024-04-03 08:11:27 UTC
FWIW: The commit mentioned in bug 154602 comment 13 might be the cause of the issues here too. It might not be the NVIDIA driver as such. It's likely only exposing the issue for some reason