View previous topic :: View next topic |
Author |
Message |
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Aug 17, 2017 1:03 am Post subject: Typing and scrolling lag in LibreOffice due to gtk3 |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Aug 31, 2017 12:58 am Post subject: |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Wed Sep 06, 2017 9:06 pm Post subject: |
|
|
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 |
|
|
dantrell l33t
Joined: 01 Jun 2007 Posts: 915 Location: Earth
|
Posted: Thu Sep 07, 2017 2:28 am Post subject: |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Sep 07, 2017 3:22 am Post subject: |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Feb 08, 2018 4:49 pm Post subject: |
|
|
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 |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Thu Feb 08, 2018 5:55 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Feb 08, 2018 6:00 pm Post subject: |
|
|
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 |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Thu Feb 08, 2018 6:07 pm Post subject: |
|
|
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)?
Last edited by asturm on Thu Feb 08, 2018 6:11 pm; edited 1 time in total |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Feb 08, 2018 6:11 pm Post subject: |
|
|
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 |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Thu Feb 08, 2018 6:22 pm Post subject: |
|
|
Well, it is deprecated in >=6, to be dropped at some later point. |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Feb 08, 2018 6:25 pm Post subject: |
|
|
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 |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Thu Feb 08, 2018 6:50 pm Post subject: |
|
|
I thought before you wrote on your laptop with Intel graphics you do not have that problem? |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Feb 08, 2018 6:55 pm Post subject: |
|
|
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 |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Thu Feb 08, 2018 11:07 pm Post subject: |
|
|
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). |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Fri Feb 09, 2018 1:40 am Post subject: |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Wed Feb 14, 2018 3:42 pm Post subject: |
|
|
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 |
|
|
jssilva Tux's lil' helper
Joined: 27 Sep 2017 Posts: 106
|
Posted: Sat Feb 24, 2018 10:38 am Post subject: |
|
|
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 |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Tue Mar 31, 2020 10:31 pm Post subject: |
|
|
Years later and now that GTK2 is no longer supported, my only option to keep LibreOffice usable is to disable GTK completely.
With the GTK flag enabled, the lag is so bad that it isn't workable. So, I have to put USE="-gtk" in my package.use for LibreOffice. Of course, that has the nasty side-effect of making it look straight out of the GNOME 1 desktop environment. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Tue Mar 31, 2020 10:59 pm Post subject: |
|
|
Why not try with USE=qt5 to have another data point?
I am not aware of a (presumably) big junk of LibreOffice users having Nvidia GPUs with such issues. |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Tue Mar 31, 2020 11:24 pm Post subject: |
|
|
Thanks for your response even on this really old, necrobumped thread.
I assume you mean USE=kde, and I could try that even though it pulls in a lot of dependencies that I don't particularly want. I just wish I knew why GTK3 within LibreOffice caused this problem. I just realised that Audacious now builds with qt5 instead of gtk, so I can't use that as a comparison either. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Tue Mar 31, 2020 11:36 pm Post subject: |
|
|
Also, looking at how few packages have the "gtk" USE flag these days, maybe I should start focusing on qt5 instead:
Code: |
$ equery hasuse gtk
* Searching for USE flag gtk ...
[IP-] [ ] app-crypt/gcr-3.34.0-r1:0/1
[IP-] [ ] app-crypt/pinentry-1.1.0-r3:0
[IP-] [ ] app-office/libreoffice-6.4.2.2:0
[IP-] [ ] app-text/ghostscript-gpl-9.50:0
[IP-] [ ] dev-qt/qtwidgets-5.14.1:5/5.14
[IP-] [ ] media-gfx/fontforge-20200314:0
[IP-] [ ] media-libs/gst-plugins-bad-1.14.5:1.0
[IP-] [ ] media-libs/libcanberra-0.30-r5:0
[IP-] [ ] media-libs/suil-0.10.6:0
[IP-] [ ] net-analyzer/mtr-0.93-r1:0
[IP-] [ ] net-im/pidgin-2.13.0-r8:0/2
[IP-] [ ] net-libs/gssdp-1.2.2:0/1.2-0
[IP-] [ ] sys-auth/polkit-0.116-r1:0
[IP-] [ ] www-client/netsurf-3.9:0
[IP-] [ ] x11-libs/libfm-1.3.1:0/5.2.1
|
For LibreOffice in particular, the extra dependencies for using qt5 are:
Code: |
# emerge -avN libreoffice
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] dev-qt/qttest-5.14.1:5/5.14::gentoo USE="-debug -test" 0 KiB
[ebuild N ] kde-frameworks/extra-cmake-modules-5.68.0:5/5.68::gentoo USE="-doc -test" 335 KiB
[ebuild N ] kde-frameworks/breeze-icons-5.68.0:5/5.68::gentoo USE="-test" 2,606 KiB
[ebuild N ] kde-frameworks/kf-env-5:5::gentoo 0 KiB
[ebuild N ] kde-frameworks/kcoreaddons-5.68.0:5/5.68::gentoo USE="nls -debug -doc (-fam) -test" 362 KiB
[ebuild N ] kde-frameworks/karchive-5.68.0:5/5.68::gentoo USE="bzip2 lzma -debug -doc -test" 452 KiB
[ebuild N ] kde-frameworks/kcodecs-5.68.0:5/5.68::gentoo USE="nls -debug -doc -test" 216 KiB
[ebuild N ] kde-frameworks/kconfig-5.68.0:5/5.68::gentoo USE="dbus nls -debug -doc -test" 248 KiB
[ebuild N ] kde-frameworks/kdbusaddons-5.68.0:5/5.68::gentoo USE="X nls -debug -doc -test" 43 KiB
[ebuild N ] kde-frameworks/kguiaddons-5.68.0:5/5.68::gentoo USE="-debug -doc -test" 52 KiB
[ebuild N ] kde-frameworks/kwidgetsaddons-5.68.0:5/5.68::gentoo USE="nls -debug -designer -doc -test" 2,150 KiB
[ebuild N ] kde-frameworks/kwindowsystem-5.68.0:5/5.68::gentoo USE="X nls -debug -doc -test" 172 KiB
[ebuild N ] dev-qt/qtdeclarative-5.14.1-r1:5/5.14::gentoo USE="jit widgets -debug (-gles2) -localstorage -test -vulkan" 20,801 KiB
[ebuild N ] kde-frameworks/kitemviews-5.68.0:5/5.68::gentoo USE="nls -debug -designer -doc -test" 75 KiB
[ebuild N ] kde-frameworks/sonnet-5.68.0:5/5.68::gentoo USE="hunspell nls -aspell -debug -designer -doc -test" 284 KiB
[ebuild N ] dev-libs/libdbusmenu-qt-0.9.3_pre20160218-r3::gentoo 46 KiB
[ebuild N ] kde-frameworks/ki18n-5.68.0:5/5.68::gentoo USE="-debug -doc -test" PYTHON_SINGLE_TARGET="python3_6 -python3_7 -python3_8" 576 KiB
[ebuild N ] kde-frameworks/kcrash-5.68.0:5/5.68::gentoo USE="nls -debug -doc -test" 23 KiB
[ebuild N ] kde-frameworks/kcompletion-5.68.0:5/5.68::gentoo USE="nls -debug -designer -doc -test" 118 KiB
[ebuild N ] kde-frameworks/kjobwidgets-5.68.0:5/5.68::gentoo USE="X nls -debug -doc -test" 87 KiB
[ebuild N ] kde-frameworks/kdoctools-5.68.0:5/5.68::gentoo USE="nls -debug -test" 417 KiB
[ebuild N ] kde-frameworks/kglobalaccel-5.68.0:5/5.68::gentoo USE="nls -debug -doc -test" 83 KiB
[ebuild N ] kde-frameworks/kservice-5.68.0:5/5.68::gentoo USE="man -debug -doc -test" 253 KiB
[ebuild N ] kde-frameworks/knotifications-5.68.0:5/5.68::gentoo USE="X dbus nls -debug -doc -phonon -speech" 115 KiB
[ebuild N ] sys-auth/polkit-qt-0.113.0::gentoo USE="-debug" 64 KiB
[ebuild N ] kde-frameworks/solid-5.68.0:5/5.68::gentoo USE="nls -debug -doc -test" 260 KiB
[ebuild N ] kde-frameworks/kauth-5.68.0:5/5.68::gentoo USE="nls policykit -debug -doc -test" 85 KiB
[ebuild N ] kde-frameworks/kconfigwidgets-5.68.0:5/5.68::gentoo USE="man -debug -designer -doc -test" 373 KiB
[ebuild N ] kde-frameworks/kiconthemes-5.68.0:5/5.68::gentoo USE="-debug -designer -doc -test" 206 KiB
[ebuild N ] kde-plasma/polkit-kde-agent-5.18.3:5::gentoo USE="-debug" 44 KiB
[ebuild N ] kde-frameworks/kxmlgui-5.68.0:5/5.68::gentoo USE="-debug -designer -doc -test" 838 KiB
[ebuild N ] kde-frameworks/ktextwidgets-5.68.0:5/5.68::gentoo USE="-debug -designer -doc -speech -test" 304 KiB
[ebuild N ] kde-frameworks/kwallet-5.68.0:5/5.68::gentoo USE="man -debug -doc -gpg -test" 290 KiB
[ebuild N ] kde-frameworks/kbookmarks-5.68.0:5/5.68::gentoo USE="nls -debug -doc -test" 118 KiB
[ebuild N ] kde-frameworks/kio-5.68.0:5/5.68::gentoo USE="X acl handbook kwallet -debug -designer -doc -kerberos -test" 3,144 KiB
[ebuild N ] kde-frameworks/kinit-5.68.0:5/5.68::gentoo USE="X caps man -debug" 117 KiB
[ebuild N ] kde-frameworks/kded-5.68.0:5/5.68::gentoo USE="man -debug" 38 KiB
[ebuild R ] app-office/libreoffice-6.4.2.2::gentoo USE="cups dbus kde* mariadb pdfimport -accessibility -bluetooth -branding -coinmp -debug -eds -firebird -googledrive -gstreamer -gtk -java -ldap -odk -postgres -test" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_6 -python3_7 -python3_8" 0 KiB
|
I guess that I should give it a go and possibly then think about migrating to things like pcmanfm-qt as well. I already use the qt5 frontend for VirtualBox, so my system isn't as lean as it should be anyway.
Worth a shot, so I'm giving it a go now. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Wed Apr 01, 2020 1:59 am Post subject: |
|
|
Well, the lag isn't there when I compile LibreOffice with USE="kde", but then again, I don't see any difference in how it looks either. Unless I'm mistaken, it visually looks exactly the same as when I compile it with neither "kde" nor "gtk" set. In which case, I'd rather not have the dependencies. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Wed Apr 01, 2020 8:54 am Post subject: |
|
|
If it doesn't look different, then LibreOffice still decides to start with the barebones VCL (but you can switch that per some env var) because it does not recognise your desktop environment as anything to make a better decision itself. |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Wed Apr 01, 2020 3:28 pm Post subject: |
|
|
Thanks for the suggestion. Since I only use a WM (Openbox) and not a full DE, that's probably the underlying cause. For me, I'll just deal with it looking the way it does without the GTK or QT interface. I value function over form, so if it works, that's more important to me than it being pretty. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
|