I am running a KVM with EndeavourOS as a guest (host is ProxmoxVE) and tried using SPICE to connect to it, but the performance is horrible (and by that I mean dreadful). Using VNC (both from gnome sharing but also by running Xvnc) works much much better. I do not understand this, as I expected SPICE to be much better-performing.
All I did in the EndeavourOS guest is install guest utilities with: yay -Sy qemu-agent-utils spice-vdagentd. I can see them running:
$ systemctl status spice-vdagentd qemu-guest-agent
● spice-vdagentd.service - Agent daemon for Spice guests
Loaded: loaded (/usr/lib/systemd/system/spice-vdagentd.service; indirect; vendor preset: disabled)
Active: active (running) since Wed 2022-01-12 18:22:59 GMT; 6s ago
TriggeredBy: ● spice-vdagentd.socket
Process: 883 ExecStart=/usr/bin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS (code=exited, status=0/SUCCESS)
Main PID: 886 (spice-vdagentd)
Tasks: 2 (limit: 9476)
Memory: 1.0M
CPU: 6ms
CGroup: /system.slice/spice-vdagentd.service
└─886 /usr/bin/spice-vdagentd
Jan 12 18:22:59 ironyman systemd[1]: Starting Agent daemon for Spice guests...
Jan 12 18:22:59 ironyman systemd[1]: Started Agent daemon for Spice guests.
Jan 12 18:22:59 ironyman spice-vdagentd[886]: opening vdagent virtio channel
● qemu-guest-agent.service - QEMU Guest Agent
Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-01-12 18:21:02 GMT; 2min 3s ago
Main PID: 434 (qemu-ga)
Tasks: 2 (limit: 9476)
Memory: 1.3M
CPU: 63ms
CGroup: /system.slice/qemu-guest-agent.service
└─434 /usr/bin/qemu-ga
Jan 12 18:21:17 ironyman qemu-ga[434]: info: guest-ping called
Jan 12 18:21:29 ironyman qemu-ga[434]: info: guest-ping called
Jan 12 18:21:40 ironyman qemu-ga[434]: info: guest-ping called
I am using virt-viewer version 10.0.256 to connect.
What can I do to improve performance? So far I have managed to make things better by:
Using X.org instead of Wayland (SIGNIFICANT speed-up from this)
Reduced resolution to 1680x1050
I have not found a way to reduce color-depth (both on the virt-viewer client and the display settings).
Does anyone know if it is possible to reduce color depth and/or anything else that might help?
So, yes that (arbiter) line is present even when I remove xf86-video-qxl and it still works. It also seems to use the modesetting driver:
[ 122.015] (==) Matched qxl as autoconfigured driver 0
[ 122.015] (==) Matched modesetting as autoconfigured driver 1
[ 122.015] (==) Matched fbdev as autoconfigured driver 2
[ 122.015] (==) Matched vesa as autoconfigured driver 3
[ 122.015] (==) Assigned the driver to the xf86ConfigLayout
[ 122.015] (II) LoadModule: "qxl"
[ 122.015] (WW) Warning, couldn't open module qxl
[ 122.015] (EE) Failed to load module "qxl" (module does not exist, 0)
[ 122.015] (II) LoadModule: "modesetting"
[ 122.015] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 122.017] (II) Module modesetting: vendor="X.Org Foundation"
[ 122.017] compiled for 1.21.1.3, module version = 1.21.1
[ 122.017] Module class: X.Org Video Driver
[ 122.017] ABI class: X.Org Video Driver, version 25.2
[ 122.017] (II) LoadModule: "fbdev"
[ 122.017] (WW) Warning, couldn't open module fbdev
[ 122.017] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 122.017] (II) LoadModule: "vesa"
[ 122.017] (WW) Warning, couldn't open module vesa
[ 122.017] (EE) Failed to load module "vesa" (module does not exist, 0)
[ 122.017] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 122.017] (II) modeset(0): using drv /dev/dri/card0
[ 122.017] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 122.017] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 122.017] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[ 122.017] (==) modeset(0): RGB weight 888
[ 122.017] (==) modeset(0): Default visual is TrueColor
[ 122.017] (II) Loading sub module "glamoregl"
[ 122.017] (II) LoadModule: "glamoregl"
[ 122.017] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[ 122.020] (II) Module glamoregl: vendor="X.Org Foundation"
[ 122.020] compiled for 1.21.1.3, module version = 1.0.1
[ 122.020] ABI class: X.Org ANSI C Emulation, version 0.4
[ 122.036] (II) modeset(0): Refusing to try glamor on llvmpipe
[ 122.037] (II) modeset(0): glamor initialization failed
[ 122.037] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[ 122.037] (II) modeset(0): Output Virtual-1 has no monitor section
[ 122.037] (II) modeset(0): Output Virtual-2 has no monitor section
[ 122.037] (II) modeset(0): Output Virtual-3 has no monitor section
[ 122.037] (II) modeset(0): Output Virtual-4 has no monitor section
[ 122.037] (II) modeset(0): EDID for output Virtual-1
[ 122.037] (II) modeset(0): Printing probed modes for output Virtual-1
[ 122.037] (II) modeset(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz eP)
...
So, this also looks suspicious when using QXL driver:
[ 639.936] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 639.936] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[ 639.936] (WW) Falling back to old probe method for modesetting
I wonder whether this is the reason QXL subsequently fails?
maybe but have you tried Virtio instead? considering Virtio/Virtio+Virgl is substantially faster than QXL. If it resolves your issue you get faster performance and problem solved.
I use spice for my VM using Virtio locally but im not sure about remotely. AFAIK using Virtio should work fine in that way but im not 100%.
I wonder if its just a spice thing in this case, do you have any image compression or anything enabled? Is it just EOS or any other distros? Spice i believe can get pretty sluggish over WAN at times or at least thats what ive heard ive never tried it.
So, when I switch Proxmox to use VirtIO for the VM, it stops providing the SPICE option in the console button (only VNC is available).
I like your suggestion about trying with anoter distro. I’ll create another VM with something non-Arch (maybe Fedora?) and see how SPICE performs there.
P.S. I use this over very fast WiFi, so not worried about WAN performance, but more about usability. TigerVNC with Xvnc so far give the best performance.
[ 23.247] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 23.247] (II) [KMS] Kernel modesetting enabled.
[ 23.247] (WW) Falling back to old probe method for modesetting
The main difference was that it has all drivers installed: it loaded qxl, modesetting, fbdev, and vesa successfully. I think I’ll try adding these to EndeavourOS and see if maybe they are relevant…