spice-vdagent clipboard ownership copy-and-paste problems
Original report rhbz#1600798 and gentoo#8221522
Description of problem:
I have a gentoo guest running inside KVM/qemu/virt-manager under a gentoo host. Everything works beautifully except copy-and-paste which only occasionally works. Even within the VM (not cross host<->guest) the copy-and-paste doesn't work. It seems to work the first time, but afterwards when I try to paste it doesn't work and also freezes xorg/terminals for 10 seconds.
I am constantly seeing these in my messages log:
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:06 triton spice-vdagent[2378]: primary: received clipboard req while not owning guest clipboard
Jul 12 12:37:21 triton spice-vdagent[2378]: primary: selection requests pending on clipboard ownership change, clearing
While these seem to be very clear error messages I could google, it comes back with nothing helpful. Maybe I've configured something incorrectly because otherwise I can't see how this isn't a common issue. spice-vdagent and qemu-guest-agent are both running on the guest. Their /etc/conf.d files have not been changed from their defaults (ie all comments). virtio uinput has been compiled in the kernel as a module and is loaded when I check lsmod.
I can confirm that this also messes with copy-and-paste on the host system as well. I'm having problems selecting words/sections on the host. If I shut down the VM the problem goes away.
Bug is also documented on Gentoo forums at: https://forums.gentoo.org/viewtopic-p-8221522.html
--
Version-Release number of selected component (if applicable):
spice 0.14.0-r1 spice-vdagent 0.17.0_p20180319-r1
How reproducible:
Carefully double-checked all setup instructions under Gentoo linux. Guest is also latest Gentoo linux. Double-checked permissions, group, and user setup.
Steps to Reproduce:
- Using libvirt and virt-manager, under Gentoo linux, set up a Gentoo linux guest
- Run spice-vdagent on guest.
- Run qemu-guest-agent on guest
Actual results: Copy and paste works the first time, but very sporadically afterwards.
Expected results: Copy and paste to work as expected inside guest, host, and between the two.
Additional info: Unable to find any information on Google regarding these error messages.
I personally suspect the problem might be permissions related, as looking at the code would seem to indicate that the Xorg clipboard owner is somehow incompatible with the user doing the copy-and-pasting.