OpenGL not working in LibreOffice? (scrolling laggy)

Hi,

My Leap 42.1 system is up to date and I also double checked to make sure everything is ok with graphics driver and hardware acceleration. However today I noticed that scrolling in a Calc sheet is quite laggy. I went to Tools > Options > View and I see that hardware acceleration is turned on but I also see “Current GL status: Disabled”. I turned on Use OpenGL rendering and even Force OpenGL even if blacklisted and restarted Calc. Unfortunately that changed nothing - scrolling and switching sheets still feels laggy and I still see “Current GL status: Disabled” (screenshot). I tried turning off OpenCL and restarted again - nothing changed except the text in the about screen (from Calc: CL to Calc: single), the lag is still there.

I don’t think I have ever experienced such slowness. The interesting thing is that the lag happens only when there is visible data in the cells of the viewport. If I scroll in an area where the cells are empty or in a new blank sheet - there is no lag. It happens with any Calc sheet.

Can I assume there might be something wrong with the package/compilation, i.e. report it to bugzilla.opensuse.org? Or is there something else that I need to do in order not to have this lag?


grep VGA /proc/pci || lspci | grep VGA | colrm 1 4 ; egrep "model name|MHz" /proc/cpuinfo ; xdpyinfo | egrep "version:|dimensions|depth of" ; glxinfo | egrep -A2 "direct rendering|OpenGL vendor" ; uname -sr ; __GL_SYNC_TO_VBLANK=0 glxgears & sleep 30 ; killall glxgears
grep: /proc/pci: No such file or directory
lspci: command not found
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1646.476
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1634.921
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1660.687
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1895.898
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1602.250
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1608.625
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1651.125
model name      : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
cpu MHz         : 1866.414
X.Org version: 1.17.2
  dimensions:    3760x1600 pixels (884x380 millimeters)
  depth of root window:    24 planes
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
--
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 680/PCIe/SSE2
OpenGL core profile version string: 4.4.0 NVIDIA 367.57
Linux 4.1.31-30-default
[1] 6362
70033 frames in 5.0 seconds = 14006.522 FPS
75430 frames in 5.0 seconds = 15085.994 FPS
76170 frames in 5.0 seconds = 15233.985 FPS
81589 frames in 5.0 seconds = 16317.669 FPS
88089 frames in 5.0 seconds = 17617.629 FPS


https://snag.gy/C3zUPf.jpg

My LibreOffice “golden rules”:

  1. Make sure that, LibreOffice has found and, is using, the latest installed Java – the latest LibreOffice versions run happily with OpenJDK.
  2. Make sure that, enough Graphics memory has been reserved for LibreOffice – the default values tend to be way too small for systems with modern Graphic cards (dmesg this machine is reporting: “radeon: 2048M of VRAM memory ready”) – I currently set-up LibreOffice to use 512 MB and 4 MB per object and 128 objects.

in my libreoffice calc the scrolling is faster (too) than for example browser, and I would like to be slower.
I already applied the “golden rules”

I mentioned that my system is up to date. I run ‘zypper up’ every day.
But for the sake of this discussion I checked:


rpm -q java-1_7_0-openjdk
java-1_7_0-openjdk-1.7.0.111-34.1.x86_64
rpm -q java-1_8_0-openjdk
java-1_8_0-openjdk-1.8.0.101-15.1.x86_64

Is that what I need?

  1. Make sure that, enough Graphics memory has been reserved for LibreOffice – the default values tend to be way too small for systems with modern Graphic cards (dmesg this machine is reporting: “radeon: 2048M of VRAM memory ready”) – I currently set-up LibreOffice to use 512 MB and 4 MB per object and 128 objects.

I checked the docs here:

https://help.libreoffice.org/Common/Memory

and used the same settings as you: 512, 4, 128. No change - still laggy.

Also I still don’t understand OpenGL cannot be activated.

Any other ideas?

The Java Runtime Environment (JRE) to be used is selected in the following LiberOffice Set-up: “Tools - Options - LibreOffice - Advanced”.

