You are not logged in.

#1 2022-01-06 22:58:11

Cvlc
Member
Registered: 2020-03-26
Posts: 273

LibreOffice font rendering problem

Hi !

I'm having problems with the rendering of text in LibreOffice writer, I wonder if is due to my Arch setup of if I should report that upstream. Here are some examples :

Capture-d-cran-de-2022-01-06-22-54-29.png Capture-d-cran-de-2022-01-06-22-56-05.png Capture-d-cran-de-2022-01-06-23-46-42.png Capture-d-cran-de-2022-01-06-23-47-29.png

It happens irrespective of selective font. Any idea where I should look ?

Thanks!

Offline

#2 2022-01-07 08:20:45

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

That's a rendering glitch.
Try to disable HW acceleration, https://wiki.documentfoundation.org/OpenGL

What's the output of "glxinfo -B"?
If you're using xf86-video-intel, try to remove that and use the modesetting driver (make sure no config file directly references the intel driver or X11 won't start "grep -i intel /{etc,usr/share}/X11/xorg.conf*")

Offline

#3 2022-01-07 09:49:34

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Hi, thanks (again) for your help !

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Xe Graphics (TGL GT2) (0x9a49)
    Version: 21.3.3
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.3.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.3.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

The LibreOffice wiki seems out of date, there is no OpenGL setting in Options/View. I tried setting disableOpenGL=true in Options/advanced but the behavior is the same.
I also tried starting in safe-mode, and choosing "reconfigure / Disable Hardware acceleration" but no luck either... !

Probably unrelated but I've also never managed to activate OpenCL on Libreoffice, the checkbox stays unchecked after a restart

 clinfo 
Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL HD Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 3.0 
  Platform Profile                                FULL_PROFILE

...

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.3.1
  ICD loader Profile                              OpenCL 3.0

Offline

#4 2022-01-07 09:56:02

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

seth wrote:

If you're using xf86-video-intel, try to remove that and use the modesetting driver (make sure no config file directly references the intel driver or X11 won't start "grep -i intel /{etc,usr/share}/X11/xorg.conf*")

Offline

#5 2022-01-07 10:25:33

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Sorry, missed that, xf-86-video-intel is not installed, as recommended in the wiki. I am using a Wayland session (nothing in Xorg config files), regarding graphics the following packages are installed :

intel-media-driver
libvdpau-va-gl
intel-compute-runtime
ocl-icd
vulkan-intel

[edit]
also tried

MESA_LOADER_DRIVER_OVERRIDE=i965 libreoffice

with no luck

Last edited by Cvlc (2022-01-07 10:33:29)

Offline

#6 2022-01-07 13:29:09

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

I am using a Wayland sessios

Ok, what if you run an X11 session (eg. openbox)?

Offline

#7 2022-01-07 14:52:30

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Tried with https://wiki.archlinux.org/title/GNOME/ … E_sessions but got an error, I have to leave it as it is for a couple of days unfortunately but I'll report back once I can try a little more.

Thanks

Offline

#8 2022-01-13 10:49:24

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Hi,

I couldn't get the openbox session to work, but I tried it with Gnome on xorg, and the issue is still there. I'd say it's a little better but impossible to verify as it's difficult to quantify...

Offline

#9 2022-01-13 14:23:32

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

I couldn't get the openbox session to work

Why and how?
It would certainly be nice to not have the same mutter compositor in the output path…
Are you logging in w/ GDM?
Maybe try https://wiki.archlinux.org/title/GDM#Use_Xorg_backend

Offline

#10 2022-01-13 16:23:20

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

I installed openbox and tint 2 and followed https://wiki.archlinux.org/title/GNOME/ … E_sessions

GDM throws an error and refuses to log into the openbox session.

Not sure I understand the end of your post, I don't want to use Xorg by default. I can log into a Xorg session with GDM, and it doesn't solve my rendering glitch.

Offline

#11 2022-01-13 16:28:49

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

You don't need a custom gnome session nor tint.
Just install openbox and launch an openbox session and run libreoffice from an xterm or so (openbox has context menus on the root window, ie. l/rmb click the "desktop")

The link at the end tells you how to run GDM on xorg to get  rid of the (second) wayland display server and GL context.
The point here is to test whether this is a problem w/ the display server/compositor or the client - not to have you run openbox on X11 for the rest of your life.

Offline

#12 2022-01-13 17:13:34

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

I'm not familiar with any of this so it's quite a learning curve. I've never used Xorg and all the commands and wiki pages relating to this stuff are new to me.

I installed openbox and xinit. Then I ran startx from a new tty, ran openbox which displayed windows and a right click menu. Thereafter, tried to run libreoffice and libreoffice <document> but that does not display anything at all, apart from the first lines of warning that there is no java environment.

