Clipboard works unreliably

Using Manjaro with KDE and Wayland.

Sometimes, content is either not copied to clipboard or content shown in the clipboard widget can’t be pasted.

Two examples:

  1. Password Manager

Right click on an entry → copy username → paste username; no problem
Right click on an entry → copy password → username is pasted again; I have to copy the password a second time for it to appear in the clipboard widget and be pasted

I tried pasting in Firefox and KWrite, same behaviour.

  1. Pictures

In Firefox, right click picture, in gimp press ctrl+v → gimp says “There is no image data in the clipboard to paste”. However, the picture shows up in the clipboard widget.
I have to copy the picture a second time to be able to paste it anywhere (I also tried to paste in Drawing).

This is especially annoying when trying to make a screenshot with Spectacle, as that also fails to paste. I set Spectacle to also save the image to disk, so at least the content isn’t lost.

/ end of examples

So far, pressing ctrl+c and then ctrl+v within KWrite or gimp seems to copy reliably, so it might be related to whatever the context menus or Spectacle do.

I tried setting clipboard history to longer than one item, as in a different thread ( Newly copied text placed in 2nd position of clipboard - #7 by scotty65 ) someone had new entries appear in second place, but that is not the case here. Fun fact: In that thread someone said on KDE clipboard is powered by wl-clipboard, but according to Pamac I don’t have that installed. According to Pamac, I don’t have any package installed that contains the string “clip” (except Audacity and Inkscape…). And yet the clipboard (mostly) works.

I did notice that the password from first example isn’t shown in the clipboard widget when copied the first time, yet pictures are immediately in the clipboard widget but can’t be pasted.

Only thing I found in journalctl is
Jun 14 23:06:14 orbit kwin_wayland[1272]: kwin_xwl: Could not create a source from 0x5ad0fb9fbf50 0
when copying from the password manager, but that also appears when copying is successful.

System:
  Kernel: 6.12.28-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 15.1.1
    clocksource: tsc avail: hpet,acpi_pm
  Desktop: KDE Plasma v: 6.3.5 tk: Qt v: N/A info: frameworks v: 6.14.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: Manjaro base: Arch Linux

Unfortunately, I don’t know when the symptoms started - the first couple times I thought I might have just done something wrong. I’d guess a couple of weeks.

How can I make the clipboard work reliably?

I’ve had this issue on occasion. I think it’s more to do with websites using code to keep you from copying content. Maybe trying to copy text when it’s really graphics. Or lastly some weird formatting that causes it to be “invisible” Let’s see if someone smarter than me has an answer. ps I’ve had this problem mostly with X11, I’ve only been on Wayland for a couple of weeks now.

Which password manager?

1 Like

KeePass

Good idea - some websites do this - but I don’t think so. Firefox is involved in both examples because I happen to use it a lot.
Copying images fails even when I directly open a picture in a new tab; it works the second time I click copy; even Spectacle has issues.
Pasting text is also probematic in KWrite.

Sorry I don’t have experience with KeePass.

I don’t know if it uses a similar method as KeePassXC (which I use), when copying a password (as you described) it uses it’s own clipboard (which also clears itself after a short time - can be disabled if preferred.) and not the KDE/Plasma clipboard.