Is spice-vdagent required for Wayland?

I don't see the need to have spice-vdagent installed (that I understand is for virtual machine guest)

Finally, I found a solution confirming the way to disable it here:

Basically adding the line:

X-GNOME-Autostart-enabled=false

To the files:

/etc/xdg/autostart/spice-vdagent.desktop
/usr/share/gdm/autostart/LoginWindow/spice-vdagent.desktop

Then stop and disable the service:

$ sudo systemctl stop spice-vdagentd
$ sudo systemctl disable spice-vdagentd

And reboot.


spice-vdagent is used only in virtualized guest systems to provide features like sharing the clipboard with the host/client or dynamically resizing the virtual screen together with the client window. It has no use on bare-metal installations.

The error you describe was:

Cannot access vdagent virtio channel /dev/virtio-ports/com.redhat.spice.0

This is only natural on a non-virtual system, because /dev/virtio-ports/com.redhat.spice.0 is a special device created by compatible hypervisors to provide a spice channel for communication between guest and host/client. It does not exist on hardware, therefore any spice-vdagent instance running on a bare-metal system can not find such a device.

You can safely uninstall this package from your system, as you don't need it because it is not a virtual machine:

sudo apt purge spice-vdagent

Edit: Actually, on at least 18.04 and newer (not yet on 16.04), ubuntu-desktop depends on spice-vdagent, so trying to remove that will also uninstall the ubuntu-desktop metapackage. This would not directly remove your desktop, but it's still not too advisable probably. I wonder why the devs decided to make this a mandatory dependency, but I am still convinced it has no use on a bare-metal installation.


From the package's description (extracts only; typos preserved as-is; full output can be obtained by running apt show spice-vdagent):

Package: spice-vdagent
Homepage: http://www.spice-space.org/
Description: Spice agent for Linux
 spice-vdagent is the spice agent for Linux, it is used in conjunction with
 spice-compitable hypervisor, its feature includs:
 \* Client mouse mode (no need to grab mouse by client, no mouse lag)
   this is handled by the daemon by feeding mouse events into the kernel
   via uinput. This will only work if the active X-session is running a
   spice-vdagent process so that its resolution can be determined.
 \* Automatic adjustment of the X-session resolution to the client resolution
 \* Support of copy and paste (text and images) between the active X-session
   and the client

Additional links:

  • General overview on the whole spice technology and architecture
  • Red Hat Virtualization Deployment and Administration Guide - Spice Agent section