Spice/QXL bug when using dual monitor setting with Ubuntu 22.04

mnovi

New Member
Mar 9, 2021
18
0
1
47
Hello,

I came across a weird bug when using Spice with configured dual monitor and 32MB of graphics memory (probably also reproducible with other multi monitor settings, but I'm using this one and cannot test more monitors). In my VMs I'm using Lubuntu and Xubuntu and with version 22.04 I cannot use dual monitor config anymore because after some time (approximately 10-20 minutes) with opened browser/VSCode (does not matter if installed via snap or deb) the session gets reset - first of all there is a freeze of UI and after some time the login window is displayed. Error logged in dmesg:

Code:
[  441.029743] qxl 0000:00:02.0: object_init failed for (266240, 0x00000001)
[  441.029805] [drm:qxl_gem_object_create [qxl]] *ERROR* Failed to allocate GEM object (262164, 1, 4096, -12)
[  441.029883] [drm:qxl_alloc_ioctl [qxl]] *ERROR* qxl_alloc_ioctl: failed to create gem ret=-12

If I'm using only terminal or other graphically non-intensive apps, there is no any problem at all. If I disable the second display in Spice client (and then use browser/VSCode) there is also no any error.

I'm not sure what exactly is causing this problem - I was using 32MB of graphics memory for all previous versions of OS and I believe this should be enough to run dual monitor config with full HD resolution on both. There are already some older reports on other forums regarding this error, but I don't think I can do anything about it as a user. I'm using latest Proxmox 7.2-7 and Lubuntu/Xubuntu 22.04 with all the upgrades.

Any feedback regarding this problem would be appreciated. Thank you in advance!
 
Last edited:
can you post the complete vm config? (qm config ID)
 
Code:
agent: 1
boot: order=scsi0;ide2;net0
cores: 4
ide2: none,media=cdrom
memory: 8192
meta: creation-qemu=6.1.1,ctime=1657628745
name: xubuntu2204
net0: virtio=D6:CE:13:38:5E:29,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: apool:vm-203-disk-0,size=40G
scsihw: virtio-scsi-pci
smbios1: uuid=da63d693-ffc5-439a-96b9-c79412e3b76f
sockets: 2
vga: qxl2,memory=32
vmgenid: ea66d333-fee9-4f5f-b7d2-73e57368b404
 
mhm.. i cannot reproduce here, my test vm with multiple spice displays runs since an hour with no problem (browser + some webgl demo inside)

what's your 'pveversion -v'
does it also happen with a different de ? (gnome + gdm for example?)
 
pveversion -v:
Code:
proxmox-ve: 7.2-1 (running kernel: 5.13.19-4-pve)
pve-manager: 7.2-7 (running version: 7.2-7/d0dd0e85)
pve-kernel-5.15: 7.2-6
pve-kernel-helper: 7.2-6
pve-kernel-5.13: 7.1-9
pve-kernel-5.15.39-1-pve: 5.15.39-1
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-4-pve: 5.13.19-9
pve-kernel-5.13.19-2-pve: 5.13.19-4
ceph-fuse: 15.2.15-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-3
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-3
libpve-storage-perl: 7.2-5
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.0-3
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.3-1
proxmox-backup-file-restore: 2.2.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-1
pve-container: 4.2-1
pve-docs: 7.2-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.4-2
pve-ha-manager: 3.3-4
pve-i18n: 2.7-2
pve-qemu-kvm: 6.2.0-11
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

I get the same dmesg error and behavior (UI freeze and login window) under Lubuntu (LXQt) and Xubuntu (XFCE), version 22.04. It happens when using either Chromium or Firefox with multiple tabs open. Usually when the problem appear I'm writing code in VSCode. This time for example, it appeared meanwhile I was typing this answer and did some corrections in textarea. The spice client I'm using is Virtual Machine Viewer 11.0.
 
just to clarify, ist that dmesg snippet from the original post from the guest or the host? (i guess guest?)
is there anything else in the guest log?

could you try to reproduce with a different guest? (especially a different kernel + xorg version ?)
 
dmesg snippet is from guest and this is the only error after other info messages from boot. I also checked dmesg on host, but there is nothing regarding this qxl error from guest.

I'm getting this error all from the initial 22.04 release - at first I was using only Lubuntu, but after that I tried Xubuntu to see if there will be the same problem. I installed all the updates as soon as they were available (both Lubuntu and Proxmox) during that time (from 22.04 release to now). I will also try with different kernel and xorg version and get another testing server (with different hardware) with fresh Proxmox install to see if this is related only to that specific machine.
 
After a few months of using VMs with Lubuntu 21.10 and 22.04 on the server where the described problem appeared, I'm still getting the same error on all of those VMs. I couldn't track down what exactly is the issue, except that this problem is only appearing on one server only and I can't reproduce it anywhere else. Other Windows based VMs on this server are working perfectly, so I don't know what should I do to get over it, as it's quite annoying when appears and if I don't have saved files.

Is there any other info I can provide to find the core of this issue?

I see that I didn't post kernel and xorg version, but I believe they don't have any special role there, as I updated them multiple times meanwhile ... kernel: 5.15.0-47-generic xorg: 2:21.1.3-2ubuntu2.1
 
mhm.. did you update your pve host in the meantime? ( asking because qemu 7.0 might have changed something)
also not really a solution, but you could try to use 'virtio-gpu' instead, we enabled spice support for that gpu too
 
ah ok that hints that it occurs on suspend resume, maybe that was what triggered it in your case?
however the bug seems to be in the guest driver, that means you probably have to simply wait until the kernel in the guest receives the fix (either via a new kernel or via a backport)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!