Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Typing and scrolling lag in LibreOffice due to gtk3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Aug 17, 2017 1:03 am    Post subject: Typing and scrolling lag in LibreOffice due to gtk3 Reply with quote

Hello all,

I did a system update, and am now using LibreOffice 5.4.0.3 with Xorg 1.19.3 and nvidia-drivers 384.59-r1. When typing in any LibreOffice application (Writer, Calc, et cetera), there is a fairly extreme lag and I've noticed that the ol' /usr/bin/X process spikes one full processor core (similar to the problem that I mentioned in this thread). I've also seen that the menus hang. For instance, in Writer, if I go to Table --> Insert (causing the pop-out menu to appear), that menu won't go away until I click somewhere else within the window.

Code:

$ emerge -pv libreoffice

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-office/libreoffice-5.4.0.3::gentoo  USE="branding cups dbus gtk gtk3 pdfimport (-aqua) -bluetooth -coinmp -collada -debug -eds -firebird -gltf -gnome -googledrive -gstreamer -java -jemalloc -kde -libressl -mysql -odk -postgres -quickstarter {-test} -vlc" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5 -python3_6" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Anyone else seeing these types of problems or know a way to further troubleshoot?

Thanks!

Cheers,
Nathan Zachary
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---


Last edited by NathanZachary on Wed Feb 14, 2018 3:42 pm; edited 3 times in total
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Aug 31, 2017 12:58 am    Post subject: Reply with quote

Nobody else is seeing these problems? I'm thinking that they're related to nvidia as I don't experience them on my laptop which is running a similar set of packages but using the intel graphics drivers.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Wed Sep 06, 2017 9:06 pm    Post subject: Reply with quote

I've found that it seems to be related to GTK3. If I start LibreOffice with:

Code:
SAL_USE_VCLPLUGIN=gtk libreoffice


there's no lag (with scrolling or typing).

I'm going to recompile without the 'gtk3' USE flag to see if that eliminates the problem without this workaround.
The workaround was taken from the following bug report:
https://bugs.documentfoundation.org/show_bug.cgi?id=101189
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
dantrell
Guru
Guru


Joined: 01 Jun 2007
Posts: 376
Location: Earth

PostPosted: Thu Sep 07, 2017 2:28 am    Post subject: Reply with quote

NathanZachary wrote:
Nobody else is seeing these problems?

You are not alone. I have also been experiencing a severe LibreOffice performance regression which started around the time of your original post but I didn't make time to look into it.

NathanZachary wrote:
I've found that it seems to be related to GTK3.

I tested this and reached the same conclusion.

NathanZachary wrote:
I'm going to recompile without the 'gtk3' USE flag to see if that eliminates the problem without this workaround.

That did it for me.

Thanks for the heads up. :)
_________________
Dantrell B.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Sep 07, 2017 3:22 am    Post subject: Reply with quote

You're welcome.
I just recompiled with "-gtk3" and the problems I had before are gone. :)
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Feb 08, 2018 4:49 pm    Post subject: Reply with quote

Just wanted to update this thread because there is a bit of a change with LibreOffice >=6. The USE flags appear to have changed with this release:

Code:

