Kde Plasma5 copy/paste not working

In kde plasma desktop I can select text in an app for copy using right click menu. The information goes into the clipboard. The copied info can be viewed in task bar “clipboard contents”. But, the info will not paste to a new selected location. It just does nothing. This feature was working a few days ago. It makes no difference if I try to paste into the same app or to another app, e.g., terminal. Very annoying.
Likewise, the keyboard commands ctrl-c will copy to clipboard but ctrl-v will not paste from clipboard.

I am in opensuse leap 15.3 with kde 5.18. If I log out of kde into mate 1.24 desktop the copy/paste feature works fine.

I have tried reboots and that does not solve problem. Perhaps a recent update to something caused the problem but I need it solved.

This is also posted on kde plasma forum.

Any ideas? thanks, tom kosvic

[RIGHT][/RIGHT]

FWIW - Copy/Paste working OK on two 15.3 systems here, both running:

Operating System: openSUSE Leap 15.3
KDE Plasma Version: 5.18.6
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.7

(Note though I’m using “Klipper” rather than “Clipboard”.)

Do you see the same behavior with a new test user?

I’ve noticed that, sometimes KDE Plasma “loses” the Paste context – for whatever reason …

  • Click the Pasteboard Plasmoid and “left click select” whatever it is you want to paste.

Once the selection in the Pasteboard is certain, a middle button paste or <Ctrl-V> should work …

I have reinstalled most of the kde packages a few files at a time. plasma-workplace includes klipper and that was reinstalled. No solution to the problem. This copy/paste issue wasn’t there a few days ago.

I am giving up plasma and staying with mate as trying to do programming w/o copy/paste is a real challenge. In mate I installed some keystroke definitions to the window tiling commands in “control center - keyboard shortcuts” and I can get as much tiling functionality as I had with the kwin tiling addons in plasma. I have copy/paste in mate.

I’ll try plasma periodically to see if any updates fix the copy/paste problem.

tom kosvic

Probably telling you something you already know; although installed, “klipper” won’t be used unless you enable it and disable “Clipboard”. ( Under: “Configure System Tray -> Entries -> System Services” ).

Also, have you tried creating a new test user to see if copy/paste exhibits the same problem?

In System tray - entries - system service in plasma, I disabled clipboard. There was no klipper option to start that process. After that, there still was no paste working.

I did create a new user and copy/paste did work as new user. I am very reluctant to tamper with all that i have in /home to move all old stuff to a new user. I have backups but still nervous.
What would you recommend as a next step? What could cause my current user to ignore copy/paste in plasma but not in mate?

Also, as additional info, I tried copy/paste in gnome and that also did not work. Copy/paste only works in mate and works in plasma as an alternate user.

thanks for your suggestions. Have a next step in plasma?

tom kosvic