[Edit]

Got it, testing right now and will report back in a minute

Last edited by Cvlc (2022-01-13 17:17:20)

Offline

#13 2022-01-13 17:17:35

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

You don't need xinit nor to enter any commands.
Openbox comes w/ a session file and you should™ be able to select that session in GDM. That's all.

Offline

#14 2022-01-13 17:28:42

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Yeah thanks figured it out, I had given up on launching the openbox session from GDM as that always failed, but using WaylandEnable=false made it work.
Well, final result, glitch is still there in the openbox session. It's easier to reproduce with some documents than others though, so maybe it does depend on fonts.
What I noticed is that when selecting text, the selected text moves up a little (only the selected text, not the whole line), and stays there when deselected. Sometimes, that produces the glitch above, on the line of the selected text or a line close to it. Other times it doesn't.

[edit]

Further testing produces another glitch, sometimes selected text appears to stay selected even when deselected, or even when something else is selected, resulting in multiple false selections appearing on screen

Last edited by Cvlc (2022-01-13 17:34:25)

Offline

#15 2022-01-13 22:04:42

seth
Member
Registered: 2012-09-03
Posts: 49,981

Offline

#16 2022-01-14 00:12:05

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

xf86-video-intel is not installed on my system, but the above link seems to reference it. Should I install it ?

Offline

#17 2022-01-14 03:44:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: LibreOffice font rendering problem

No, there's a second part to the link referring to the modesetting driver

Offline

#18 2022-01-14 20:00:46

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Hi,
I can also reproduce it by running LIBGL_DRI3_DISABLE=1 libreoffice
It seems to be easier to reproduce at higher zoom levels.

Offline

#19 2022-01-16 17:41:39

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Is this a dead end then ? Should I report it upstream ?

I have another graphics problem with Stellarium (flickering) but this is "solved" with MESA_LOADER_DRIVER_OVERRIDE=i965, so I don't think it's related

Offline

#20 2022-01-17 15:12:01

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

so maybe it does depend on fonts.
What I noticed is that when selecting text, the selected text moves up a little (only the selected text, not the whole line), and stays there when deselected.

Maybe we should redirect our attention here. Notably: what fonts trigger this (and which don't)?
My impression over several threads was that the liberation family has garbage in their extents (could be wrong though) and while adobe gets a lot of stuff badly wrong, I'll claim that they're still pretty good at fonts (so try the adobe source family and also the defacto standard dejavu)

Offline

#21 2022-01-17 16:48:09

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Ok I'll try that, but from my previous tests it really happened with all fonts that I tried.

Thanks for taking the time.

Offline

#22 2022-01-17 18:36:41

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Installed ttf-dejavu, same behavior, reproduced in only a few seconds.

I've created a new user, and tried it from there, and it's much harder to reproduce, although I can still see that selected text "moves" when selected, I can't really get the full glitch like above and it's the same. Could it be something like an environment variable or user setting that could mess something up ?

$ cat .config/environment.d/01_env.conf 
MOZ_ENABLE_WAYLAND=1
MOZ_DBUS_REMOTE=1
VDPAU_DRIVER=va_gl
LIBVA_DRIVER_NAME=iHD
VISUAL=rnano
EDITOR=rnano

What else can I look at ? I've tried going over the full Intel graphics article to see if there's anything I could have tweaked but can't find anything.

[edit]
also tried the lts kernel, but it recently changed to 5.15 so it's not so different. No luck, same glitch.

Last edited by Cvlc (2022-01-17 18:47:32)

Offline

#23 2022-01-17 22:16:44

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

You could try a different platform theme, https://wiki.archlinux.org/title/LibreOffice#Theme
But I also start to run out of ideas…

Offline

#24 2022-01-17 23:54:42

Cvlc
Member
Registered: 2020-03-26
Posts: 273

Re: LibreOffice font rendering problem

Ahah ! interesting

with SAL_USE_VCLPLUGIN=gen There is no glitch
both SAL_USE_VCLPLUGIN=gtk3 and SAL_USE_VCLPLUGIN=kf5

SAL_USE_VCLPLUGIN=gen is the only one which seems to be using Xorg instead of Wayland (checked with xeyes)

[edit]
Checked the Gnome Xorg session again, and the glitch is there and LO is using Xorg.

[edit]
disregard... It finally happened with the VCLPLUGIN=gen as well... It's really hard to trigger, so it somehow must make a difference. But still there.

Last edited by Cvlc (2022-01-18 00:07:02)

Offline

#25 2022-01-18 09:15:11

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: LibreOffice font rendering problem

The difference is probably just the indirection of xwayland, is it easier to trigger w/ SAL_USE_VCLPLUGIN=gen on gnome/xorg?

Offline

Board footer

Powered by FluxBB