Fix slow Libreoffice

Since the corresponding information is buried in a couple of long threads, here’s a quick summary of how to make LibreOffice reasonably fast in Qubes. Use it, if you experience high CPU usage when using LibreOffice and/or LibreOffice to be extremely slow, lag when scrolling, etc.

launch LibreOffice like that:
SAL_USE_VCLPLUGIN=gen libreoffice

Furthermore, in LibreOffice, Tools → Options → View

  • Disable hardware acceleration
  • Disable anti-aliasing
  • Enable “Use Skia for all rendering”
  • Enable "Force Skia software rendering”
8 Likes

kf5 works better than gen. The rest doesn’t matter.

At least on my 4.2.4 system.

2 Likes

Never had issues in LibreOffice even on modest old hardware. Will try this if I do though.

1 Like

Also --nologo:

Aliases:

alias libreoffice='SAL_USE_VCLPLUGIN=gen libreoffice --nologo'
alias lo='SAL_USE_VCLPLUGIN=gen libreoffice --nologo'

Is there a way to save these settings somehow in /etc/ so it works for every VM?

1 Like

In Qubes 4.3, with Debian 13 trixie, update template like this:

# Install the LibreOffice Qt6 plugin
sudo apt install libreoffice-qt6

# See the existing Exec commands for LibreOffice XDG Desktop Entries:
grep Exec /usr/share/applications/libreoffice-*desktop

# Update all the LibreOffice XDG Desktop Entries to use Qt6
sudo sed -i 's/Exec=l/Exec=env SAL_USE_VCLPLUGIN=qt6 SAL_VCL_QT6_USE_CAIRO=1 l/g' /usr/share/applications/libreoffice-*desktop

That and disabling the hardware acceleration seems to work. Skia doesn’t appear to exist on GNU/Linux.

2 Likes

Or in Qubes 4.3, with Debian 13 trixie, if you have a lot of KDE packages already, use kf6 instead of qt6:

# Install the LibreOffice kf6 plugin
sudo apt install libreoffice-kf6

# See the existing Exec commands for LibreOffice XDG Desktop Entries:
grep Exec /usr/share/applications/libreoffice-*desktop

# Update all the LibreOffice XDG Desktop Entries to use Qt6
sudo sed -i 's/Exec=l/Exec=env SAL_USE_VCLPLUGIN=kf6 l/g' /usr/share/applications/libreoffice-*desktop

# If you already ran the above Qt6 replace, use this instead to replace with kf6:
# sudo sed -i 's/Exec=env SAL_USE_VCLPLUGIN=qt6 SAL_VCL_QT6_USE_CAIRO=1 l/Exec=env SAL_USE_VCLPLUGIN=kf6 l/g' /usr/share/applications/libreoffice-*desktop
2 Likes

@bagel

You can use a simple conf file instead of modifying package-provided files (that might get overwritten e.g. during update):

# /etc/profile.d/98-libreoffice.sh
export SAL_USE_VCLPLUGIN=kf6
2 Likes

Maybe give ONLYOFFICE a try? I don’t know how it performs on Qubes OS, but (performance aside) I find it way better than Libreoffice. If it also performs better on Qubes OS, that’s a win-win.

1 Like

I gave it a try…
this was a good hint :wink:
I installed it as flatpak from flathub,
and in works out of the box.
Changes Menu to 125% for better readability :wink:

Scrolling, Using Page Up and Page down, with no stutter, changeing the fields in a table works smooth.

Not compareable to Libreoffice, way better.
I never got Libreoffice running so smooth and responsible.
@solene Thanks for this hint.

Will use it for the next weeks. And will also check the “network communication” of the app

2 Likes