Sorry, memory lapse on my part, it’s a while since I replaced Clipboard with klipper. ( https://paste.opensuse.org/view/raw/a857e21f )

Looking back on my notes it’s a rather convoluted process, if you want to try (although don’t immediately try this, see my last paragraph) then:

First disable Clipboard, then logout and log back in to the KDE desktop.
Start konsole, from there start klipper, ignore the “No protocol specified” message ( https://paste.opensuse.org/view/raw/beb8637b )
Klipper should now appear in the system tray, select “Quit”. ( https://paste.opensuse.org/view/raw/d3c0fab4 )
On the “Should klipper start automatically…” dialogue select “Start”. ( https://paste.opensuse.org/view/raw/5a60c476 )
Again logout from KDE, all subsequent logins should now use klipper.

I did create a new user and copy/paste did work as new user. I am very reluctant to tamper with all that i have in /home to move all old stuff to a new user. I have backups but still nervous.
What would you recommend as a next step? What could cause my current user to ignore copy/paste in plasma but not in mate?

Also, as additional info, I tried copy/paste in gnome and that also did not work. Copy/paste only works in mate and works in plasma as an alternate user.

thanks for your suggestions. Have a next step in plasma?

The purpose of testing with a new user was to establish if it was a system wide, which it seems not, or a user problem, which it seems it is.

Unfortunately, I’ve no idea what within your (KDE) user profile is causing this. :\

Prior to trying with klipper I would disable Clipboard, logout, login, then re-enable Clipboard to see if that brings it back to life. If still no luck It may be worth reporting as a bug over at KDE ( https://bugs.kde.org/ ) even if it’s not a bug per se the KDE developers (usually quite helpful) may be able to suggest the reason for the problem.

Just re-reading your initial post and I seem to missed your comment re the KDE forum post; so I would hold off on reporting a bug depending on the response on the (KDE) forum.

Afterthought…

On your normal user, when Clipboard is not working let’s see if it’s registered with dbus, could you post the output from:

dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply \
/org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -v '":'

Utterly bizarre, after two days on mate, I went back to plasma and logged in as original user (not new test user) and amazingly copy/paste was working. It works with right click - copy/paste and also with ctrl-c/ctrl-v. I was preparing an investigatory effort to determine what was wrong but now I will abandon it. I hate intermittent problems as much on the computer as with your car.
Below is the output from the command you sent.

(base) tom@mydesktop:~> dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DB
us org.freedesktop.DBus.ListNames | grep -v '":'
method return time=1634244941.941317 sender=org.freedesktop.DBus -> destination=:1.152 serial=3 reply_serial=2
   array 
      string "org.freedesktop.DBus"
      string "org.freedesktop.Notifications"
      string "org.freedesktop.Akonadi.Agent.akonadi_maildispatcher_agent"
      string "org.kde.klipper"
      string "org.pulseaudio.Server"
      string "org.kde.konsole-19188"
      string "org.freedesktop.Akonadi.Resource.akonadi_unifiedmailbox_agent"
      string "org.kde.GtkConfig"
      string "org.gtk.vfs.UDisks2VolumeMonitor"
      string "local.org_kde_powerdevil"
      string "org.kde.kglobalaccel"
      string "org.gtk.vfs.AfcVolumeMonitor"
      string "org.kde.keyboard"
      string "com.hplip.StatusService"
      string "org.freedesktop.Akonadi.Resource.akonadi_akonotes_resource_0"
      string "org.gtk.vfs.MTPVolumeMonitor"
      string "org.kde.Solid.PowerManagement.PolicyAgent"
      string "org.freedesktop.IBus"
      string "org.freedesktop.PowerManagement"
      string "org.freedesktop.portal.Desktop"
      string "org.freedesktop.Akonadi.Agent.akonadi_contacts_resource_0"
      string "org.gtk.vfs.Daemon"
      string "org.freedesktop.Akonadi.Agent.akonadi_unifiedmailbox_agent"
      string "org.gnome.Identity"
      string "org.freedesktop.Akonadi.Agent.akonadi_archivemail_agent"
      string "ca.desrt.dconf"
      string "org.freedesktop.portal.Documents"
      string "org.kde.plasmashell"
      string "org.kde.kdeconnect.daemon"
      string "org.gtk.vfs.GoaVolumeMonitor"
      string "org.freedesktop.Akonadi.Janitor"
      string "com.canonical.Unity"
      string "org.kde.StatusNotifierHost-17309"
      string "org.kde.kuiserver"
      string "org.freedesktop.impl.portal.PermissionStore"
      string "org.freedesktop.Tracker1.Miner.Files"
      string "org.freedesktop.Akonadi.Agent.akonadi_birthdays_resource"
      string "org.freedesktop.Akonadi.Resource.akonadi_birthdays_resource"
      string "org.kde.kappmenu"
      string "org.freedesktop.systemd1"
      string "org.kde.kdeconnect"
      string "org.kde.Wacom"
      string "org.freedesktop.Akonadi.Agent.akonadi_maildir_resource_1"
      string "org.freedesktop.impl.portal.desktop.gtk"
      string "org.kde.Startup"
      string "org.freedesktop.Akonadi.Resource.akonadi_maildir_resource_1"
      string "org.a11y.Bus"
      string "org.freedesktop.Akonadi"
      string "org.freedesktop.Akonadi.Agent.akonadi_ical_resource_0"
      string "org.gnome.keyring"
      string "org.kde.kscreen.osdService"
      string "org.freedesktop.Akonadi.Agent.akonadi_mailfilter_agent"
      string "org.freedesktop.PowerManagement.Inhibit"
      string "org.gtk.vfs.GPhoto2VolumeMonitor"
      string "org.freedesktop.impl.portal.desktop.kde"
      string "org.freedesktop.Akonadi.Agent.akonadi_akonotes_resource_0"
      string "org.freedesktop.ScreenSaver"
      string "org.freedesktop.Akonadi.NewMailNotifierAgent"
      string "org.freedesktop.Akonadi.Agent.akonadi_notes_agent"
      string "org.freedesktop.Akonadi.Agent.akonadi_sendlater_agent"
      string "org.freedesktop.Akonadi.Resource.akonadi_ical_resource_0"
      string "org.kde.kded5"
      string "org.kde.ActivityManager"
      string "org.freedesktop.Akonadi.Agent.akonadi_indexing_agent"
      string "org.kde.ksmserver"
      string "org.kde.kcookiejar5"
      string "org.kde.Shutdown"
      string "org.kde.kaccess"
      string "org.kde.korgac"
      string "org.kde.KScreen"
      string "org.kde.klauncher5"
      string "org.kde.Solid.PowerManagement"
      string "org.kde.screensaver"
      string "org.kde.KWin"
      string "org.freedesktop.Akonadi.NotesAgent"
      string "org.bluez.obex"
      string "org.freedesktop.Akonadi.Agent.akonadi_newmailnotifier_agent"
      string "org.freedesktop.Akonadi.Resource.akonadi_contacts_resource_0"
      string "org.freedesktop.Akonadi.Control"
      string "org.freedesktop.Akonadi.Agent.akonadi_followupreminder_agent"
      string "org.PulseAudio1"
      string "org.kde.polkit-kde-authentication-agent-1"
      string "org.freedesktop.Akonadi.MailDispatcherAgent"
      string "org.freedesktop.Akonadi.Agent.akonadi_migration_agent"
      string "org.gnome.OnlineAccounts"
      string "org.freedesktop.portal.IBus"
      string "org.freedesktop.Akonadi.Control.lock"
      string "org.kde.StatusNotifierWatcher"
      string "org.kde.JobViewServer"
      string "org.freedesktop.secrets"
      string "org.freedesktop.IBus.Panel.Extension.Gtk3"
   ]
(base) tom@mydesktop:~> 

I will delete my test user now to see if, for whatever reason, the original user might revert back to copy/paste not working.

If you spot anything out of sorts in the command output, let me know. Thanks for thinking about my problem.

tom kosvic

Yes, intermittent problems can be hard to track down.

There are several bug reports over at KDE regarding failure of copy/paste, mostly they go unresolved as the developers are unable to replicate the issue. I’ve been using KDE now since V3 and, so far, have not had any copy paste problems. I very much suspect it is down to the particular configuration a user has, possibly some other piece of software that also manipulates the clipboard, but that is pure speculation.

Occasional “odd” problems with KDE/Plasma can sometimes be “cured” by either restarting Plasma by bringing up “krunner” with alt-space and then issuing the command:

kquitapp5 plasmashell; kstart5 plasmashell

Or by simply logging out/in of the desktop.

Obviously neither of those actions address the underlying cause, but they may well get the system working again, until such time can be devoted to a more thorough investigation.

Below is the output from the command you sent. … If you spot anything out of sorts in the command output, let me know.

“org.kde.klipper” shows the backend for the clipboard is registered with dbus, which is what I would expect to see on a working system. (klipper is the name of the back-end, it’s only the system tray widget that is named “Clipboard”). If you find copy/paste not working again, then the output of that command at the time may be useful to see, if only for elimination purposes.

I also saw other threads showing the intermittent nature of this problem and no fixes.

Appreciate your bird dogging this issue for me. I put your suggestions for a re-occurrence of the issue in a note file. If it happens again and the fixes don’t work, this can be reconvened.

tom kosvic

Again, plasma copy/paste has stopped working. I made no changes to any plasma structure or themes or desktops, or taskbars. I only ran some apps like a browser, an editor and a terminal. Suddenly copy/paste does not work through right click window or keystrokes.

Afterwards, I did run plasma shell stop and restart. This did not change anything.

I couldn’t run the long dbus list command suggested to see if klipper was running in dbus shown above as I couldn’t get the typing straight since I couldn’t copy/paste it.

Now, I’m going back to mate.

I will post update to kde forum

tom kosvic

OK… Not an easy one to track down. It’s highly improbable that Copy/Paste will just stop working of it’s own volition. There will be a sequence of “events/actions” that are causing it to fail, the problem now is finding exactly what they are; until you are able to reliably say “do this ‘whatever’, and copy/paste stops working” it will be almost impossible to find the bug.

One setting that may possibly, depending upon how you are using copy/paste, be relevant: Check to see that “Prevent empty clipboard” is enabled in the clipboard settings. (That controls the retention of clipboard contents when the application that is the copy source is closed prior to the clipboard contents being pasted.)

Afterwards, I did run plasma shell stop and restart. This did not change anything.

Does logout-login (as the same user) restore the clipboard function?

If not, does a reboot and login (as the same user) restore the clipboard?

I couldn’t run the long dbus list command suggested to see if klipper was running in dbus shown above as I couldn’t get the typing straight since I couldn’t copy/paste it.

Provided you are logged in as the same user that previously issued the command you should be able, at a command line prompt, to use the bash history (up/down keyboard navigation keys allow you to cycle through previously issued commands) to re-issue the wanted command.

Based upon your perseverence, I logged back into plasma for a copy\paste test. Again, the copy works as a copied item shows up in clipboard but paste from right click or keystrokes does not work to paste into any app, e.g. terminal…

Something new though. I typed the long dbus command into terminal. First as root; Got message back saying:

“Failed to open connection to “session” message bus: did not receive a reply, etc…” Sorry for no code tags as I can’t paste so I had to type terminal response…

As a user dbus was a command not found.

The dbus command did work when copy/paste worked for a brief period in plasma. I posted results above.

Perhaps there is a clue here. Not familiar with dbus so I have no useful input.

back to mate now. thanks, tom kosvic

Better to use bash history as outlined in the last para of post #14 rather than typing the command, may have been a typo…

I don’t think at this point I’m able to offer any more suggestions. If you wanted to troubleshoot this further then you need to be prepared to devote some time to it, I don’t think it will be an easy task though.

Konsole has its own commands for copy-paste, Ctrl-C never works as copy.

Ctrl-shift-c and ctrl-shift-v to copy and paste in terminal/knosole or if konsole select from menu.

When working with a terminal, I normally use middle-click to paste.

It’s complicated. With an X11 session, there is a select buffer and a copy buffer. Middle-click pastes from the select buffer, but not from the copy buffer. In a Konsole session, CTRL-SHIFT-V pastes from the copy buffer, but not from the select buffer.

If I select text in my browser, and then use CTRL-C, that text will finish up in both buffers. But if I later select something else (say to erase some text in the browser edit), that will replace what was in the select buffer. It won’t replace what is in the copy buffer unless I use CTRL-C. And some applications mess with buffer content, so that things temporarily don’t work.

@nrickert

Nice summary, and I wonder if it’s that behavior which is causing the OP to believe copy/paste is not working, however, in the initial post:

It states “This feature was working a few days ago.”, so I’m not too sure if this is a misunderstanding of how copy/paste works or a bug, I was working on the assumption of the latter.