Bug 433165 - Klipper still doesn't work properly on Wayland
Summary: Klipper still doesn't work properly on Wayland
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 5.15.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-18 13:13 UTC by francois5537
Modified: 2021-10-24 09:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Empty entries (29.92 KB, image/png)
2021-02-20 08:06 UTC, francois5537
Details
Bug triggered (16.42 KB, text/x-log)
2021-02-20 08:19 UTC, francois5537
Details

Note You need to log in before you can comment on or make changes to this bug.
Description francois5537 2021-02-18 13:13:42 UTC
SUMMARY
Copy + paste text in apps (any app - with/without XWayland) doesn't work most of the times.

STEPS TO REPRODUCE
1. Select text
2. Copy text (CTRL + C)
3. Paste text (CTRL + V)

OBSERVED RESULT
Nothing happens or the previous entry is being used.

EXPECTED RESULT
Correctly paste, as seen in the Xorg-session.

SOFTWARE/OS VERSIONS
Windows: /
macOS: /
Linux/KDE Plasma: 5.21.0
(available in About System)
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Using with or without any input methods doesn't make a difference (tested with IBus).
Comment 1 David Edmundson 2021-02-18 13:39:47 UTC
In the scenario above, klipper should not be involved.

Can you confirm if that works without klipper enabled?


Please give a more precise description of your test. Confirm it with two instances of kwrite for example.

Please attach output of "WAYLAND_DEBUG=1 kwrite" for both the source and target of the paste.

Please also confirm if you see correct behaviour with wl-copy/wl-paste
Comment 2 francois5537 2021-02-20 08:06:27 UTC
Created attachment 135942 [details]
Empty entries
Comment 3 francois5537 2021-02-20 08:16:34 UTC
Hi David,

Thanks for looking into this issue.

It doesn't happen when using two kwrite instances, however this can be triggered when using two different apps and trying to copy/paste between them. If I'm using VSCode editor and a browser like Firefox/Brave, a lot of times entries are empty (see screenshot) and/or it simple selects the previous entry. I'll try copy/paste without klipper running, but maybe this is caused because some apps aren't running under Wayland but XWayland instead?

It's a bit hard to debug as it seems to happen at random.
Comment 4 francois5537 2021-02-20 08:19:44 UTC
Created attachment 135943 [details]
Bug triggered
Comment 5 francois5537 2021-02-20 08:20:48 UTC
Just triggered the bug in Brave and it seems to happen a lot when using this or Firefox. I've added the required logging, hopefully it's useful. If you need more info, please let me know.
Comment 6 francois5537 2021-02-20 08:29:54 UTC
Another way to trigger this bug is by opening two apps (in this case Firefox and Brave):
1. Copy the address bar URL in Brave
2. Close Brave
3. Trying to paste the just copied entry in Firefox
4. Nothing happens

Klipper shows an empty entry in the history, but I'm not really sure this is a Klipper issue anymore.
Comment 7 Bug Janitor Service 2021-03-07 04:33:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Philipp A. 2021-05-21 18:44:50 UTC
I think this happens when copying between two app where at least one (or maybe exactly one) is an XWayland client. Doesn’t happen between two Wayland applications.

No matter if this is a Klipper bug or not, it does happen and prevents me from switching to Wayland. Is there any way I can help fix this? I would love to be able to switch.
Comment 9 David Edmundson 2021-05-21 19:54:08 UTC
It would help to get some super concrete reliable steps. Ideally with some very simple X clients, like xclip.
Comment 10 francois5537 2021-10-24 09:24:19 UTC
This should be fixed with Plasma 5.23.