Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716712 - app-office/libreoffice-6.4.2.2 No Menu Bar with GTK+2 and GTK+3
Summary: app-office/libreoffice-6.4.2.2 No Menu Bar with GTK+2 and GTK+3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-08 17:12 UTC by LP
Modified: 2023-03-30 09:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Image of missing menu bar (LOgtk.png,15.93 KB, image/png)
2020-04-08 17:12 UTC, LP
Details
Restored menu bar with GEN interface (LOgen.png,16.84 KB, image/png)
2020-04-08 17:14 UTC, LP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LP 2020-04-08 17:12:54 UTC
Created attachment 631402 [details]
Image of missing menu bar

The LibreOffice 6.4.2.2 build does not show a menu bar when using either the GTK+2 or GTK+3 interface.  The menu bar returns with the GEN interface.

LibreOffice allows selection of the interface by using the SAL_USE_VCLPLUGIN.
With SAL_USE_VCLPLUGIN=gtk or SAL_USE_VCLPLUGIN=gtk3 the menu bar is missing.

With SAL_USE_VCLPLUGIN=gen, the menu bar is present.

See image attachments: LOgtk.png, LOgen.png

Furthermore, with either the GTK+2 or GTK+3 interface all keyboard entry is extremely sluggish for any application.  With the GEN interface selected keyboard entry is normal.

Earlier versions of LO (6.3.x) were similarly broken with GTK+3 but not with GTK+2 or GEN.  Now, in version 6.4.x, both GTK+2 and GTK+3 are broken.

The binary distribution from libreoffice.org exhibits the same behavior (on my system).

=======================
emerge --info
=======================

Portage 2.3.96 (python 3.6.10-final-0, default/linux/amd64/17.0/no-multilib, gcc-9.2.0, glibc-2.30-r7, 5.6.2 x86_64)
=================================================================
System uname: Linux-5.6.2-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.7
KiB Mem:    16341808 total,  10459624 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Sat, 04 Apr 2020 12:15:01 +0000
Head commit of repository gentoo: 5abb32ddaa905c666b7f001b398dc22b87e4f167
sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:      5.0_p16::gentoo
dev-java/java-config: 2.2.0-r4::gentoo
dev-lang/perl:        5.30.1::gentoo
dev-lang/python:      2.7.17-r2::gentoo, 3.6.10::gentoo
dev-util/cmake:       3.17.0::gentoo
dev-util/pkgconfig:   0.29.2::gentoo
sys-apps/baselayout:  2.7::gentoo
sys-apps/openrc:      0.42.1::gentoo
sys-apps/sandbox:     2.18::gentoo
sys-devel/autoconf:   2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:   1.9.6-r5::gentoo, 1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:   2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34::gentoo
sys-devel/gcc:        9.2.0-r1::gentoo
sys-devel/gcc-config: 2.2.1::gentoo
sys-devel/libtool:    2.4.6-r6::gentoo
sys-devel/make:       4.3::gentoo
sys-libs/glibc:       2.30-r7::gentoo
Repositories:

gentoo
    location: /tmp/portage
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

local_overlay
    location: /tmp/portage-acc/overlay
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CC="gcc"
CFLAGS="-O2 -pipe -flto=9 -fuse-linker-plugin -fuse-ld=gold -march=native -floop-interchange -floop-strip-mine -floop-block -fno-stack-protector -mindirect-branch=keep -mfunction-return=keep -U_FORTIFY_SOURCE"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /root /usr/etc /usr/libexec/mc /usr/local/etc /usr/share/gnupg/qualified.txt /usr/share/mc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPPFLAGS="-U_FORTIFY_SOURCE"
CXX="g++"
CXXFLAGS="-O2 -pipe -flto=9 -fuse-linker-plugin -fuse-ld=gold -march=native -floop-interchange -floop-strip-mine -floop-block -fno-stack-protector -mindirect-branch=keep -mfunction-return=keep -U_FORTIFY_SOURCE"
DISTDIR="/tmp/portage-acc/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n --changed-deps-report=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -flto=9 -fuse-linker-plugin -fuse-ld=gold -march=native -floop-interchange -floop-strip-mine -floop-block -fno-stack-protector -mindirect-branch=keep -mfunction-return=keep -U_FORTIFY_SOURCE"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc parallel-fetch pid-sandbox protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirrors.rit.edu/gentoo/ http://mirrors.lug.mtu.edu/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -O2 -pipe -flto=9 -fuse-linker-plugin -fuse-ld=gold -march=native -floop-interchange -floop-strip-mine -floop-block -fno-stack-protector -mindirect-branch=keep -mfunction-return=keep -U_FORTIFY_SOURCE"
LINGUAS="en en-US"
MAKEOPTS="-j9"
PKGDIR="/tmp/portage-acc/packages"
PORTAGE_BINHOST=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp/portage-acc/tmp"
USE="X alsa amd64 berkdb blas bzip2 cairo cli css cxx dri exif fftw fontconfig fortran gdbm gif gmp gnutls iconv idn imlib jpeg lame lcms libtirpc motif ncurses nptl opengl openmp pcre png readline seccomp smp sndfile spell split-usr svg tcpd threads tiff truetype unicode vdpau xcb zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="dummy ice1712 intel-hda" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia svga vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 LP 2020-04-08 17:14:03 UTC
Created attachment 631404 [details]
Restored menu bar with GEN interface
Comment 2 LP 2020-04-08 17:15:14 UTC
My system has no desktop environment.  I use the FVWM window manager only.
Comment 3 Andreas Sturmlechner gentoo-dev 2020-04-08 22:42:01 UTC
To be honest, that sounds more like an issue with your desktop environment configuration than anything else.