OpenGL – the only set-up that I know of is in KDE – there’s an advanced setting which chooses the OpenGL which the compositing shall use. If that’s OK then, OpenGL should be available for anything else which is using X11.
Check ‘/var/log/Xorg.0.log’ for at least one entry with respect to OpenGL:


    15.825] (II) Loading sub module "glamoregl"
    15.825] (II) LoadModule: "glamoregl"
    15.825] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
    15.829] (II) Module glamoregl: vendor="X.Org Foundation"
    15.829]    compiled for 1.16.1, module version = 1.0.0
    15.829]    ABI class: X.Org ANSI C Emulation, version 0.4
    15.829] (II) glamor: **OpenGL** accelerated X.org driver based.
    15.884] (II) glamor: EGL version 1.4 (DRI2):
    15.898] (II) RADEON(0): glamor detected, initialising EGL layer.

It is:
https://snag.gy/Vp3dlb.jpg

OpenGL – the only set-up that I know of is in KDE – there’s an advanced setting which chooses the OpenGL which the compositing shall use. If that’s OK then, OpenGL should be available for anything else which is using X11.
Check ‘/var/log/Xorg.0.log’ for at least one entry with respect to OpenGL:

15.825] (II) Loading sub module "glamoregl"
15.825] (II) LoadModule: "glamoregl"
15.825] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
15.829] (II) Module glamoregl: vendor="X.Org Foundation"
15.829]    compiled for 1.16.1, module version = 1.0.0
15.829]    ABI class: X.Org ANSI C Emulation, version 0.4
15.829] (II) glamor: **OpenGL** accelerated X.org driver based.
15.884] (II) glamor: EGL version 1.4 (DRI2):
15.898] (II) RADEON(0): glamor detected, initialising EGL layer.

‘grep -i “opengl” /var/log/Xorg.0.log’ shows nothing here. I am using Plasma.

What does this whole thing mean? What is the reason for the laggy scroll?

It seems that, despite the NVIDIA card supporting GLX and OpenGL, those capabilities are not being recognised by X11.
[HR][/HR]I’m an AMD purist – maybe one of the folks with NVIDIA experience can jump in here to help further.
[HR][/HR]I’ve also taken a look at your original CLI string – it’s “interesting” . . . :expressionless:
FYI, on this 13.2 machine some of the things mentioned at the very beginning are as follows:


 # lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland PRO [Radeon R7 240]
 # 

 > grep -E 'model name|MHz' /proc/cpuinfo
model name      : AMD FX(tm)-4100 Quad-Core Processor
cpu MHz         : 1400.000
model name      : AMD FX(tm)-4100 Quad-Core Processor
cpu MHz         : 1400.000
model name      : AMD FX(tm)-4100 Quad-Core Processor
cpu MHz         : 1400.000
model name      : AMD FX(tm)-4100 Quad-Core Processor
cpu MHz         : 3600.000
 > 
 > xdpyinfo | grep -E 'version:|dimensions|depth of'
X.Org version: 1.16.1
  dimensions:    1920x1080 pixels (508x285 millimeters)
  depth of root window:    24 planes
 > 
 > glxinfo | grep -EA2 'direct rendering|OpenGL vendor'
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
--
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD OLAND
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.7
 > 

I may drop something into this thread from my 42.1 machine later.

But what has that to do with LibreOffice? Considering the glxgears test works fine at high FPS rate - what do you mean it is not recognized? And in the end: why should a simple not so graphics demanding software like Calc lag at mere scrolling?

I hope you can shed some light.

Now on my Leap 42.1 system – AMD Dual Graphics:


 # lspci | grep -iE 'VGA|Radeon|ATI'
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G]
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Trinity HDMI Audio Controller
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun PRO [Radeon HD 8570A/8570M] (rev ff)
 # 

 > grep -E 'model name|MHz' /proc/cpuinfo
model name      : AMD A10-5750M APU with Radeon(tm) HD Graphics
cpu MHz         : 1400.000
model name      : AMD A10-5750M APU with Radeon(tm) HD Graphics  
cpu MHz         : 1400.000
model name      : AMD A10-5750M APU with Radeon(tm) HD Graphics  
cpu MHz         : 1400.000
model name      : AMD A10-5750M APU with Radeon(tm) HD Graphics  
cpu MHz         : 1400.000
 > 
 > xdpyinfo | grep -E 'version:|dimensions|depth of'
