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.
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)
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.
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.
This works great when launching libreoffice from terminal / launcher, however when opening a file directly within nautilus, that env is never picked up and you get the “basic” UI. I’ve tried setting that env in many places that could be read, but so far I didn’t find any file located outside $HOME (so all appvms based on this template get to work without further changes) that could make it work.
Only workaround I found is to place the env directly at libreoffice executable, with the downside that once the file is replaced due to an update you’d need to change it again, but so far is the only one to make it work in all places (terminal/launcher/nautilus)
/usr/bin/soffice
put the export just before the last exec line
export SAL_USE_VCLPLUGIN=kf5
# oosplash does the rest: forcing pages in, javaldx etc. are
exec $RRCHECK $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash" "$@"
Although I would never put it past LibreOffice to be slow, if it’s worse after 4.1 upgrade you might want to make sure you’re not hitting the CPU frequency detection bug (adding xen-acpi-processor kernel module is the remediation if you are).
The variables defined in /etc/environment.d files aren’t visible by Qubes VMs (as verified via both an open terminal and a qvm-run -p). This is despite the fact that systemctl --user show-environmentdoes show the variables as defined. What’s so broken?
I work 3 days per month in LibreOffice Calc. This time was the first time (first day in Calc) on Qubes. It was soo slow. 3 seconds each time I clicked somewhere. I hope this will be addressed and resolved soon by the Qubes team.
Unfortunately the proposed solution is not satisfactory (Qubes 4.1 Fedora 34). I just noticed that there is a new Fedora template (Fedora 35). I am going tol test LibreOffice with Fedora 35 and report back.
Thank you. Just to be sure: Is my assumption correct that you mean downloading and installing the AppImage in the TemplateVM? Only then can I use it permanently in the AppVM from my understanding.
You can download it in any dispvm (if you want to keep your office-vm offline), then move it anywhere persistent in the AppVM, like /home/user or /rw.
If you want, you can move the AppImage to the TemplateVM, but place it in /etc/skel. This way, it’ll be placed in the home directory of every new AppVM created from this template.
Make sure you run chmod +x /PATH/TO/AppImage in order to make it executable. Then you can launch it from terminal or with an app shortcut like a mentioned before.