Bug 156562 - Source unknown when pasting with ctrl+shift in Wayland (Linux)
Summary: Source unknown when pasting with ctrl+shift in Wayland (Linux)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:24.8.0 target:24.2.4
Keywords:
: 157373 160407 161186 (view as bug list)
Depends on:
Blocks: Wayland KDE, KF5
  Show dependency treegraph
 
Reported: 2023-08-01 07:26 UTC by Mike
Modified: 2024-05-20 13:08 UTC (History)
5 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 Mike 2023-08-01 07:26:00 UTC
Since few months, when I want to paste anything in Wayland session using ctrl+shift (to get rid of formatting), I get error "Requested clipboard type unavailable". Above, I can see: "Source: unknown".

This makes LibreOffice unusable in Wayland session. All other apps seem to have no problem with the clipboard, so this is exclusively happening on LibreOffice. I also can see the content of the clipboard, but it's not passed to LibreOffice, once I use advanced pasting options.

Because Wayland session in Plasma on my computer works stable and fine, this is the only serious issue preventing me from using it.

I also checked the test user with default settings, the same problem, so the issue with configs is excluded.

The issue may be with Arch packages, because flatpack or snap versions don't have this bug. However, I need LibreOffice to be integrated with the system (theming, global menus), hence those versions are not a solution. For example, flatpack version doesn't show any menus and have no buttons to access them in any way, and thus is unusable (it launches traditional view with menus, but since menus are in an upper panel - global menus - they are not shown and there is absolutely no access to any kind of options to change the visual style of the app as there are no buttons to options in that default look).

Anyway, clipboard is an incredibly important part that has to work. If it doesn't or works incorrectly, the whole LibreOffice becomes unusable. Normal pasting works, but pasting with formatting is incredibly inconvenient and adds a ton of unnecessary work.

On X11 session, this issue is not present.

Curiously, even if I install an older LibreOffice version like 7.4.7, it also has this issue.

Please, let me know what other information I should provide.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.7-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: Alienware
Product Name: Alienware 17 R3
System Version: 1.13.1
Comment 1 Michael Weghorn 2023-08-14 21:28:07 UTC
I can reproduce that on Debian testing in a Plasma Wayland session, e.g. as follows:

1) start LO Writer
2) select text "hello world" in Gedit, Ctrl+C
3) switch to LO Writer, Ctrl+Shift+V, select "Unformatted Text"

It works when just using Ctrl+V. Also works when using the gtk3 VCL plugin (set environment variable SAL_USE_VCLPLUGIN=gtk3 before starting LO) or when forcing the use of the Qt X11 backend (QT_QPA_PLATFORM=xcb).

With a debug build, these warnings can be seen in the terminal from which LO was started:

warn:vcl.qt:293019:293019:vcl/qt5/QtTransferable.cxx:181: In flight clipboard change detected - broken clipboard read!
warn:vcl.qt:293019:293019:vcl/qt5/QtTransferable.cxx:181: In flight clipboard change detected - broken clipboard read!
warn:vcl.qt:293019:293019:vcl/qt5/QtTransferable.cxx:181: In flight clipboard change detected - broken clipboard read!


Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d1d07992a89ba503f1d457a8f79926063f4d3f9c
CPU threads: 12; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 2 futurefuturefuture 2023-09-01 17:33:24 UTC Comment hidden (spam)
Comment 3 Michael Weghorn 2024-02-09 20:50:54 UTC
I've started looking into this issue.
Comment 4 Commit Notification 2024-02-13 16:19:30 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee03b3a7e85c7bb293e161cc6ea7fe7bb3bc9240

tdf#156562 qt: Don't cache supported mime types/data flavors

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2024-02-13 16:19:32 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1db5b87fe69c2375f1d66974dafcd563303c76db

tdf#156562 qt: Sync with system clipboard content if necessary

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-02-16 08:09:54 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8d98f231fa2d3f4386a842d0f45a9ceeea4ab8e1

tdf#156562 qt: Don't crash on null clipboard content

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Mike 2024-02-18 16:43:28 UTC
Thank you!

I will report back, once the 24.8.0 version will become available on Arch/Manjaro testing repos, so it may take a while.
My current version is 24.2.0-1
Comment 8 Michael Weghorn 2024-04-16 07:16:12 UTC
*** Bug 157373 has been marked as a duplicate of this bug. ***
Comment 9 Stéphane Guillou (stragu) 2024-04-16 09:32:46 UTC
*** Bug 160407 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2024-04-30 09:04:58 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/fedd7587477ae7c2b3f3cb350db3aeedbbb20f1c

tdf#156562 qt: Don't cache supported mime types/data flavors

It will be available in 24.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2024-04-30 09:06:00 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/2e4a593abc2fb82f7d26f73db71bb7fdd68add35

tdf#156562 qt: Sync with system clipboard content if necessary

It will be available in 24.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Stéphane Guillou (stragu) 2024-05-20 13:08:35 UTC
*** Bug 161186 has been marked as a duplicate of this bug. ***