Copy & Paste unusable in KVM virtual machine (Ubuntu) when RStudio is running
1
vote
1
answer
1990
views
**Setup:**
Fedora 30 with a KVM/qemu virtual machine running Ubuntu 18.04.1.
(This setup because I want to run RStudio and on my Fedora 30, and it just barfs & dies immediately somewhere in the nouveau graphics subsystem -- but runs well in an Ubuntu VM).
**Problem:**
Copy & Paste in the VM is a right PITA when RStudio is running.
After the VM has been started, copy-paste between host and VM works well, and copy&paste inside the VM also works well (for example KWrite to KWrite)
Once RStudio has been started in the VM, copy & paste initially continues to work (a few times) but soon starts to "lock up". This applies to both RStudio and KWrite and happens both for in-VM and host-to-VM copy&paste. The receiving process in the VM freezes and apparently waits for something. However, the virtual machine continues to otherwise perform normally (e.g. you can exercise the shell, run
top
, iotop
etc.)
The receiving process wakes up again after 10-30 seconds, at which point the pasted text may have been received ... or not. After a first hiccup, pasting generally fails, and this includes copy-pasting from VM to host. Pasting in KWrite consistently takes 10s until the cursor returns without the clipboard content. RStudio behaves more catastrophically, sometimes killing the process is the only solution.
If one leaves the VM alone for some time, one again has the chance at a few successful copy-paste actions, then lockups occur again.
Restarting spice-vdagent
(systemctl start spice-vdagentd
) on the guest machine (not on the host where it does nothing apparently) interrupts a lockup and may give the occasion to perform a few copy-paste again. But that action is fraught with some risk as I had the whole GUI freeze at some point.
**How to solve?**
What should I be looking for?
I have used xclipboard
on the host to see what goes through the clipboard. Nothing unexpected seen.
**P.S.**
The VM has been given a lot of RAM (10GiB), which seems necessary as knitting even not-too-large knit files involving intensity maps will cause pandoc
to run out of memory.
RStudio sometimes freezes for itself for a couple of seconds when I'm working in it, again without locking up the whole system. Feels as if swapping or garbage collection was kicking in but nothing is going on I/O or CPU wise. Annoying but survivable.
Asked by David Tonhofer
(1517 rep)
Oct 16, 2019, 09:24 AM
Last activity: Oct 23, 2019, 07:50 AM
Last activity: Oct 23, 2019, 07:50 AM