Bug 2016563 - Cannot copy/paste to/from KDE VMs
Summary: Cannot copy/paste to/from KDE VMs
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: spice-vdagent
Version: 37
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Christophe Fergeau
QA Contact: Fedora Extras Quality Assurance
Whiteboard: https://ask.fedoraproject.org/t/we-ar...
Depends On:
Blocks: F36BetaFreezeException
TreeView+ depends on / blocked
Reported: 2021-10-21 23:10 UTC by Adam Williamson
Modified: 2022-10-11 11:04 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

Description Adam Williamson 2021-10-21 23:10:32 UTC
If you run a Fedora 35 KDE virt-manager (qemu/SPICE) VM on a Fedora 35 host, you cannot copy/paste to or from the guest. Doing this with a Fedora 35 Workstation guest works fine.

Notes about the problem from IRC:

apol: I looked into it some days ago
Conan Kudo: oh?
apol: vd_agent, doesn't pick it up
apol: https://gitlab.freedesktop.org/spice/linux/vd_agent/-/commit/ca4dd7e8119e285ee9fee34ebaf151a759814b5d < this is the code in question
apol: I didn't go as far as to try to fix it though, but if someone knows how I can easily look into it from my development system I might be able to look into it
Conan Kudo: hmm, I guess we need to adjust spice-vdagent then
apol: quite possibly
apol: we have the necessary code in klipper and kde connect already, it's a matter of implementing it there I suppose

Proposing this as an FE issue for F35 Final, as it's very annoying and I *think* the fix will be client side, so if we don't fix it before final, the bug will always exist when booting the KDE live image...

Comment 1 Geraldo Simião 2021-10-22 13:10:33 UTC
Adam, I tested here four setups on my F35Kde host and F35kde guest and found that:

Host X11 / Guest Wayland => copy/paste doesn't work
Host X11 / Guest X11 => copy/paste WORK
Host Wayland / Guest Wayland => copy/paste doesn't work
Host Wayland / Guest X11 => copy/paste WORK

So, when guest is in xorg session copy paste allways work, and when guest is in wayland session, copy paste allways don't.
Hope this help in something for the fix process.

Comment 2 Aleix Pol 2021-10-22 16:12:12 UTC
Correct, on guest plasma wayland, we need to have ways for clients to talk to vdagent without giving vdagent focus. Much like we've had to do for the clipboard history applet and kde connect.

FWIW, it should work now with Guest Wayland but copying from an XWayland application, since vdagent is in XWayland mode for some reason.

Comment 3 Adam Williamson 2021-10-25 19:39:49 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/565 , marking accepted. Any chance anyone's figured out a fix for this?

Comment 4 Geraldo Simião 2022-03-15 00:00:09 UTC
This bug still persists, both on F35 with last updates and on F36 too, and behaves the same at F36:

Host X11 / Guest Wayland => copy/paste doesn't work
Host X11 / Guest X11 => copy/paste WORK
Host Wayland / Guest Wayland => copy/paste doesn't work
Host Wayland / Guest X11 => copy/paste WORK

So @awilliam can we set this to F36 and call it for FE too?

Comment 5 Adam Williamson 2022-03-15 00:02:17 UTC
Yeah, I'm still seeing it too :( Was hoping someone would've fixed it by now. Proposing for Beta FE.

Comment 6 Adam Williamson 2022-03-15 17:51:46 UTC
+4 in https://pagure.io/fedora-qa/blocker-review/issue/666 , marking accepted.

Comment 7 zpangwin 2022-05-19 20:09:44 UTC
Confirming that I still see this issue with Fedora 36 KDE

Fedora 35 Cinnamon with virt-manager.noarch 3.2.0-5.fc35

Fedora 36 KDE with spice-vdagent already installed.

[test@fedora ~]$ inxi -S
  Host: fedora Kernel: 5.17.5-300.fc36.x86_64 arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.24.3 Distro: Fedora release 36 (Thirty Six)

While guest is running Wayland session, copy/paste between guest and host does not work. Logging out and having guest use X11 session, it works fine again.

Comment 8 Aleix Pol 2022-05-19 21:31:57 UTC
https://gitlab.freedesktop.org/spice/linux/vd_agent/-/blob/master/src/vdagent/clipboard.c < This seems to expect GTK to handle clipboards properly but it does not seem to.

Wild guess would be they might have implemented a gnome-specific protocol in there? There is no clipboard monitoring standard, we Plasma are using wlr-data-control-unstable-v1.xml from wlroots and I can imagine that GTK didn't bother with it. I have not double-checked.

I am not sure what's a good way forward as I am no GTK or vdagent developer.

I guess a good first step would be to open a ticket upstream in vdagent.

Comment 9 Adam Williamson 2022-10-11 11:04:01 UTC
Still valid on F37. Did anyone open an upstream ticket yet?

Note You need to log in before you can comment on or make changes to this bug.