I have been struggling with an irritating issue with LibreOffice in relation to how the suite of applications handle fractional scaling. The widgets in LibreOffice would have comically oversided UI elements (toolbars, icons) on some displays but only if that display was scaled at 100% or less.

For months, (on and off), I would search for a fix for this and the short term fix was to have Fractional scaling of anything greater than 100% on the displays. So, for some time, I would have 105% scaling on displays even when I didn’t want it scaled up. This worked and I was satisfied for quite a while, maybe over a year but when I purchased some new, larger, higher resolution, monitors, I was again annoyed by this and spent some time searching, once again for a solution to this scaling issue. I just don’t like using any of the other office applications on Linux as much as LibreOffice, truly, I tried… them all… even that one from Microsoft…
The Fix
I was reading through this bug report and the solution was about midway through and it is a simple fix. I should say that this is the fix for now as I know things are getting better with Wayland and although XWayland is a temporary fix, this should be considered a temporary fix too.
Setting the environment variable before running LibreOffice has made all the scaling troubles go away.
QT_QPA_PLATFORM=xcb
To use this with LibreOffice Calc, lets say for testing, this is how you would run it in the terminal:
QT_QPA_PLATFORM=xcb libreoffice --calc
Since this worked fantastically well, it was time to adjust all the menu entries on my system to enforce the “xcb” environment variable. On KDE Plasma, I opened up the KDE Menu Editor. The easiest way is to right-click on the Menu and select “Edit Applications”

In the KDE Menu Editor, filter down “libreoffice” and add QT_QPA_PLATFORM=xcb to the “Environment variables” box:

I added it to all the LibreOffice entries as I use just about everything in the LibreOffice suite of tools. Once that is done, whenever you launch LibreOffice, it will enforce the use of Xwayland which fixes all the scaling issues and as a bonus benefit, the lagging of scrolling through documents, spreadsheets and presentations is now completely gone. The LibreOffice experience is once again, top notch as it all scrolls as smooth as butter!
What QT_QPA_PLATFORM=xcb does is control the platform abstraction (QPA) backend that Qt applications use to render and interact with the system’s display server. Since I am using Wayland, designed for modern general purpose, desktop computing that is more secure and efficeint than X11 with better HiDPI support (in theory) and not all applications fully support it, there are some pains here and there.
XCB is the legacy X11 backend which is a lower-level interface to X11. It is more modern than Xlib but iss still part of the X11 ecosystem. By setting QT_QPA_PLATFORM=xcb, you are forcing LibreOffice to use the X11/XCB backend instead of Wayland, even though it is a Wayland session. KDE Plasma 6.3 supports this through XWayland, a compatibility layer that allows X11 applications to run on Wayland by providing an X11 server within the Wayland environment.
Why This Works
Wayland’s native HiDPI support is designed to handle fractional scaling better than X11, but it’s still maturing. In KDE Plasma 6.3, fractional scaling can lead to rendering inconsistencies, especially with applications that don’t fully support Wayland’s scaling model. LibreOffice, when using the Qt/KDE VCL plugin (SAL_USE_VCLPLUGIN=qt5), relies on Qt to render its UI. On Wayland, Qt’s scaling implementation might misinterpret the fractional scaling factor, leading to oversized UI elements monitors at 100%. This is likely due to a bug or mismatch between Qt’s Wayland backend and KDE’s scaling implementation.
When you set QT_QPA_PLATFORM=xcb, LibreOffice switches to the XCB backend, rendering through XWayland instead of Wayland directly. It applies the system scaling factor more consistently across applications, as X11 historically relies on the X server to manage scaling. KDE’s XWayland integration in Plasma 6.3 is mature, ensuring that HiDPI scaling is applied uniformly, fixing the oversized UI issue in LibreOffice.
Performance Boost
This is only a guess as to why there is a boost but Wayland’s rendering pipeline, while efficient for many use cases, can introduce lag in some applications with fractional scaling. This is often due to how Wayland handles buffer swaps and scaling transformations, especially on high-DPI displays. LibreOffice, being a complex application with lots of UI elements, might trigger excessive redraws or buffer copies when scaled fractionally on Wayland, leading to noticeable lag.
XWayland, despite being a compatibility layer, often provides smoother performance for some applications. X11’s rendering model is more predictable for fractional scaling, as it doesn’t involve Wayland’s compositor-specific optimizations (which can sometimes misfire).
By forcing LibreOffice to use XCB, you’re bypassing Wayland’s rendering pipeline, letting XWayland handle the display output which reduces the overhead of Wayland’s scaling and buffer management, eliminating the lag and smoothing out the user experience.
Final Thoughts
This was an annoying, lingering problem I have been having with LibreOffice and I finally got it figured out. So, now that it is working perfectly, I am back on the LibreOffice-is-the-best-office-suite bandwagon again! Truly, it is a great application suite but this Wayland transition was a bit troublesome.
Office toilings are once again perfect! My Linux desktop workflow is closer to perfection. Yes, this is an annoying problem and could be viewed as a strike against the Linux Desktop Experience but standing back, just a few steps, looking at the pain of Linux vs the pain of Windows or Mac and still, Linux is far less painful.
I am actually surprised that XWayland offers some efficiencies for LibreOffice. That was not something I was expecting but here we are and I am happy with this solution. I am not sure what the solution should be for users using Wayland. I think Fedora has it right by dumping X11 and removing that variable but I am still using X11 on some systems as the performance on some older machines are just better with X11 at this time.
Wayland is so close… so close… But that is the fun of Linux, understanding how your system works and tweaking it for better performance or your own unique situation. I realize that my situation is likely an edge case so for those three other people using displays as I am, here you are!
References
https://bugs.documentfoundation.org/show_bug.cgi?id=141578
https://www.libreoffice.org/
https://get.opensuse.org
https://kde.org/plasma-desktop/
https://wayland.freedesktop.org/

Leave a Reply