X.Org version: 1.17.2
  dimensions:    1366x768 pixels (361x203 millimeters)
  depth of root window:    24 planes
 > 
 > glxinfo | grep -EA2 'direct rendering|OpenGL vendor'
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
--
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD ARUBA (DRM 2.42.0, LLVM 3.7.0)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.8
 > 

‘/var/log/Xorg.0.log’ is showing that, X11 has picked up OpenGL:


    19.106] (II) Loading sub module "glamoregl"
    19.106] (II) LoadModule: "glamoregl"
    19.106] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
    19.114] (II) Module glamoregl: vendor="X.Org Foundation"
    19.114]    compiled for 1.17.2, module version = 1.0.0
    19.114]    ABI class: X.Org ANSI C Emulation, version 0.4
    19.114] (II) glamor: **OpenGL** accelerated X.org driver based.
    19.576] (II) glamor: EGL version 1.4 (DRI2):
    19.746] (II) RADEON(G0): glamor detected, initialising EGL layer.

LibreOffice as follows:


 > zypper info libreoffice
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...


Informationen zu package libreoffice:
-------------------------------------
Repository: openSUSE-Leap-42.1-Update
Name: libreoffice
Version: 5.1.5.2-11.1
Architektur: x86_64
Hersteller:openSUSE
Installiert: Ja
Status: aktuell
Installationsgröße: 210,3 MiB
Zusammenfassung:A Free Office Suite (Framework)
Beschreibung: 
  LibreOffice is a comprehensive office package featuring a word
  processor, a spreadsheet, a presentation program, and much more. This
  package provides only the basic framework. You have to install the
  additional modules to get the required functionality, see packages:
  
  - libreoffice-base
  - libreoffice-calc
  - libreoffice-draw
  - libreoffice-impress
  - libreoffice-math
  - libreoffice-writer
  
  Some optional features are provided by extra packages, for example:
  
  - libreoffice-mailmerge
  - libreoffice-filters
  - libreoffice-kde4
  - libreoffice-gnome
  
  Non-English localizations are provided by extra packages as well, for
  example:
  
  - libreoffice-l10n-de
  - libreoffice-l10n-fr
  - libreoffice-l10n-it
 > 

Within the LibreOffice, Dialog: Tools ▸ Options ▸ LibreOffice ▸ View: Current GL Status is “disabled”.
Enabling “Force OpenGL” didn’t help either.
<https://wiki.documentfoundation.org/ReleaseNotes/5.1#GUI>
[HR][/HR]Having searched a little bit, I’ve given up and, disabled the LibreOffice OpenGL.
[HR][/HR]Biggest surprise, it doesn’t have any effect on the LiberOffice behaviour – a spreadsheet file with tabs of 2107 lines, 829 lines, 3083 lines and 204 lines has, within each tab, absolutely no scrolling issues, regardless of whether OpenGL has been enabled in the “settings → View” or not.
[HR][/HR]Possibly a YANI – “Yet Another NVIDIA Issue” . . .

Sorry but I don’t see how this can be an NVIDIA issue or a driver issue at all. I am saying this because other programs obviously don’t have a problem - glxgears, also tested blender.

The very fact that OpenGL cannot be enabled even through the forcing option tells me there might be something wrong with the compilation of the package (e.g. a particular config option). Or a bug in the program itself.

I will report it to bugzilla and lets see what the expert will say.

Despite my KDE Plasma 5 preference, I installed the LibreOffice “GNOME” and “Gtk3” extensions on my Leap 42.1 machine – also no change in the issue being reported here.

  • On a 13.2 machine (KDE4 Plasma), installing the “GNOME” and “Gtk3” LibreOffice extensions, also installed the i-Bus and changed the LibreOffice appearance – also no visible “OpenGL” versus “no OpenGL” differences (LibreOffice 5.0.6.3-31.3).

I filed a bug report:

https://bugzilla.suse.com/show_bug.cgi?id=1005336

