Bug 143206 - Libreoffice on plasma works really bad
Summary: Libreoffice on plasma works really bad
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 142943 (view as bug list)
Depends on:
Blocks: Wayland KDE, KF5
  Show dependency treegraph
 
Reported: 2021-07-05 16:17 UTC by giors_00
Modified: 2021-09-09 07:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description giors_00 2021-07-05 16:17:06 UTC
Description:
I am noticing multiple fails of libreoffice working on kde-plasma. It must be a sort of qt5 bad interaction issue, since, when I start libreffice with gtk3 VCLPLUGIN, all works perfect except that I have neither globalmenu nor libreoffice menu (and, sometimes I need it).

That said, I try to list several errors I noticed when running libreoffice with qt5 (or kde5) VCLPLUGIN

1: mouse double click not selecting text
2. Impossible to change the text style using right style menu (does nothing). 
3. frequently freeze (randomly and for a couple of secs.)
5. error in formatting documents (in a long text doc I am writing, some part of the text, sometimes, simply disappear (restart libreoffice solves the problem)
6. in writer, problem in following footnotes links (clicking on the footnote number in the text does something strange..). 

Sorry for not being more specific. Anyway, errors 1. and 2. are quite easy to reproduce and they are always there. More generally speaking, as a simple final user, I have to insist in a very different feeling switching the VLCPLUGIN: gtk3 works great (except for globalmenu which really sucks); kde5 or qt5...not so much.  



Steps to Reproduce:
1.just open libreoffice with qt5 or kde5 VCLPLUGIN in kde/plasma desktop (running on Arch-Linux)
2.
3.

Actual Results:
 mouse double click not selecting text
2. Impossible to change the text style using right style menu (does nothing). 
3. frequently freeze (randomly and for a couple of secs.)
5. error in formatting documents (in a long text doc I am writing, some part of the text, sometimes, simply disappear (restart libreoffice solves the problem)
6. in writer, problem in following footnotes links (clicking on the footnote number in the text does something strange..). 


Expected Results:
with gtk3 VCLPLUGIN all works great except the lack of menu (or globalmenu)


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.12; UI render: default; VCL: kf5
Locale: es-ES (es_ES.UTF-8); UI: es-ES
7.1.4-1
Calc: threaded
Comment 1 Buovjaga 2021-07-05 16:43:01 UTC
(In reply to giors_00 from comment #0)
> 1: mouse double click not selecting text
> 2. Impossible to change the text style using right style menu (does
> nothing). 
> 3. frequently freeze (randomly and for a couple of secs.)
> 5. error in formatting documents (in a long text doc I am writing, some part
> of the text, sometimes, simply disappear (restart libreoffice solves the
> problem)
> 6. in writer, problem in following footnotes links (clicking on the footnote
> number in the text does something strange..). 

I have no such problems with the kf5 backend on Arch Linux and Plasma X11 session. Are you using X11 or Wayland?

Maybe all of these are glitches purely in your system, but in the future, please create one report per issue.

Arch Linux 64-bit
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: kf5
Locale: en-US (C); UI: en-US
7.1.4-1
Calc: threaded
Comment 2 giors_00 2021-07-05 17:13:45 UTC
> 
> I have no such problems with the kf5 backend on Arch Linux and Plasma X11
> session. Are you using X11 or Wayland?

I am on wayland...
> 
> Maybe all of these are glitches purely in your system, but in the future,
> please create one report per issue.

Sorry for that.
Comment 3 Buovjaga 2021-07-05 17:24:10 UTC
Ok, I can test on Wayland later and maybe break these up into more reports. With Wayland, though, the question becomes, what is Plasma's fault and what is LibreOffice's? As we know there are still many interesting Wayland bugs and these are the meanest ones: https://community.kde.org/Plasma/Wayland_Showstoppers
Comment 4 giors_00 2021-07-05 17:32:23 UTC
(In reply to Buovjaga from comment #3)
> Ok, I can test on Wayland later and maybe break these up into more reports.
> With Wayland, though, the question becomes, what is Plasma's fault and what
> is LibreOffice's? As we know there are still many interesting Wayland bugs
> and these are the meanest ones:
> https://community.kde.org/Plasma/Wayland_Showstoppers

Thanks. What sounded wired to me, was that with gtk3 VCLPLUGIN (even on plasma-wayland), works like a charm (but I am just a final user). By the way, any workaround to make plasma globalmenu to get libreoffice menu when launched with gtk3 VCLPLUGIN?
Comment 5 Buovjaga 2021-07-05 18:01:14 UTC
(In reply to giors_00 from comment #4)
> (In reply to Buovjaga from comment #3)
> > Ok, I can test on Wayland later and maybe break these up into more reports.
> > With Wayland, though, the question becomes, what is Plasma's fault and what
> > is LibreOffice's? As we know there are still many interesting Wayland bugs
> > and these are the meanest ones:
> > https://community.kde.org/Plasma/Wayland_Showstoppers
> 
> Thanks. What sounded wired to me, was that with gtk3 VCLPLUGIN (even on
> plasma-wayland), works like a charm (but I am just a final user). By the
> way, any workaround to make plasma globalmenu to get libreoffice menu when
> launched with gtk3 VCLPLUGIN?

Sorry, I don't have much experience with the global menu.
Comment 6 Michael Weghorn 2021-07-06 05:58:09 UTC
(In reply to giors_00 from comment #4)
> Thanks. What sounded wired to me, was that with gtk3 VCLPLUGIN (even on
> plasma-wayland), works like a charm (but I am just a final user).

When using the gtk3 VCL plugin, this also uses the gtk3/GNOME stack rather than the Qt/KF5 one under the hood, so it doesn't necessarily mean that all problems are LibreOffice-only. Whenever I was trying Plasma Wayland on my Debian testing, I encountered too many general issues so I always switched back to X11. The situation is certainly better when using KDE Neon or any other distro with latest Plasma/KF5 (Debian testing has 5.20.5). There are certainly problems that are LibreOffice's fault, this would need further analysis.

> By the
> way, any workaround to make plasma globalmenu to get libreoffice menu when
> launched with gtk3 VCLPLUGIN?

What you can try to avoid Wayland-specific problems is using the kf5 VCL plugin with XWayland by setting this environment variable: QT_QPA_PLATFORM=xcb
(Ideally in some wrapper script for LibreOffice, so other Qt/KDE applications are unaffected, in case you want to see how those behave with "real Wayland")
Comment 7 giors_00 2021-07-10 15:37:01 UTC
> What you can try to avoid Wayland-specific problems is using the kf5 VCL
> plugin with XWayland by setting this environment variable:
> QT_QPA_PLATFORM=xcb
> (Ideally in some wrapper script for LibreOffice, so other Qt/KDE
> applications are unaffected, in case you want to see how those behave with
> "real Wayland")

Thank you very much indeed. No idea how to do it (to set the environment variable just for Libreoffice). For the moment I am back to gnome (wayland)...there, most of things seems to work ok.
Comment 8 Buovjaga 2021-07-10 15:40:36 UTC
(In reply to giors_00 from comment #7)
> > What you can try to avoid Wayland-specific problems is using the kf5 VCL
> > plugin with XWayland by setting this environment variable:
> > QT_QPA_PLATFORM=xcb
> > (Ideally in some wrapper script for LibreOffice, so other Qt/KDE
> > applications are unaffected, in case you want to see how those behave with
> > "real Wayland")
> 
> Thank you very much indeed. No idea how to do it (to set the environment
> variable just for Libreoffice). For the moment I am back to gnome
> (wayland)...there, most of things seems to work ok.

Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as explained in https://wiki.archlinux.org/title/LibreOffice#Theme 

For testing, you can run from the command line with

QT_QPA_PLATFORM=xcb libreoffice
Comment 9 giors_00 2021-07-18 16:00:03 UTC
> 
> Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> explained in https://wiki.archlinux.org/title/LibreOffice#Theme 

Don't know why but it doesn't work. Really does nothing

> 
> For testing, you can run from the command line with
> 
> QT_QPA_PLATFORM=xcb libreoffice

It works perfectly: all (or at least most annoying) problems get solved. Thanks. If you figure out how to make it default, please, let me know. 

Thanks again (now at least it is usable under plasma wayland)
Comment 10 Buovjaga 2021-07-18 16:04:24 UTC
(In reply to giors_00 from comment #9)
> > 
> > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> 
> Don't know why but it doesn't work. Really does nothing

Can you copy and paste here the contents of the .sh file with your edits?
Comment 11 giors_00 2021-07-18 23:55:40 UTC
(In reply to Buovjaga from comment #10)
> (In reply to giors_00 from comment #9)
> > > 
> > > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> > 
> > Don't know why but it doesn't work. Really does nothing
> 
> Can you copy and paste here the contents of the .sh file with your edits?

# to force a certain look'n feel

#export SAL_USE_VCLPLUGIN=gen
#export SAL_USE_VCLPLUGIN=gtk3_kde5
#export SAL_USE_VCLPLUGIN=kf5
#export SAL_USE_VCLPLUGIN=qt5
#export SAL_USE_VCLPLUGIN=gtk3
export QT_QPA_PLATFORM=xcb
Comment 12 Buovjaga 2021-07-19 05:16:23 UTC
(In reply to giors_00 from comment #11)
> (In reply to Buovjaga from comment #10)
> > (In reply to giors_00 from comment #9)
> > > > 
> > > > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > > > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> > > 
> > > Don't know why but it doesn't work. Really does nothing
> > 
> > Can you copy and paste here the contents of the .sh file with your edits?
> 
> # to force a certain look'n feel
> 
> #export SAL_USE_VCLPLUGIN=gen
> #export SAL_USE_VCLPLUGIN=gtk3_kde5
> #export SAL_USE_VCLPLUGIN=kf5
> #export SAL_USE_VCLPLUGIN=qt5
> #export SAL_USE_VCLPLUGIN=gtk3
> export QT_QPA_PLATFORM=xcb

Ok, I'm not sure why that doesn't have an effect. Maybe you could ask in https://bbs.archlinux.org/
Comment 13 Buovjaga 2021-07-20 16:05:33 UTC
Now I tested with Arch Linux + KDE Plasma + Wayland and I can not reproduce any of the problems mentioned in the original description. I am not using QT_QPA_PLATFORM=xcb

Arch Linux 64-bit
Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: kf5
Locale: en-US (C); UI: en-US
7.1.4-1
Calc: threaded
Comment 14 Henrique SantAnna 2021-07-21 01:20:35 UTC
(In reply to giors_00 from comment #11)
> (In reply to Buovjaga from comment #10)
> > (In reply to giors_00 from comment #9)
> > > > 
> > > > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > > > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> > > 
> > > Don't know why but it doesn't work. Really does nothing
> > 
> > Can you copy and paste here the contents of the .sh file with your edits?
> 
> # to force a certain look'n feel
> 
> #export SAL_USE_VCLPLUGIN=gen
> #export SAL_USE_VCLPLUGIN=gtk3_kde5
> #export SAL_USE_VCLPLUGIN=kf5
> #export SAL_USE_VCLPLUGIN=qt5
> #export SAL_USE_VCLPLUGIN=gtk3
> export QT_QPA_PLATFORM=xcb

DON'T DO THAT !!!

You should not add 'export QT_QPA_PLATFORM=xcb' to /etc/profile.d/

This will affect ALL SOFTWARE based on Qt (e.g. ALL KDE SOFTWARE), causing it to run on a undesired way.

There are plenty ways of setting a variable to affect only LibreOffice, and you should not do that inside /etc/profile.d/

Suggesting that someone do this is irresponsible and is not based on any official documentation.

SAL_USE_VCLPLUGIN variable can be set inside /etc/profile.d/ only because this variable is used exclusively by LibreOffice.

But QT_QPA_PLATFORM variable is used by every Qt software and never should be set inside /etc/profile.d/
Comment 15 Buovjaga 2021-07-21 04:56:01 UTC
(In reply to Henrique SantAnna from comment #14)
> (In reply to giors_00 from comment #11)
> > (In reply to Buovjaga from comment #10)
> > > (In reply to giors_00 from comment #9)
> > > > > 
> > > > > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > > > > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> > > > 
> > > > Don't know why but it doesn't work. Really does nothing
> > > 
> > > Can you copy and paste here the contents of the .sh file with your edits?
> > 
> > # to force a certain look'n feel
> > 
> > #export SAL_USE_VCLPLUGIN=gen
> > #export SAL_USE_VCLPLUGIN=gtk3_kde5
> > #export SAL_USE_VCLPLUGIN=kf5
> > #export SAL_USE_VCLPLUGIN=qt5
> > #export SAL_USE_VCLPLUGIN=gtk3
> > export QT_QPA_PLATFORM=xcb
> 
> DON'T DO THAT !!!
> 
> You should not add 'export QT_QPA_PLATFORM=xcb' to /etc/profile.d/
> 
> This will affect ALL SOFTWARE based on Qt (e.g. ALL KDE SOFTWARE), causing
> it to run on a undesired way.
> 
> There are plenty ways of setting a variable to affect only LibreOffice, and
> you should not do that inside /etc/profile.d/
> 
> Suggesting that someone do this is irresponsible and is not based on any
> official documentation.

Thanks for explaining and sorry for being irresponsible. I didn't know how profile.d works, that all the scripts are executed by the shell and that it's not tied to the application.
Comment 16 giors_00 2021-07-21 05:53:59 UTC
(In reply to Buovjaga from comment #13)
> Now I tested with Arch Linux + KDE Plasma + Wayland and I can not reproduce
> any of the problems mentioned in the original description. I am not using
> QT_QPA_PLATFORM=xcb
> 
> Arch Linux 64-bit
> Version: 7.1.4.2 / LibreOffice Community
> Build ID: 10(Build:2)
> CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: kf5
> Locale: en-US (C); UI: en-US
> 7.1.4-1
> Calc: threaded

Can you confirm at least that double mouse click select text?
Comment 17 giors_00 2021-07-21 05:55:27 UTC
(In reply to Henrique SantAnna from comment #14)
> (In reply to giors_00 from comment #11)
> > (In reply to Buovjaga from comment #10)
> > > (In reply to giors_00 from comment #9)
> > > > > 
> > > > > Maybe you could try adding it to /etc/profile.d/libreoffice-fresh.sh as
> > > > > explained in https://wiki.archlinux.org/title/LibreOffice#Theme 
> > > > 
> > > > Don't know why but it doesn't work. Really does nothing
> > > 
> > > Can you copy and paste here the contents of the .sh file with your edits?
> > 
> > # to force a certain look'n feel
> > 
> > #export SAL_USE_VCLPLUGIN=gen
> > #export SAL_USE_VCLPLUGIN=gtk3_kde5
> > #export SAL_USE_VCLPLUGIN=kf5
> > #export SAL_USE_VCLPLUGIN=qt5
> > #export SAL_USE_VCLPLUGIN=gtk3
> > export QT_QPA_PLATFORM=xcb
> 
> DON'T DO THAT !!!
> 
> You should not add 'export QT_QPA_PLATFORM=xcb' to /etc/profile.d/
> 
> This will affect ALL SOFTWARE based on Qt (e.g. ALL KDE SOFTWARE), causing
> it to run on a undesired way.

Thanks! Already commented
> 
> There are plenty ways of setting a variable to affect only LibreOffice, and
> you should not do that inside /etc/profile.d/


Can you suggest one, please?
Comment 18 Buovjaga 2021-07-21 16:34:01 UTC
(In reply to giors_00 from comment #16)
> (In reply to Buovjaga from comment #13)
> > Now I tested with Arch Linux + KDE Plasma + Wayland and I can not reproduce
> > any of the problems mentioned in the original description. I am not using
> > QT_QPA_PLATFORM=xcb
> 
> Can you confirm at least that double mouse click select text?

Like I said, I see none of the problems. As we run basically the same systems, there is something special in yours.

(In reply to giors_00 from comment #17)
> (In reply to Henrique SantAnna from comment #14)
> > There are plenty ways of setting a variable to affect only LibreOffice, and
> > you should not do that inside /etc/profile.d/
> 
> Can you suggest one, please?

If you accept advice from an irresponsible rascal like me, here is a proper way to do it: https://wiki.archlinux.org/title/Desktop_entries#Modify_environment_variables
Comment 19 giors_00 2021-07-22 18:51:16 UTC
> 
> Like I said, I see none of the problems. As we run basically the same
> systems, there is something special in yours.
> 
After a "Hard Reset" of plasma Desktop, with a vanilla situation it works perfect (you are right). But, customizing things takes the mess back. I think I can blame global theme: now I am back with breeze and all works (apparently) well again. But, if I change to a custom theme (tried a couple of MacOS-like themes)...things get worse. I didn't think theme was capable to mess up a 3d part software behaviour. As I said, I am not an expert (just final user) but, to me, it is a plasma problem rather than libreoffice. 

Finally, according to me, most attractive thing of plasma is customization. But if it messes apps up....
Comment 20 giors_00 2021-07-22 19:00:24 UTC
Definitely, changing application style to Kvantum messes things up with libreoffice behaviour. So staying on breeze, seems to work (just in apps style). I will try to insist for a couple of dais with plasma configured that way and be back with updates.
Comment 21 Jan-Marek Glogowski 2021-08-27 03:51:55 UTC
This is definitely some upsteam bug. LO just gets single mouse click events. So I installed qt5-style-kvantum/stable for Debian Bullseye. For a double click I get 4 events AKA button down + up + down + up.

SAL_DEBUG((int) eState << " " << aEvent.mnX << " " << aEvent.mnY << " " << aEvent.mnCode << " " << aEvent.mnTime);

For breeze I get:

debug:43565:43565: 0 278 201 1 13193371
debug:43565:43565: 1 278 201 0 13193418
debug:43565:43565: 0 278 201 1 13193515
debug:43565:43565: 1 278 201 0 13193578

For kvantum I get:

debug:43277:43277: 0 288 206 1 0
debug:43277:43277: 1 288 206 0 13153386
debug:43277:43277: 0 288 206 1 13153485
debug:43277:43277: 1 288 206 0 13153571

The first timestamp is 0! That timestamp comes from Qt. And this also happens for a single click. I'm actually surprised anything happens ;-)

I suggest to open a bug at https://github.com/tsujan/Kvantum

Working around this bug looks messy and more like a heuristic, so I'll just close this.
Comment 22 Jan-Marek Glogowski 2021-09-08 06:47:39 UTC
*** Bug 142943 has been marked as a duplicate of this bug. ***
Comment 23 Jan-Marek Glogowski 2021-09-08 07:07:26 UTC
I've opened https://github.com/tsujan/Kvantum/issues/689
Comment 24 Henrique SantAnna 2021-09-08 15:20:05 UTC
(In reply to Jan-Marek Glogowski from comment #23)
> I've opened https://github.com/tsujan/Kvantum/issues/689

The bug report at kvantum has been closed as "won't fix".

Kvantum maintenaner says this is a LibreOffice bug.
Comment 25 Jan-Marek Glogowski 2021-09-08 17:54:25 UTC
(In reply to Henrique SantAnna from comment #24)
> (In reply to Jan-Marek Glogowski from comment #23)
> > I've opened https://github.com/tsujan/Kvantum/issues/689
> 
> The bug report at kvantum has been closed as "won't fix".
> 
> Kvantum maintenaner says this is a LibreOffice bug.

Currently the best workaround seems to be to run LO with QT_QPA_PLATFORM=xcb for the time being, if SAL_USE_VCLPLUGIN=gtk3 is not an option.
Comment 26 giors_00 2021-09-09 07:25:17 UTC
I have to admit that the only app that is giving me problems in plasma (wayland) is libreoffice (on my laptop adding scaling problem). 
The mentioned workaround (QT_QPA_PLATFORM=xcb) is working but I really feel that solving kt5 problems should be quite urgent.