100% cpu with every scroll in LibreOffice

Internal full HD display here, also got only slightly better.

There is a (temporary) fix: use “SAL_USE_VCLPLUGIN=gen libreoffice” to start libreoffice (make sure that no other libreoffice-process is already running). Then, libreoffice looks ugly but works without increased cpu usage of xorg.

To add more information: I do have the exact same problem in Debian 11 (Libreoffice 7.1.x) as well as Fedora 34 (Libreoffice 7.2.x): xorg cpu usage goes up to 100% if any action is done within libreoffice in Qubes 4.1.

Special case: open an empty libreoffice-calc document. Select any empty cell: everything runs smooth. Input a simple formula (i.e. “=1+2”) in a cell. Selecting this very cell has a lag and 100% cpu usage in the xorg process do occur.

This behaviour started some weeks ago and was not the case about 2 months ago, even in qubes 4.1. So some update has to be the culprit. Unfortunately, I do not have any good solution other than setting the ugly generic VCLPLUGIN.

3 Likes

Looks like it worked!
So it set an environment variable to the value “gen libreoffice”?.. Just curious what it does.

It runs libreoffice with the SAL_USE_VCLPLUGIN environment variable set to value gen. Apparently this tells the libreoffice Visual Class Library to select a plugin named gen (as opposed to, say, gtk3 or qt5). It is likely that the Gtk plugin wants to use OpenGL, which ends up being software-rendered.

I thought maybe instead of switching off Gtk we can disable the attempt to use OpenGL, eg. with GDK_DEBUG=nogl instead. But a quick test (20 pages of lorem ipsum) does not show any difference in a Debian 10 qube (even with SAL_USE_VCLPLUGIN=gen)

1 Like

Sorry to horn in but, have you checked into this libreoffice variable then (SAL_NOOPENGL)? Just to see what it changes. I see that this was used by the previous incarnation of libreoffice (openoffice) but perhaps it didn’t make the cut when they switched names.

https://wiki.openoffice.org/wiki/Environment_Variables

1 Like

Yep, unfortunately “GDK_DEBUG=nogl” does not help. Disabling hardware-acceleration and/or anti-aliasing in the options menus does not help either like SAL_NOOPENGL. The only fix seems to be “SAL_USE_VCLPLUGIN=gen”

FYI: if you uninstall the package “libreoffice-gtk3” in your template VM, you basically have the same effect as “SAL_USE_VCLPLUGIN=gen libreoffice” in every AppVM.