Bug 433854 - A lot of times copy-paste does not work.
Summary: A lot of times copy-paste does not work.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.21.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 447280 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-02 12:24 UTC by Allexus J
Modified: 2023-06-23 06:21 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of copying and pasting not working in Firefox 101 body or address bar, Wayland Plasma 5.24.90 (3.76 MB, video/mp4)
2022-06-07 22:11 UTC, Paul McAuley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Allexus J 2021-03-02 12:24:28 UTC
SUMMARY


STEPS TO REPRODUCE


OBSERVED RESULT
link of video: https://streamable.com/ak8qm7
it's a very annoying bug


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux: Manjaro
KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2 

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2021-03-02 16:32:06 UTC
Can you elaborate on what you are doing in that video?

Is that firefox running X or wayland? 
Do you see this with kwrite for example?
Comment 2 Allexus J 2021-03-02 18:11:41 UTC
(In reply to David Edmundson from comment #1)
> Can you elaborate on what you are doing in that video?
> 
> Is that firefox running X or wayland? 
> Do you see this with kwrite for example?

it's running on X, beacuse on wayland it's not usable yet, at least in my machine.

I don't notice this issue in kate for example.
Comment 3 Nate Graham 2021-03-02 19:51:49 UTC
Can you please describe the issue in words and also report only one issue at a time? I'm having a hard time figuring out what's going on in your video, and also video content is not searchable for ease of finding the issue in the future. :) Thanks!
Comment 4 Allexus J 2021-03-02 22:19:11 UTC
(In reply to Nate Graham from comment #3)
> Can you please describe the issue in words and also report only one issue at
> a time? I'm having a hard time figuring out what's going on in your video,
> and also video content is not searchable for ease of finding the issue in
> the future. :) Thanks!

you are right.

basically I am selecting a text and I am copying it, then I go to another tab and I paste it. Sometimes it pastes and sometimes it doesn't paste anything.
Comment 5 Bug Janitor Service 2021-03-17 04:33:38 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 6 Bug Janitor Service 2021-04-01 04:33:46 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 7 tagwerk19 2021-04-01 05:48:02 UTC
I don't know if I see the same thing but I've noticed copy and paste with Firefox (and Thunderbird) being "definitely obstinate"

I can highlight the text and "copy" and see the text in Klipper but I am not always able to paste. Typically I see the issue if trying to paste a link from Firefox into an email being written in Thunderbird.

I find I have somewhat more success if I "Paste without Formatting". My workround has been to "Clear History", go back to the text and copy it again. Both can help - but neither are guaranteed

There's also a thread here that seems to make sense....
    https://old.reddit.com/r/kdeneon/comments/mgybdr/firefox_and_the_clipboard/

For me this is with X (within KVM guests and from one KVM guest to another)
Comment 8 Allexus J 2021-05-24 19:15:44 UTC
the issue still persists.
kernel: 5.10.38-1-lts
distro: archlinux
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Comment 9 Allexus J 2021-05-24 19:43:57 UTC
the problem is not only with firefox. it happens with others applications.

also I don't know if this is related, but if I copy something from Libreoffice Calc and paste also to Libreoffice Calc, it appears like chinese language.... But if I paste the same content inside Kate for example I can see the real text that I copied, so not "chinese"... and if I copy from Kate to Libreoffice Calc now it correctly pastes the correct copied text.... link of video showing the bug: https://streamable.com/tj2fcd
Comment 10 Allexus J 2021-05-24 20:17:36 UTC
I agree with tagwerk19@innerjoin.org
I noticed too that the copy is done and it is in clipboard... but the paste doesn't happen.
I just noticed now again the issue when pasting to Kate. I can see the text in clipboard though.
Comment 11 valdikss 2021-08-22 11:54:02 UTC
I've been trying to debug this issue since 2019, but can't.

