FS#63881 - [virt-manager] Clipboard issues with gnome/mutter 3.34 and virt-manager (spice?)
Attached to Project:
Community Packages
Opened by Peet (orangecake) - Saturday, 21 September 2019, 21:47 GMT
Last edited by freswa (frederik) - Monday, 01 March 2021, 03:58 GMT
Opened by Peet (orangecake) - Saturday, 21 September 2019, 21:47 GMT
Last edited by freswa (frederik) - Monday, 01 March 2021, 03:58 GMT
|
Details
Description:
After finally upgrading to gnome 3.34, I am having some issues with virt-manager and its components. Steps to reproduce: - Boot up a vm which uses vdagent to support sharing the clipboard with the host (through spice) - copy a string to the clipboard (guest), paste it in an editor (in the host), this should work - copy another string or the same one, it really doesn't matter, and paste it in an editor again, this should not work and you should experience a small noticeable freeze/stutter. - by repeating this again, it should work and the cycle contininues Temporary fix: Simply copy the string twice. Additional info: * package version(s) Affected by this bug (3.34): gnome-desktop 1:3.34.0-1 gnome-session 3.34.0+2+g9d8b0709-1 gnome-settings-daemon 3.34.0-1 gnome-shell 1:3.34.0+148+g506b75fc7-1 mutter 3.34.0+30+gb5775e3d8-1 Not affected by this (3.32): gnome-desktop 1:3.32.2 gnome-session 3.32.0 gnome-settings-daemon 3.32.1 gnome-shell 1:3.32.2+11+g1c6abf378 mutter 3.32.2+43+gb7f158811 virt stuff: virt-manager 2.2.0-2 spice 0.14.2-1 spice-gtk 0.37-1 More notes: I have a feeling that this may have something to do with the recent changes in mutter, especially the new clipboard manager, but that is just speculation. |
This task depends upon
There are upstream patches which fixes race-conditions regarding ownership but this requires applying patches to various packages (vdagent, spice-gtk, spice-protocol). There were no patches for the win32 vdagent variant, so this was not viable for me to use, hence this simple patch which basically disables the clipboard-manager in mutter, which should restore the previous behavior, until major progress has been done upstream.
From 26b8caf24838e3d7c492a0b46329dee1290d0083 Mon Sep 17 00:00:00 2001
From: orangecake <me@orangecake>
Date: Thu, 3 Oct 2019 00:15:49 +0200
Subject: [PATCH] core: disable clipboard manager
---
src/core/display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/display.c b/src/core/display.c
index 82c9cd108..5df2e8c0c 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -785,7 +785,7 @@ meta_display_open (void)
display->bell = meta_bell_new (display);
display->selection = meta_selection_new (display);
- meta_clipboard_manager_init (display);
+ // meta_clipboard_manager_init (display);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_MANDATORY)
{
@@ -1021,7 +1021,7 @@ meta_display_close (MetaDisplay *display,
g_clear_object (&display->workspace_manager);
g_clear_object (&display->sound_player);
- meta_clipboard_manager_shutdown (display);
+ // meta_clipboard_manager_shutdown (display);
g_object_unref (display);
the_display = NULL;
--
2.23.0
@Peet, could you provide a little more detail on how you applied this patch? I'm happy to give it a shot to see if it's repeatable.
@Cedric, are you saying this is a bad idea from a stability standpoint, or simply feature-enablement?
@electricOzone The patch is mutter related, so you should probably rebuild the mutter package with the patch applied. I basically cloned the mutter repository and checked-out a new branch from the stable-branch and then applied the patch. You can then simply patch mutter's PKGBUILD to use your local repository and specify the according commit-hash.
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mutter-performance
It's basically mutter with extra patches, you can probably comment-out all the pick_mr patches and simply add another line:
patch -Np1 < "$srcdir/clipboard.patch" after you have also included the patch file in the sources.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/939#note_649176