Bug 498341 - Clipboard text is sometimes non-pasteable
Summary: Clipboard text is sometimes non-pasteable
Status: RESOLVED DUPLICATE of bug 502831
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 6.3.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: geezer-jobs, wayland-only
: 501996 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-07 02:12 UTC by Fernando M. Muniz
Modified: 2025-08-22 10:35 UTC (History)
24 users (show)

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


Attachments
Clipboard's unpasteable text issue. (2.24 MB, video/x-matroska)
2025-01-07 02:12 UTC, Fernando M. Muniz
Details
New bug? (2.51 MB, video/x-matroska)
2025-08-21 15:27 UTC, Fernando M. Muniz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando M. Muniz 2025-01-07 02:12:09 UTC
Created attachment 177152 [details]
Clipboard's unpasteable text issue.

I've copied a YouTube url, but I couldn't paste it anywhere, until I've CTRL+C the text from the clipboard itself.
Comment 1 Nate Graham 2025-01-07 17:17:22 UTC
Do you have your clipboard history set to only 1?
Comment 2 Fernando M. Muniz 2025-01-07 18:09:16 UTC
(In reply to Nate Graham from comment #1)
> Do you have your clipboard history set to only 1?

It's set to 100 itens.
Comment 3 duha.bugs 2025-01-08 16:57:16 UTC
Was that the youtube link you tried to delete and reappeared after reboot like you described in: https://bugs.kde.org/show_bug.cgi?id=498343 ?
Comment 4 Fernando M. Muniz 2025-01-08 20:40:19 UTC
(In reply to duha.bugs from comment #3)
> Was that the youtube link you tried to delete and reappeared after reboot
> like you described in: https://bugs.kde.org/show_bug.cgi?id=498343 ?

It was this one:
https://www.youtube.com/watch?v=D1FcYknxEY0
Comment 5 Fernando M. Muniz 2025-01-08 21:01:34 UTC
(In reply to Fernando M. Muniz from comment #4)
> (In reply to duha.bugs from comment #3)
> > Was that the youtube link you tried to delete and reappeared after reboot
> > like you described in: https://bugs.kde.org/show_bug.cgi?id=498343 ?
> 
> It was this one:
> https://www.youtube.com/watch?v=D1FcYknxEY0

Although ironically I couldn't past this link and then I was able to paste after I've opened the Clipboard to check if the link was there, I don't think there's anything wrong with the link, especially on the other post, where I was able to reproduce that issue with multiple words.
Comment 6 TraceyC 2025-01-09 20:56:54 UTC
I was just able to reproduce this on git-master, right after clearing the clipboard and rebooting

1. Copy a few text only strings to the clipboard
2. Open the clipboard
3. Click on one item
4. Try to use Ctrl+V or right click-Paste in a text editor

Observed:
Nothing pasted
I switched among the various clipboard entries, and none were able to be pasted

After clearing the clipboard, and copying a few more strings, pasting entries worked normally again
Comment 7 Fushan Wen 2025-01-13 17:24:04 UTC
Wayland or X11
Comment 8 TraceyC 2025-01-13 21:05:52 UTC
Wayland. I also saw this yesterday on 6.2.5 Wayland.
Comment 9 Axemark38 2025-01-14 07:56:15 UTC
OpenMandriva ROME user here. Bug exists on Plasma 6.2.4 (Wayland) as well. More details can be found at https://github.com/OpenMandrivaAssociation/distribution/issues/3013, including a quick fix that seems to work for us but unsure for Arch users. Remove the separate widget if added (it produces the same issue) and disable the clipboard in the panel system tray.
Comment 10 Andrea Ippolito 2025-03-06 12:34:01 UTC
Reproducible on 6.3.2 - workaround: clear entire clipboard history

Had to do that quite often though and it's annoying for obvious reasons
Comment 11 Wilson Phillips 2025-03-08 12:47:48 UTC
Here is something a forum member posted last night.

If you use Ctl+C and then press Meta it will load into the klipper. It may or may not load it at the top of the list.

I switched over to a Wayland session and was able to verify that it does work that way. It is strange.
Comment 12 Wilson Phillips 2025-03-08 12:50:19 UTC
Sorry, the above was pasted into the wrong issue. It belongs in the one that may be a duplicate.
Comment 13 aeneid 2025-03-12 07:03:55 UTC
I am experiencing this on endeavour os (arch), items randomly become non pastable
Comment 14 Nate Graham 2025-03-17 21:38:55 UTC
There's a known issue right now (in master, maybe earlier) where items can't be pastes after manually moving them to the top of the clipboard history; see Bug 500927. That's the one that Tracey ran into.

For this issue, we need to find a reproducible case for it.

Fernando, you aren't actually experiencing Bug 500927, are you?
Comment 15 Fernando M. Muniz 2025-03-18 03:23:02 UTC
(In reply to Nate Graham from comment #14)
> There's a known issue right now (in master, maybe earlier) where items can't
> be pastes after manually moving them to the top of the clipboard history;
> see Bug 500927. That's the one that Tracey ran into.
> 
> For this issue, we need to find a reproducible case for it.
> 
> Fernando, you aren't actually experiencing Bug 500927, are you?

"Copy one entry and paste it. Copy second entry and only first entry is pasteable."

Nope, I cannot paste anything after copying a link sometimes, and then I check and link it indeed there, like the attachment shows.
Also no, I didn't manually changed the order of copied links, as you can see in the attachment; there's only one link, making it technically the first link.
Comment 16 John 2025-03-18 12:45:41 UTC
It happened to me too when trying to copy / move files from one place to another.
But since it's random and I don't know how to reproduce it, I didn't make a report for it.
Comment 17 Andrea Ippolito 2025-03-21 08:05:45 UTC
I can reproduce this somewhat consistently when I'm using IntelliJ IDEA: https://www.jetbrains.com/idea/download/download-thanks.html?platform=linux&code=IIC (just uncompress and run).

IntelliJ IDEA's Wayland support is still experimental AFAIK, and since I'm using Wayland for my session I enabled the flag to let IDEA run natively on Wayland, i.e. once you open the app, Ctrl+Shift+A to open Actions search, then look for "Edit Custom VM Options...". In the text file paste:

-Dawt.toolkit.name=WLToolkit

Then restart the app. Now you're pretty much in my starting conditions.

1. clear the KDE clipboard history
2. In IDEA, open/create a scratch text file (e.g. Ctrl+Shift+A and type "scratch") and type two strings on separate lines
3. copy the first one, then copy the second one
4. go to a blank line on that same file, then bring up the clipboard popup (Meta + V here), and single click the second entry from the history, or highlight with the keyboard and press enter to select it
5. once the clipboard popup closes, try to Ctrl + V the selected entry

Expected: entry is pasted
Actual: nothing is pasted

Mind you, this isn't reproducible if you follow these exact same steps but with just ONE entry in the clipboard history, so be careful.

Also, these same steps don't trigger this bug in Kate, for example.

BUT before reporting this to the IDEA folks, I wanna mention that once this bug IS triggered (from IDEA), you will also face the same issue in Kate.

It's as if IDEA broke some communication pipe in an unrecoverable way.

As I said in a previous comment, clearing the history temporarily resets things to normal.

Thanks
Comment 18 Fernando M. Muniz 2025-03-23 15:35:13 UTC
I can confirm that this random issue happens on 6.3.3

It happened after I've copied a YouTube link with timecode from the Share menu, then accessing the link and copying the unabridged version of the link, then removing the abridged version from the clipboard, leaving only that link there. I can't reproduce it though.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz
Memory: 8.1 GB of RAM
Graphics Processor 1: NVIDIA GeForce GTX 1650
Graphics Processor 2: Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 82MG
System Version: IdeaPad Gaming 3 15IHU6
Comment 19 TraceyC 2025-03-25 22:39:38 UTC
*** Bug 501996 has been marked as a duplicate of this bug. ***
Comment 20 JFK 2025-03-27 17:14:39 UTC
Also experiencing this bug and it's very annoying
Comment 21 m.kurz 2025-03-29 20:47:56 UTC
I also experience the bug, totally random using 6.3.3.
Comment 22 m.kurz 2025-03-29 20:48:16 UTC
Forgot: Using Wayland.
Comment 23 Xavier Corredor Llano 2025-03-29 23:06:05 UTC
For me this happens with non-KDE Wayland applications like: Libreoffice, Pycharm, VirtualBox, Firefox (all with Wayland enabled) and not always, it's just random, very annoying.
Comment 24 TraceyC 2025-04-01 23:09:16 UTC
I just had this happen on Plasma 6.3.3. These were my most recent steps. I notice that a browser / non-KDE app and the clipboard are a common cause for people, and was here

I had many entries in the clipboard
- Filtered entries with a search term
- Copied and pasted one of the entries into a browser tab in the URL field
- Removed the clibboard search filter
- Clicked on another existing entry from history
Result: no matter how many times I select that entry I am unable to paste it anywhere
Comment 25 JFK 2025-04-02 00:05:32 UTC
I installed Flatpak CopyQ and it's much better then the KDE version.  I think this has been going on for a while and don't really see a fix coming soon but who knows.  

Copy/Paste still has issues every now and then but at least with CopyQ when you go and copy it from there clipboard it will actually paste it whereas KDE's clipboard won't always paste it.  Much less of a headache until they hopefully find a fix for this issue.
Comment 26 Fushan Wen 2025-04-02 14:37:42 UTC
Does journalctl tell anything when the bug happens?
Comment 27 Bug Janitor Service 2025-04-02 15:16:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/171
Comment 28 Fushan Wen 2025-04-02 15:24:32 UTC
(In reply to Bug Janitor Service from comment #27)
> A possibly relevant merge request was started @
> https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/171

Can anyone test this patch to see if the situation is better?
Comment 29 JFK 2025-04-05 17:37:27 UTC
I found out when the copy/paste issue occurs.  It happens when I copy text from an application (like my browsers), close the browser, open a new application, and try to paste it there.  It doesn't always work for me.

There are only certain instances where this happens.  If the application that I am wanting to paste it in is already open then the problem doesn't occur from my tests.  At least from what I just experienced and tested out.

It's weird because sometimes when I use an application like Kwrite to copy instead of my browser (rpm brave, flatpak firefox) then it would work fine when pasting it in my browser.  It's inconsistent for the most part based on my tests.

I should also note that whenever any of this happened.  In CopyQ and default plasma clipboard, they would show it as copied.  It would paste every time after clicking it in CopyQ.  Default Plasma clipboard wouldn't paste.
Comment 30 Andrea Ippolito 2025-04-05 20:10:23 UTC
(In reply to Andrea Ippolito from comment #17)
> I can reproduce this somewhat consistently when I'm using IntelliJ IDEA:
> https://www.jetbrains.com/idea/download/download-thanks.
> html?platform=linux&code=IIC (just uncompress and run).
> 
> IntelliJ IDEA's Wayland support is still experimental AFAIK, and since I'm
> using Wayland for my session I enabled the flag to let IDEA run natively on
> Wayland, i.e. once you open the app, Ctrl+Shift+A to open Actions search,
> then look for "Edit Custom VM Options...". In the text file paste:
> 
> -Dawt.toolkit.name=WLToolkit
> 
> Then restart the app. Now you're pretty much in my starting conditions.
> 
> 1. clear the KDE clipboard history
> 2. In IDEA, open/create a scratch text file (e.g. Ctrl+Shift+A and type
> "scratch") and type two strings on separate lines
> 3. copy the first one, then copy the second one
> 4. go to a blank line on that same file, then bring up the clipboard popup
> (Meta + V here), and single click the second entry from the history, or
> highlight with the keyboard and press enter to select it
> 5. once the clipboard popup closes, try to Ctrl + V the selected entry
> 
> Expected: entry is pasted
> Actual: nothing is pasted
> 
> Mind you, this isn't reproducible if you follow these exact same steps but
> with just ONE entry in the clipboard history, so be careful.
> 
> Also, these same steps don't trigger this bug in Kate, for example.
> 
> BUT before reporting this to the IDEA folks, I wanna mention that once this
> bug IS triggered (from IDEA), you will also face the same issue in Kate.
> 
> It's as if IDEA broke some communication pipe in an unrecoverable way.
> 
> As I said in a previous comment, clearing the history temporarily resets
> things to normal.
> 
> Thanks

Actually I can ALWAYS reproduce the bug by following the steps I mentioned in this comment of mine.

Is there any chance a Dev can try to reproduce with these steps and see if a fix is possible?

If we're lucky it's the same issue everyone else is experiencing, even if the apps are different.

Thanks
Comment 31 Fushan Wen 2025-04-05 23:50:31 UTC
(In reply to Andrea Ippolito from comment #30)
> (In reply to Andrea Ippolito from comment #17)
> > I can reproduce this somewhat consistently when I'm using IntelliJ IDEA:
> > https://www.jetbrains.com/idea/download/download-thanks.
> > html?platform=linux&code=IIC (just uncompress and run).
> > 
> > IntelliJ IDEA's Wayland support is still experimental AFAIK, and since I'm
> > using Wayland for my session I enabled the flag to let IDEA run natively on
> > Wayland, i.e. once you open the app, Ctrl+Shift+A to open Actions search,
> > then look for "Edit Custom VM Options...". In the text file paste:
> > 
> > -Dawt.toolkit.name=WLToolkit
> > 
> > Then restart the app. Now you're pretty much in my starting conditions.
> > 
> > 1. clear the KDE clipboard history
> > 2. In IDEA, open/create a scratch text file (e.g. Ctrl+Shift+A and type
> > "scratch") and type two strings on separate lines
> > 3. copy the first one, then copy the second one
> > 4. go to a blank line on that same file, then bring up the clipboard popup
> > (Meta + V here), and single click the second entry from the history, or
> > highlight with the keyboard and press enter to select it
> > 5. once the clipboard popup closes, try to Ctrl + V the selected entry
> > 
> > Expected: entry is pasted
> > Actual: nothing is pasted
> > 
> > Mind you, this isn't reproducible if you follow these exact same steps but
> > with just ONE entry in the clipboard history, so be careful.
> > 
> > Also, these same steps don't trigger this bug in Kate, for example.
> > 
> > BUT before reporting this to the IDEA folks, I wanna mention that once this
> > bug IS triggered (from IDEA), you will also face the same issue in Kate.
> > 
> > It's as if IDEA broke some communication pipe in an unrecoverable way.
> > 
> > As I said in a previous comment, clearing the history temporarily resets
> > things to normal.
> > 
> > Thanks
> 
> Actually I can ALWAYS reproduce the bug by following the steps I mentioned
> in this comment of mine.
> 
> Is there any chance a Dev can try to reproduce with these steps and see if a
> fix is possible?
> 
> If we're lucky it's the same issue everyone else is experiencing, even if
> the apps are different.
> 
> Thanks

Cannot reproduce with or without the patch
Comment 32 Fushan Wen 2025-04-05 23:59:00 UTC
(In reply to JFK from comment #29)
> I found out when the copy/paste issue occurs.  It happens when I copy text
> from an application (like my browsers), close the browser, open a new
> application, and try to paste it there.  It doesn't always work for me.
> 
> There are only certain instances where this happens.  If the application
> that I am wanting to paste it in is already open then the problem doesn't
> occur from my tests.  At least from what I just experienced and tested out.
> 
> It's weird because sometimes when I use an application like Kwrite to copy
> instead of my browser (rpm brave, flatpak firefox) then it would work fine
> when pasting it in my browser.  It's inconsistent for the most part based on
> my tests.
> 
> I should also note that whenever any of this happened.  In CopyQ and default
> plasma clipboard, they would show it as copied.  It would paste every time
> after clicking it in CopyQ.  Default Plasma clipboard wouldn't paste.

This reproducer is also not reliable, but at least I successfully reproduced it once by following the steps. It can be caused by an application not transferring its clipboard content to other applications before the application quits, so not sure if it's Plasma's bug.
Comment 33 Andrea Ippolito 2025-04-07 08:05:20 UTC
Sharing some good news (so far): could not reproduce on 6.3.4

I got this update from my distro yesterday, and this morning back to work in IntelliJ IDEA, I can copy multiple things to the clipboard, and pick and choose what I want to paste from it, and it works as it's supposed to.

I hesitate setting this back to "REPORTED" - if someone else on 6.3.4 could share their (hopefully positive) feedback too, maybe it could be directly closed instead.

Thanks
Comment 34 EpicTux123 2025-04-07 09:58:49 UTC
Fedora Linux 41 here. I still have this bug on 6.3.4, but I can't tell you steps to reproduce it, as it's entirely random when it happens.
Comment 35 m.kurz 2025-04-07 10:46:01 UTC
I can also not reproduce this issue anymore on 6.3.4 (using Arch Linux).
I was able to reproduce before with gitk and copy pasting text out of it, after closing it. Not always, but I could quite reliable re-produce it when trying copy/pasting for a couple of minutes. But this is working now. I am using Wayland but gitk is using xwayland.

I see following commits made it into 6.3.4:
https://invent.kde.org/plasma/plasma-workspace/-/commit/cd7d0215a7a0bc3503640f0f8c4e44bde08f7b20
https://invent.kde.org/plasma/plasma-workspace/-/commit/3ac707c06579bdcde6a3ac471d45f2258f76eaee
https://invent.kde.org/plasma/plasma-workspace/-/commit/8d81c6816e64a9b9df7a093cc50f093dc258ff7a

So maybe those fixed my problem at least.
But maybe others still experience the problem, so in the end we face/faces slighly different issues.
Comment 36 Nate Graham 2025-04-08 16:53:57 UTC
Fernando, can you still reproduce this in Plasma 6.3.4?
Comment 37 Fernando M. Muniz 2025-04-08 22:12:17 UTC
(In reply to Nate Graham from comment #36)
> Fernando, can you still reproduce this in Plasma 6.3.4?

Since it's random, I'll have to update to 6.3.5 to be sure that I wasn't able to.
Comment 38 madness742 2025-04-08 23:46:41 UTC
I can still reproduce this on Fedora 41 KDE with the default settings. I however cannot reliably reproduce it.

It usually occurs after booting up the system, or when waking it out of sleep. The workaround I've found was hitting shift+v, selecting the second item in the clipboard, and then repeating it once again. 

I also noticed that by default the option "Non-text selection" is set to "Only when explicitly copied", but it doesn't work. I need to select "Never save in history", apply changes, and select "Only when explicitly copied" again to make it work. 

When hitting "Defaults" that option changes from "Only when explicitly copied" to "Never save in history" on a fresh install of Fedora 41 KDE.
Comment 39 madness742 2025-04-09 00:49:54 UTC
(In reply to madness742 from comment #38)
> I can still reproduce this on Fedora 41 KDE with the default settings.
I forgot to mention that I'm on Plasma 6.3.4.
Comment 40 Fushan Wen 2025-04-09 00:55:42 UTC
(In reply to Bug Janitor Service from comment #27)
> A possibly relevant merge request was started @
> https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/171

For anyone who can still reproduce it, can you try this patch?
Comment 41 Fushan Wen 2025-04-10 14:46:18 UTC
Git commit a0e02854f5874100bcc0b4d12531f539ef950484 by Fushan Wen.
Committed on 10/04/2025 at 14:46.
Pushed by fusionfuture into branch 'master'.

systemclipboard: use QFile to write data to file descriptor

Someone in the bugreport says CopyQ is better than Plasma's
clipboard manager. I checked the difference and CopyQ uses
QFile to write data to a file descriptor. QFile will check if
all bytes are written, and when not all bytes are written and
there is no error, QFile will continue writing to the file descriptor.

M  +14   -2    src/systemclipboard/waylandclipboard.cpp

https://invent.kde.org/frameworks/kguiaddons/-/commit/a0e02854f5874100bcc0b4d12531f539ef950484
Comment 42 Fernando M. Muniz 2025-04-13 09:24:16 UTC
(In reply to Nate Graham from comment #36)
> Fernando, can you still reproduce this in Plasma 6.3.4?

Can confirm.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz
Memory: 8.1 GB of RAM
Graphics Processor 1: NVIDIA GeForce GTX 1650
Graphics Processor 2: Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 82MG
System Version: IdeaPad Gaming 3 15IHU6
Comment 43 Xavier Corredor Llano 2025-04-13 14:05:21 UTC
In my particular case, after using the latest updates with the patches for a few days, I was no longer able to reproduce the error!. However, since this error is very rare and specific, I'm not sure it fixes every case, but it does improve a lot (100% in my case) with Fushan Wen's patches, Thank you!!
Comment 44 Fushan Wen 2025-04-17 03:22:14 UTC

*** This bug has been marked as a duplicate of bug 502831 ***
Comment 45 Bug Janitor Service 2025-04-24 13:50:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5428
Comment 46 Andrea Ippolito 2025-04-24 13:59:08 UTC
(In reply to Andrea Ippolito from comment #33)
> Sharing some good news (so far): could not reproduce on 6.3.4
> 
> I got this update from my distro yesterday, and this morning back to work in
> IntelliJ IDEA, I can copy multiple things to the clipboard, and pick and
> choose what I want to paste from it, and it works as it's supposed to.
> 
> I hesitate setting this back to "REPORTED" - if someone else on 6.3.4 could
> share their (hopefully positive) feedback too, maybe it could be directly
> closed instead.
> 
> Thanks

Just experienced this again today, after a long time without issue.

On IntelliJ IDEA like in the past.

The issue is definitely still there, but for some reason much rarer, at least for me.
Comment 47 Fushan Wen 2025-04-24 14:33:19 UTC
Git commit fc04e94e344c99e924bf8ea6d7d9dc02e8b24e68 by Fushan Wen.
Committed on 24/04/2025 at 13:48.
Pushed by fusionfuture into branch 'master'.

appiumtests: relax test conditions in test_5_3_bug491961_mimetypes

Clipboard on Wayland is known to be flaky for a long time, so until
it finally becomes usable the test conditions has to be relaxed.
Related: bug 443265

M  +7    -10   appiumtests/applets/clipboardtest.py

https://invent.kde.org/plasma/plasma-workspace/-/commit/fc04e94e344c99e924bf8ea6d7d9dc02e8b24e68
Comment 48 Fernando M. Muniz 2025-08-21 15:27:38 UTC
Created attachment 184313 [details]
New bug?

Operating System: Arch Linux 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-11300H @ 3.10GHz
Memory: 9 GB of RAM (8.1 GB usable)
Graphics Processor 1: NVIDIA GeForce GTX 1650
Graphics Processor 2: Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 82MG
System Version: IdeaPad Gaming 3 15IHU6
Comment 49 TraceyC 2025-08-21 17:01:16 UTC
(In reply to Fernando M. Muniz from comment #48)
> Created attachment 184313 [details]
> New bug?

This does indeed look like a new bug. The original problem reported here was that things were being copied into the clipboard, but couldn't be pasted until copying the text within the clipboard.

In the screen recording you just attached, the text isn't being copied into the clipboard at all. Please create a new report. Thanks!