SUMMARY Some variations of this bug seem to have been reported some years ago. In KDE, copy paste seems to not work occasionally. This is happening in X, unlike some previous bug reports which indicated the bug was only on Wayland. Sometimes, the copy to clipboard function will simply not work (either my mouse clicking or keyboard Ctr+C). This behaviour seems to be random and there seems to be no correlation between GTK or Qt apps. Repeating the copy to clipboard some times will eventually copy the intended element but this is very annoying. If anything, I noticed this happens more between different programs rather than between the same program, but I might be wrong. STEPS TO REPRODUCE Due to the randomness of this bug, its not exactly clear how to reproduce. 1. Copy an element to clipboard 2. Paste somewhere else OBSERVED RESULT Any item should be copied after the first copy has been issued, either by mouse or keyboard. EXPECTED RESULT Sometimes, pasting will either pasting the previously copied element or nothing at all, if no previous element was present on the clipboard, indicating that the copy didn't work. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux 5.13.6-arch1-1 KDE Plasma Version: 5.22.4 KDE Frameworks Version: 5.84.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION Not much I can add, this is a really random and difficult to reproduce bug. I asked in Reddit and some people report the same. Reddit link: https://www.reddit.com/r/kde/comments/oxww24/kde_copy_paste_still_broken/
I swapped the OBSERVED RESULT with EXPECTED RESULT by accident. I can't seem to edit the original text.
On X11 KDE is not involved anywhere copying and pasting between clients. The only thing that can meddle with this is klipper - our clipboard manager. Please can you try disabling this (remove the applet) and confirm if this changes things.
Ok. I managed to narrow down when the bug happens. Basically, in the reddit post, I was told this is related to an X bug that causes the clipboard to be emptied if the source application is closed. This bug indeed only seems to happen when closing a program and pasting some content from it afterwards. But this is only happening in a very peculiar situation. I hid the clipboard manager applet from the tray "Deactivated". This is the only time the bug happens. If the applet is visible or just collapsed into the tray list, the bug doesn't occur. So its actually disabling klipper that causes the bug. This is very annoying as this means I am forced to have an applet that leaks everything I have been copying and pasting when I absolutely do not want this feature. Also, when changing options in the applet, the KDE shell crashed sometimes, so clearly the applet is very unstable.
If you want contents to persist after an app is closed you will need to use klipper.
But technically this is an X bug then isnt it? And klipper is solving it? And since I cannot disable klipper, how do I disable the paste history thing?
>But technically this is an X bug then isnt it? And klipper is solving it? Not really a bug, it is expected X behaviour that closing an application means you can't copy from it. The real data copying only actually happens when you paste. Klipper resolves this by constantly copying any new text into a history so that we always have the contents. So you need the history in order for it to work. You can reduce the number of items stored.
I am very sorry then for assuming this was a bug all along. I had no idea Klipper could have its history reduced. Doing that fixes all my problems. I just want to thank you a lot for your time and I deeply apologize opening a bug report for a non bug. Thanks a lot for all the feedback!
no problem