Score:2

copy/paste between different programs stops working under Ubuntu 21.04

us flag

My OS:

Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute

I've installed it days ago on my Dell Latitude 7420, and also have a bunch of other problems, reported here -- but I hope they are not related to this one, so I don't repeat them here. Also note that the problem here (in the current post) also occurs when the other problem (in the linked post) does not occur, so they seem independent.

The problem: Sometimes during working, i.e., 'some time' after the reboot, copy/pasting is only possible within the same program, but not between different programs -- at least not in both directions. :) For example: After copying a URL from firefox I can insert it again into the URL bar, but I cannot insert it into kile, another text editor, or keepass2. After the insertion command (no matter whether via CTR+V or via right-click menu, the respective goal application freezes a while, but after it reacts again, nothing happens. Strangely, I found out that copying text into certain directions is still possible. For example, copying text in keepass2 allows me to insert it into the firefox URL field -- but not the other way round.

What causes that and how can I fix this?

I wasn't sure whether the problem is related to the one described here, so I've disabled Wayland to try out. But I don't know yet whether this helped since the problem only occurs sometimes -- and only after some while. So I have to wait and see...

FedKad avatar
cn flag
It is a known bug (or feature) that when you copy something from an application and then you close that application before pasting on to another, the data copied is lost. I hope you are not talking about this "feature."
Prof.Chaos avatar
us flag
Nope, that's not it (I read about that too while searching for a solution). It's really just a bug that occurs after the OS is running for a while. If the bug doesn't occur within the next days again it will be a save bet that it was caused by Wayland as well -- since that also caused a range of other problems. I will report back in a while. :)
Score:2
us flag

I strongly assume that this problem is now solved: It didn't occur for the last two days (after I've applied the solution described below), although it occurred quite frequently before. In case there are any experts here they can probably confirm/explain (via the comments) why this solution does indeed solve the problem. I don't know why, I can just tell that now all problems (there were more, all caused by the same issue apparently) are resolved.

First, some overview: I had the following problems:

  1. alt+tab did not work, and the red bullets next to the thunderbird icon in the navigation did not disappear, as described (and solved) here
  2. The left navigation stopped working at some point and even the entire OS sometimes froze completely, as described (and solved) here
  3. And of course I had this copy/paste problem as described in this entry here.

All problems were resolved in the very same way, extracted/copied from here. So please like that solution as well if this is helpful to you.

Solution/problem:

The problem is/was that Wayland is currently buggy. Wayland is a display server protocol used by Ubuntu 21.04. Its predecessor used Xorg instead.

This is how you can confirm that Wayland is used -- and how you can change it.

  1. Type echo $XDG_SESSION_TYPE --> It will print Wayland (I suppose).
  2. Type sudo gedit /etc/gdm3/custom.conf --> You will find the entry #WaylandEnable=false, from which you will have to remove the comment symbol, i.e., remove the #. I suppose that this will switch to Xorg again.
cn flag
Had the same problem (could not copy URL from Firefox to gedit or Vivaldi) with Wayland. Switched to Xorg. So far, seems to have helped.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.