https://bugzilla.redhat.com/show_bug.cgi?id=1750903
Comment 12 phrxmd 2021-11-13 14:48:40 UTC
Bug 435220 might be a duplicate of this?
Comment 13 Eric Habib 2021-11-26 02:48:56 UTC
I get this bug occasionally as well, where I cannot paste. Sometimes it seems to be not copying properly:
Right now it is copying a link from the AUR in Firefox (wayland), specifically the .git link from (https://aur.archlinux.org/packages/kicad-git/).

The message appears in the journal:
Nov 25 21:40:26 arch plasmashell[942]: DataControlOffer: timeout reading from pipe
Nov 25 21:40:27 arch plasmashell[942]: DataControlOffer: timeout reading from pipe

Then when I try to paste into Konsole, I get:
Nov 25 21:43:40 arch konsole[26599]: QWaylandDataOffer: timeout reading from pipe
Nov 25 21:43:40 arch konsole[26599]: QWaylandDataOffer: error reading data for mimeType text/plain;charset=utf-8
Nov 25 21:43:41 arch konsole[26599]: QWaylandDataOffer: timeout reading from pipe
Nov 25 21:43:41 arch konsole[26599]: QWaylandDataOffer: error reading data for mimeType text/plain

Thinking about it, the other times I have had this issue has been with discord, and usually involves pasting links. Is it possible there is a problem with pasting links to and from certain applications?
Comment 14 David Edmundson 2022-01-09 21:33:52 UTC
*** Bug 447280 has been marked as a duplicate of this bug. ***
Comment 15 equeim 2022-03-02 20:58:21 UTC
I have this issue occasionally when copying from Konsole to other apps. Selecting another block of text in Konsole and copying seems to "fix" it, until it occurs again.
Comment 16 Paul McAuley 2022-06-03 16:11:27 UTC
I have an issue under Wayland (Plasma 5.24.90 and before) whereby I never can copy the contents of the URL bar in Firefox (101.0 and before) and then paste it into another application (I though can paste successfully into a textarea in Firefox). Copying the contents from the body of a webpage in Firefox copys and pastes fine though.
Comment 17 David Edmundson 2022-06-07 07:59:16 UTC
>Then when I try to paste into Konsole, I get:

That shows kwin did it's job of communicating perfectly. The source app failed to send the data when requested.

>I never can copy the contents of the URL bar in Firefox 

Firefox has two clipboard interfaces one in the core firefox code. The other from GTK side for the address bar, so it's not completely mad to see this happen.

----

This bug is inactionable currently. We need either a reproducble case or some other data points.
Note that typing "kwin" into krunner can show the debug console, that includes a tab for clipboard. Seeing if things fail there or work there but fail when pasting for real could be useful.
Comment 18 Paul McAuley 2022-06-07 22:11:46 UTC
Created attachment 149541 [details]
Example of copying and pasting not working in Firefox 101 body or address bar, Wayland Plasma 5.24.90

I managed to capture on this video Firefox 101 not copying to clipboard page body data (occurs sporadically) nor address bar data (occurs all the time). With the page body data I just get "timeout reading from pipe" in all fields in the clipboard tab of the Kwin debug console. With the address bar data all the fields in the clipboard tab of the debug console are blank.

Also, I'm not sure what you mean for it not to be "completely mad" for this to happen, though it sure makes using Wayland  infuriating!
Comment 19 Jan Bidler 2023-01-14 20:17:34 UTC
Encountered this in NeoChat too. Using `wl-paste`, I noticed that copying via CTRL+C didn't work, but copying via neochat's context menu did work.
Comment 20 Patrick Auernig 2023-01-18 16:01:19 UTC
I've ran into this bug since I've switched to Wayland completely.
First noticed it in Firefox version 109 (tried both the Arch Linux package and Flatpak).

Another curious thing I've noticed is that I can copy some text once on a webpage, then it stops working. Only after copying something from a different application I can copy again, which then stops working again until I copy something from a different application.
Forcing XWayland by setting `MOZ_ENABLE_WAYLAND=0` mitigates the issue for now.

Firefox 110 (the "Developer" version) seems to start using Wayland by default, and doesn't require the environment variable to be set anymore.
This also means that more and more people might run into this issue.
Comment 21 Nate Graham 2023-03-01 14:49:28 UTC
If it happens in wayland-native apps and restarting plasmashell fixes the issue, it could be an instance of Bug 462673.
Comment 22 tomtomtomreportingin 2023-03-05 22:39:51 UTC
I finally realized the issue only occurs if history size is set to 1. Happens regardless of Wayland or X11. Can anyone else confirm if setting the history size to greater than 1 resolves the issue?
Comment 23 Nate Graham 2023-03-05 22:42:34 UTC
Aha, that makes this Bug 466041, which was just fixed.

*** This bug has been marked as a duplicate of bug 466041 ***
Comment 24 tomtomtomreportingin 2023-03-06 04:00:42 UTC
Er, I might have posted in the wrong issue then. The issue I have been having is relatively recent and I only realized now that this report is from 2021.
Comment 25 Nate Graham 2023-03-06 15:38:24 UTC
Oh oops, I missed that you weren't the original reporter of the issue.
Comment 26 Nate Graham 2023-03-06 15:38:59 UTC
Allexus J, can you still reproduce this issue in Plasma 5.27.2 or later?
Comment 27 Bug Janitor Service 2023-03-21 03:45:38 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 28 Jan Bidler 2023-03-21 09:10:10 UTC
Just happened again to me using 5.27.3 on NeoChat. Although I don't get anything useful in the journal. 
Not sure if this is the same bug tho, which is why I didn't change the bug status.
Comment 29 Bug Janitor Service 2023-04-05 03:45:36 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 30 Bug Janitor Service 2023-04-20 03:45:47 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 31 Lyubomir 2023-05-13 19:38:55 UTC
@Nate Dunno about OP but I can reproduce this every single time with the Authy app. Plasma 5.27.4 Wayland session. Authy seems to run in XWayland. Copying from Authy app via the button shows the following inside Kwin Debug console: TARGETS, SAVE_TARGETS and MULTIPLE show "timeout reading from pipe". Still, i can paste into Firefox while the Authy app is open. If i close Authy, i cannot paste anything into Firefox. Paste is not greyed out in the context menu, but looks like no-op. 

The Plasma clipboard successfully shows the code in its list. After closing Authy i can click on the code in the Plasma clipboard history and it changes the source to "data control by /usr/bin/plasmashell" inside the Kwin debug console. Also it clears many of the MIME types and leaves only "text/plain" and "text/..." with the code as a value. After i do this pasting the code in Firefox works again.
Comment 32 Nate Graham 2023-05-14 17:21:43 UTC
Lyubomir, what you're experiencing is likely a different issue from what Allexus J is experiencing. It actually sounds a bit like the issue we fixed for Bug 468422. If you're still able to reproduce the issue after upgrading to Plasma 5.27.7, would you mind submitting a new bug report to track it? Thanks a lot!
Comment 33 Lyubomir 2023-05-19 12:34:52 UTC
@Nate Ah i see it was that issue that was fixed it 5.27.5. Kubuntu still on 5.27.4. Great!
Comment 34 Yani 2023-06-23 03:41:01 UTC
Resolved Fixed... I don't see that here.

What I see here is copy and paste working everywhere I've tested EXCEPT the Firefox address bar. And I've downloaded the Firefox nightly build and checked that as well and it has the same issue.

It just will not copy the URL. It copies what is in the browser just fine. 

Operating System: Rocky Linux 9.2
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.3
Kernel Version: 5.14.0-284.11.1.el9_2.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 64 × AMD EPYC 7551P 32-Core Processor
Memory: 125.2 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Manufacturer: Supermicro
Product Name: Super Server
System Version: 0123456789
Comment 35 Nate Graham 2023-06-23 06:21:14 UTC
Please submit a new bug report for your issue, as it has a high likelihood of being caused by something different from the thing fixed here.