5

I noticed the following message in syslog:

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

I am running Ubuntu 18.10 on Wayland, so could I delete spice-vdagent? And if I did what effect would that have if I decided to run Ubuntu 18.10 under Xorg?

  • Are you running Ubuntu in a VM? Spice is one of a few protocols or technologies using which a virtual machine can communicate with its host to e.g. provide a shared clipboard or allow resizing the screen when you resize the host window. If you run Ubuntu on bare metal, you don't get anything useful from spice-vdagent. – Byte Commander Mar 16 '19 at 22:41
  • Maybe of interest: bugs.launchpad.net/ubuntu/+source/spice-vdagent/+bug/1800196 – DK Bose Mar 17 '19 at 2:00
  • @ByteCommander It's not clear (to me) that spice-vdagent is for the client alone - it seems that it might be used on the host also, to provide host to client transfers of the clipboard and such. – Charles Green Mar 17 '19 at 3:13
  • @Byte Commander. No, I am running Ubuntu 18.10 as the only OS on a new Corei7 laptop. – SteveInBavaria Mar 17 '19 at 8:33
  • @CharlesGreen I disagree, what you need on the host is not the spice-vdagent but a spice-compatible client, like e.g. virt-viewer. I can not find any use for the agent outside a virtualized guest system. – Byte Commander Mar 17 '19 at 13:54
2

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:

| improve this answer | |
  • Would I need it if I needed to run Android or Windows emulation software or VMs? – SteveInBavaria Mar 17 '19 at 14:43
  • Not on your host, no. It is only useful inside the virtual machines, if they support it. – Byte Commander Mar 17 '19 at 15:44
  • Sorry, i don't quite understand. If I decide to run a VM (or emulation) on my native Ubuntu 18.10 OS, would I need spice-vdagent in order fot the VM to run? – SteveInBavaria Mar 17 '19 at 16:09
  • 1
    No. Your Ubuntu host operating system, the one that is directly installed on physical hardware, never needs spice-vdagent installed. If you set up a virtual machine on your host, with another Linux system as guest, that guest system would profit from having spice-vdagent installed (on the guest system, still not on the host), but it would still run without the package. It just adds a few convenient features, as I described in the answer. – Byte Commander Mar 17 '19 at 16:13
  • 1
    Unfortunately, I tried sudo apt purge spice-vdagent - I did not however, want to remove ubuntu-desktop and gnome-desktop.... – Charles Green Mar 18 '19 at 0:37
4

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: https://bugs.launchpad.net/ubuntu/+source/spice-vdagent/+bug/1800196/comments/29

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.

| improve this answer | |
1

If you are not using desktop share, you can uninstall it. Or the next solution is to configure the spice server, and eventually close its startup.

Check here:

In ubuntu 19.04 configuration file you can find here

/sys/class/virtio-ports

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.