Especially when it also happens with the binary as distributed(?) by upstream. You don't mean our own app-office/libreoffice-bin by chance?

How are you even testing GTK2? It is already gone from >=6.4 packaging.

Have you tried with a fresh user profile already?

Not sure where sluggish performance could be coming from; you might try to disable OpenGL and check that you have either your user in video group or entered a proper consolekit/elogind/systemd enabled session.
Comment 4 LP 2020-04-09 02:02:39 UTC
(In reply to Andreas Sturmlechner from comment #3)
> To be honest, that sounds more like an issue with your desktop environment
> configuration than anything else.
> 

I have no DE, just X and the FVWM window manager.

There is no problem with anything else on my system,  It is just LO.

My guess is that the culprit is the new VCLPLUGIN of LibreOffice.  Before that
came along everything was fine.  The workaround is to set SAL_USE_VCLPLUGIN=gen,
which uses X libraries instead of GTK3.

> 
> Have you tried with a fresh user profile already?
> 

Yes, I tried with a fresh profile but the same problem occurs.

>
> Not sure where sluggish performance could be coming from; you might try to
> disable OpenGL 
>

The performance is not sluggish.  It's only the keyboard entry that is slow.
For example, if I depress a key in Writer and keep it depressed, the repeat rate is about once per two seconds.  Normally, the repeat rate is several times
per second.

OpenGL is disabled.

The workaround is to set SAL_USE_VCLPLUGIN=gen.  The resulting menu bar
is small but I least I get full functionality.  Hopefully, the LO devs won't deprecate this interface as well.

I will report this upstream as well.  From my searches it doesn't seem to affect too many users, although there are some sproradic reports about the
loss of the menu bar.
Comment 5 LP 2020-04-11 19:08:25 UTC
The problem regarding the lack of menu bar was dbus.  If dbus is not running then there is no menu bar.  If dbus is started then the menu bar is visible and fully functional.

However, even with dbus running, the keyboard input is still extremely slow with any LO application.

Every other function proceeds normally as far as I can tell.  It is only the keyboard input that is extremly sluggish.

So it appears that half of the problem is solved, but with a sluggish keyboard input LO is unusable and I still have to resort to the workaround of SAL_USE_VCLPLUGIN=gen.

Can anyone provide suggestions on how to debug this further?

I tried "strace libreoffice" but the strace output stops after LO is up and running.  There is no strace output when using the keyboard in Writer or Calc.
Comment 6 quilosaq 2020-04-11 23:02:28 UTC
(In reply to LP from comment #5)
> The problem regarding the lack of menu bar was dbus.  If dbus is not running
> then there is no menu bar.  If dbus is started then the menu bar is visible
> and fully functional.
> ...

Are you sure do you have dbus with X use set?
Comment 7 LP 2020-04-11 23:24:47 UTC
(In reply to quilosaq from comment #6)
> 
> Are you sure do you have dbus with X use set?
>

The USE flags for dbus are:

USE="X -debug -doc -elogind (-selinux) -static-libs -systemd -test -user-session"

Libreoffice has USE='-dbus' but since the binary from libreoffice.org behaves the same way it probably doesn't make a difference.
Comment 8 quilosaq 2020-04-12 08:41:59 UTC
(In reply to LP from comment #7)

Please try build dbus with X use flag.
Comment 9 quilosaq 2020-04-12 08:52:34 UTC
(In reply to LP from comment #7)


I am sorry. I misread the text. I forgot my comment #8
Comment 10 LP 2020-04-12 15:16:01 UTC
There is another twist to this problem.

I notice that the slow keyboard input seems to apply only to text areas of an application.

For example, on menu dialogs, such as "Save As...," keyboard input is normal.

Also, when using the arrow keys in Calc to move across cell ranges, the keyboard input is normal.  But when I input text into a cell or use the arrow keys within a cell then the keyboard input is very sluggish.

The arrow keys also function normally in dialogs such as "File Open" or "Save As..."

However, in Writer, the arrow keys become very sluggish because the cursor is being moved across regions of rendered text.

Based on this behavior, I would guess that the problem is one of font rendering or something related to font rendering.
Comment 11 Michael Hofmann 2020-05-10 13:22:19 UTC
Emerging dbus with USE flag X seems to fix the issue, at least for some users.

See: https://forums.gentoo.org/viewtopic-p-8455688.html#8455688
Comment 12 Larry the Git Cow gentoo-dev 2020-05-22 14:09:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd6e654846fa3a26a95497419343a485c3879c33

commit cd6e654846fa3a26a95497419343a485c3879c33
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-05-22 12:36:51 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-05-22 14:09:28 +0000

    app-office/libreoffice: Set IUSE="+dbus", gtk requires sys-apps/dbus[X]
    
    Try to fix 'minimalist WM' corner case.
    
    Closes: https://bugs.gentoo.org/716712
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-office/libreoffice/libreoffice-6.4.9999.ebuild | 5 +++--
 app-office/libreoffice/libreoffice-9999.ebuild     | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Comment 13 LP 2020-05-23 15:08:40 UTC
(In reply to Larry the Git Cow from comment #12)
> The bug has been closed
>

The use of DBUS does resolve the issue of the missing menu bar.

But it does not fix the problem of extremely sluggish keyboard input as mentioned in comments# 4, 5 and 10.

Should this extremely sluggish keyboard input be reported as a separate bug?

For now, I am masking LO >libreoffice-6.3.4.2-r1.

Libreoffice-6.3.4.2-r1, with SAL_USE_VCLPLUGIN=gtk, is the last version of LO that gives me full a menu bar and normal keyboard input.

Libreoffice-6.3.4.2-r1 is the last version that still uses GTK+2.  It is the GTK+3 VCL that causes the sluggish keyboard input problem.
Comment 14 Andreas Sturmlechner gentoo-dev 2020-05-23 15:11:56 UTC
One single problem per bug please.

I'd suggest to try qt5 VCL as well to have another data point, then go upstream to try to diagnose your problem.
Comment 15 Andreas Sturmlechner gentoo-dev 2020-05-23 15:21:11 UTC
ftr, I just emerged fvwm, logged into it from sddm, started libreoffice (built with kde) and everything seems fine.
Comment 16 Am Jam 2020-05-27 14:14:04 UTC
Just confirming that my upgrade to libreoffice-6.4.3.2 generated this bug of the missing menu bar. With prior versions of libreoffice, I got around the bug by prefixing the libreoffice command with SAL_USE_VCLPLUGIN=gtk or SAL_USE_VCLPLUGIN=gen. However, with libreoffice-6.4.3.2, neither worked. I don't use a DE, I just use dwm as my window manager. 

Re-emerging dbus with USE=X helped.


If that doesn't work, I wonder if emerging dev-libs/libdbusmenu with USE=gtk or USE=gtk3 could help. (Note: I don't have this emerged on my system.)
Comment 17 orbea 2023-03-29 14:33:59 UTC
Pretty sure the fix here was never correct. I use a minimalist wm (Spectrwm) and have built libreoffice this way for years without ever missing a menu bar.

See: https://github.com/gentoo/gentoo/pull/30393

Perhaps this is a bug in fvwm?
Comment 18 LAP 2023-03-30 09:19:21 UTC
(In reply to orbea from comment #17)
> Pretty sure the fix here was never correct. I use a minimalist wm (Spectrwm)
> and have built libreoffice this way for years without ever missing a menu
> bar.
> 
> See: https://github.com/gentoo/gentoo/pull/30393
> 
> Perhaps this is a bug in fvwm?
>

It's been a while since this issue was first reported and the dbus requirement has completely fixed it for me.

However, based on your comment I decided to revisit the problem.  I started LO without dbus running and the nenu bar is present and functional.

It seems that between the initial report and now the issue has been resolved possibly in GTK+ or possibly within LO.  But, for me, dbus is no longer required.

It seems that LO has changed a lot.  For one thing the SAL_USE_VCLPLUGIN variable is no longer present.  These changes may have caused the issue to disappear.

It may then be safe to remove the dbus build requirement from LO.