AFAICS you haven’t done one thing, i.e. exlude some configuration fault: what happens if you create a new user, login as that new user? Does the problem exist for the new user?

If I read correctly it does exist for the others who posted in this thread. OpenGL simply cannot be turned on.

Hi, I’m concerned about this LO 5.1.5 update too, there is more than meets the eye apparently and I’m not going to use it for work until I fully understand what’s going on.
The bugs affecting fast scrolling and viewing artifacts apparently hide in libreoffice-gtk3; I uninstalled it, IIRC we had similar issues back at 42.1 release time one year ago.
You can even uninstall libreoffice-gnome if you can tolerate the ugly windowish interface you are left with.
With those settings I see no odd behaviour and can enable OpenGL, although it shows grey-on-black dropdown menus with bumblebee-NVIDIA.
With OpenGL enabled on Intel I still see some laggy horizontal scrolling though.
Other than that, I see that OpenCL (that is Calculation with GPU, not graphics) cannot be enabled; it was broken in 5.1.3 anyway, so no big loss.
I unticked Options > OpenCL > Allow use of Software Interpreter (even when OpenCL is not available)
since it showed calculation errors with some routine spreadsheets I’ve been using for years.

Hope this helps.

I confirm unacceptable slowness (and hardly readable Raleigh menus) after update to LibreOffice 5.1.5.2, somehow linked to OpenGL and GTK3.

I use Leap 42.1 with XFCE desktop and Raleigh style. After recently updating to nvidia driver 367.57 and LibreOffice 5.1.5.2 from the official repos, Writer reacted very slowly to both keyboard and mouse input, esp. with large text files. Installing libreoffice-gtk3 remedied this largely, but far from perfectly. In any case, LibreOffice menus (e.g., Writer and Calc), which are black text on light grey background, turn to black on dark blue as soon as the mouse pointer moves across them, with white on dark blue for the single menu line on which the mouse pointer currently is. These colors are unergonomic, the black on dark blue hardly readable. (Firefox 49.0 menus keep working normally with Raleigh.)

The new behavior seems to be connected to a move, by the developers, from GTK2 to GTK3 and from Raleigh to Adwaita as default theme. It does not depend on the user-selected LibreOffice theme; it’s the same with Breeze, Galaxy (my favorite), High Contrast, Oxygen, Sifr, Tango (default), but depends on the user-selected XFCE “desktop appearance” style. When I switch the XFCE style from Raleigh to Adwaita or oxygen-gtk, I get acceptable menu colors (dark text on light background). However, I would prefer Raleigh over Adwaita or oxygen-gtk. (De gustibus non est disputandum.)

After said upgrade, the two “OpenGL” checkboxes under LibreOffice -> Tools -> Options -> LibreOffice -> View -> Graphics Output are missing; under LibreOffice -> Tools -> Options -> LibreOffice -> Advanced -> Expert Configuration, I can see that both (UseOpenGL, ForceOpenGL) are set to “false”. This seems to correspond to entries in /home/<user name>/.config/libreoffice/4-suse/user/registrymodifications.xcu. Is the disappearance of these OpenGL checkboxes now normal?

“glxinfo | grep OpenGL” yields:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 660 Ti/PCIe/SSE2
OpenGL core profile version string: 4.4.0 NVIDIA 367.57
OpenGL core profile shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5.0 NVIDIA 367.57
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 367.57
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

What can I do (short of writing code) to speed up LibreOffice to what I was used to and to make its Raleigh menus usable again?

Drop back to previous version maybe???

Drop back to previous version of LibreOffice? Only as a last resort. Until then, I hope that a better solution might be found. The installation of libreoffice-gtk3 already brought a significant improvement.

I recommend you add to the bug report.

I took a quick look at Leap 42.2 RC1 installed with the GNOME desktop in an Oracle VirtualBox VM (no OpenGL support) – LibreOffice 5.2.2:

  • The OpenGL checkboxes were nowhere to be found.
  • Unfortunately, I didn’t have time to investigate . . .
  • I had the suspicion that, there may be a “GNOME” desktop preferred issue here – possibly also a “missing iBus” issue . . .