[I] app-office/libreoffice
     Available versions:  5.4.4.2 **5.4.9999 (~)6.0.0.3 **6.0.9999 **9999 {bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf googledrive gstreamer +gtk gtk2 gtk3 java jemalloc kde libressl mysql odk pdfimport postgres quickstarter test vlc ELIBC="FreeBSD" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" PYTHON_SINGLE_TARGET="python2_7 python3_4 python3_5 python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  6.0.0.3(15:39:27 06/02/18)(branding cups dbus gtk pdfimport -bluetooth -coinmp -debug -eds -firebird -googledrive -gstreamer -gtk2 -java -jemalloc -kde -libressl -mysql -odk -postgres -test -vlc ELIBC="-FreeBSD" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_5 -python2_7 -python3_4 -python3_6" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6")
     Homepage:            https://www.libreoffice.org
     Description:         A full office productivity suite


So, now it is necessary to remove gtk and add gtk2 to /etc/portage/package.use:

Code:

# grep libreoffice /etc/portage/package.use
app-office/libreoffice -gtk gtk2


as 'gtk' defaults to 'gtk3'.

Cheers,
Nathan Zachary
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6242
Location: Austria

PostPosted: Thu Feb 08, 2018 5:55 pm    Post subject: Reply with quote

Hm, sooner or later you should figure out why gtk3 performs that bad on your systems. The time of the legacy gtk2 frontend is limited.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Feb 08, 2018 6:00 pm    Post subject: Reply with quote

I don't know that this is directly related to my system or solely to GTK3. I think that it is the combination of LibreOffice and GTK3:
https://bugs.documentfoundation.org/show_bug.cgi?id=101189#c12

I agree that it would be best to find out the root cause, but it happens on multiple systems for me (desktop with nVidia, laptop with Intel graphics, et cetera). The comment linked above forces LibreOffice to go back to using GTK2, and that fixes the problem each time.

If you have any suggestions to further diagnosing, I would be happy to try them. I've also noticed that GTK3 works just fine with many applications other than LibreOffice.

Cheers,
Nathan Zachary
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6242
Location: Austria

PostPosted: Thu Feb 08, 2018 6:07 pm    Post subject: Reply with quote

Did you already switch on/off hardware acceleration and/or anti-aliasing in the preferences? Is it still slow typing or only scrolling now (could also be input driver related)?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic


Last edited by asturm on Thu Feb 08, 2018 6:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Feb 08, 2018 6:11 pm    Post subject: Reply with quote

Yes, I tried combinations of those settings. For now, it seems like GTK2 is my only usable option. I will have to investigate further once it is deprecated. :(
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6242
Location: Austria

PostPosted: Thu Feb 08, 2018 6:22 pm    Post subject: Reply with quote

Well, it is deprecated in >=6, to be dropped at some later point.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Feb 08, 2018 6:25 pm    Post subject: Reply with quote

Wonderful. Then I guess I will just have to drop GTK support, and deal with it being even more ugly than it is now. At least it will be usable.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6242
Location: Austria

PostPosted: Thu Feb 08, 2018 6:50 pm    Post subject: Reply with quote

I thought before you wrote on your laptop with Intel graphics you do not have that problem?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Thu Feb 08, 2018 6:55 pm    Post subject: Reply with quote

You're definitely right. I had forgotten that the issue didn't manifest itself with the Intel drivers. I will have to check to make sure that's still the case (likely so) on my laptop. It takes quite some time to compile on my laptop, so when I get to it, I'll respond on this thread. That being said, maybe it is somehow related to the combination of LibreOffice, GTK3, and the nVidia BLOB.

Sorry for mistakenly saying it impacted the Intel drivers as well.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6242
Location: Austria

PostPosted: Thu Feb 08, 2018 11:07 pm    Post subject: Reply with quote

Do you have TripleBuffering enabled or disabled?

I have been avoiding Nvidia GPUs like the plague so I am not of much use here, but just recently someone reported in IRC they greatly improved their system performance by triggering that option (one way or the other I don't know).
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Fri Feb 09, 2018 1:40 am    Post subject: Reply with quote

Not sure yet whether or not it helped with LibreOffice and GTK3, but it certainly provided some improvement with the tearing that I was experiencing in Chromium. Thanks for the suggestion!

Cheers,
Nathan Zachary
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2431
Location: /home/zach

PostPosted: Wed Feb 14, 2018 3:42 pm    Post subject: Reply with quote

After trying many different approaches, I'm still left with GTK2 as the only method of getting LibreOffice to function at a usable speed. When typing in a somewhat large Calc sheet using GTK2, it is responsive. When I recompile using GTK3, there is a 3-4 second delay between when I type each character and when it appears. Whilst typing, I see that one process is consuming a full 100% of a single processor core:

Code:
/usr/bin/X -nolisten tcp :0 -auth /home/zach/.serverauth.10377


Other than that, I see no signs of a problem.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 97

PostPosted: Sat Feb 24, 2018 10:38 am    Post subject: Reply with quote

I confirm problem in LO 6.0 on scrolling with touchpad. I recompiled with -gtk gtk2 and problems are gone.

With gtk3, the scrolling was almost impossible, very sluggish, very fast upwards and very difficult downwards, or was it the reverse? I really can't be certain. External mousewheel operated correctly though.

Context menu was also impossible to get on the want cell (calc). As soon as I placed my two fingers on the touchpad, the sheet would slide on the faster speed direction; again, I'm not certain which this was. Sometimes, if I had my two fingers steady on the touchpad, the sheet would slowly slide sluggish and continuously.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum