↓ Skip to main content

qxl, 'Buffer eviction failed' and a hung shutdown

If your VM’s kernel log shows this about every 15 seconds:

[TTM] Buffer eviction failed

it is running the qxl display driver, and the next shutdown can hang. What fixed it for me, as root:

echo 'blacklist qxl' > /etc/modprobe.d/blacklist-qxl.conf
reboot

Do it before the messages start if you can. Mine hung on the reboot after they had started, and I needed a hard reset to get out of it.

If you got here without that log line, the symptom on its own: a Linux guest stops partway through a shutdown or reboot and never comes back. It still answers ping, while SSH and anything else it serves refuse the connection, and only a hard power-off from the hypervisor ends it. The virtual machine is not stuck booting, it never finished going down. qxl is QEMU’s display device, so this can turn up on any QEMU host, whether that is Proxmox, libvirt/KVM, TrueNAS or something else. Look in the kernel log for the line above before you start suspecting the hypervisor.

What it looked like #

The VM is my Proxmox Backup Server. It runs on TrueNAS rather than on the cluster it backs up, for the obvious reason that the backup of those VMs has no business living on that same cluster, and it doubles as the quorum device for those two nodes. It has a SPICE display, and with it a qxl video device on PCI 00:02.0.

This was not the first time it did this. I do not know when it started. The earlier times I forced the VM off from TrueNAS and moved on, because nothing came of it beyond standing there again not understanding why a reboot would not finish. It took until that had happened often enough to annoy me before I went looking, and a search turned up nothing that made it look like a common problem.

During an update round on 21 November the playbook rebooted it at 12:10 and then waited. The VM answered ping. SSH, the web interface and the Checkmk agent refused connections, and only port 111 was still open. I assumed a boot that had stalled.

After a hard reset through TrueNAS, journalctl -b -1 showed the old boot still logging until 12:26. It had never got past the shutdown. Port 111 was rpcbind, which is socket-activated, so the socket probably outlived the service. The cluster stayed quorate on two of its three votes for those 16 minutes.

The trace #

The hung-task detector logged this (trimmed):

INFO: task systemd:1 blocked for more than 122 seconds.
Call Trace:
 ww_mutex_lock+0xec/0x100
 drm_modeset_lock+0x63/0x110
 drm_atomic_get_plane_state+0xa3/0x200
 drm_client_modeset_commit_atomic+0xb9/0x240
 drm_fb_helper_pan_display+0x103/0x270
 fb_pan_display+0x8b/0x160
 fbcon_switch+0x46b/0x640
 do_con_write+0x13fe/0x2450
 tty_write+0x11/0x20
INFO: task systemd:1 is blocked on a mutex likely owned by task kworker/0:2:1729193.

PID 1 was writing to the console, which a shutdown does a lot. Drawing on the framebuffer takes the DRM modeset lock, and the kernel reports that lock as likely owned by a kworker that was stuck here (also trimmed):

Workqueue: events drm_fb_helper_damage_work
 schedule_timeout+0x89/0x110
 qxl_fence_wait+0x15b/0x1e0 [qxl]
 dma_fence_wait_timeout+0x78/0x1b0
 ttm_bo_wait_ctx+0x53/0x90 [ttm]
 qxl_bo_move+0x4f/0x110 [qxl]
 ttm_bo_evict+0x135/0x190 [ttm]
 ttm_bo_validate+0x9a/0x190 [ttm]
 qxl_bo_create+0x177/0x240 [qxl]
 qxl_draw_dirty_fb+0x1be/0x530 [qxl]
 drm_fb_helper_damage_work+0x255/0x480

A console redraw needed a new buffer in video memory, qxl tried to evict an old one to make room, and the eviction waited on a fence that never signalled. It is the same eviction path the log had been complaining about. In the log the wait ended in an error. Here it never ended.

systemd was in uninterruptible sleep in that console write. PID 1 runs the shutdown, so it stopped there.

Five quiet days #

The VM booted on 15 November. The first Buffer eviction failed came on 20 November at 21:06, after five days without one. From then on it came roughly every 15 seconds, 3,594 times, until the reset fifteen hours later.

I don’t know what set it off on day five. A patch on the kernel list (below) claims that QEMU only works through the qxl command queue while a SPICE client is connected, and that without one the guest’s fences never complete. Normally nothing is connected to that display, so a missing client is plausible. I have not tested it.

What I changed #

With qxl blacklisted the console runs on simpledrm, the plain framebuffer the UEFI firmware leaves behind:

[drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0

On this VM, Debian 13 with Proxmox kernel 7.0.14, qxl is not in the initramfs, so udev loads it later and the modprobe.d file is enough. Check yours:

lsinitramfs /boot/initrd.img-$(uname -r) | grep qxl        # Debian, Ubuntu
lsinitrd /boot/initramfs-$(uname -r).img | grep qxl        # dracut

If it shows up, rebuild the initramfs after adding the blacklist (update-initramfs -u or dracut -f), or put modprobe.blacklist=qxl on the kernel command line.

The first reboot after the change took 40 seconds, three of them for the shutdown. This VM boots UEFI. I did not check what a BIOS guest falls back to. I also don’t know whether the TrueNAS console still shows output, or whether another video model would have fixed it too.

Upstream #

In 2021 a commit simplified qxl_fence_wait (5a838e5d5825), and the eviction failures were later traced back to it. A revert in April 2024 (07ed11afb68d) stopped them for the reporter, but deadlocked other VMs at boot on 6.9-rc6, and the original commit was reapplied a month later (3628e0383dd3). In Debian bug #1054514 a reporter wrote in December 2025 that it was back on trixie, with the same 15-second rhythm and systemd blocked for over 1,200 seconds.

In July 2026 Mikhail Novosyolov posted a patch that gives up on the wait after 30 seconds by default, below the default 120-second hung-task timeout. When I checked on 24 November I found nothing like it in mainline, and qxl_release.c there has not changed since February. I ran into this on Proxmox’s 7.0 kernel. The Debian report is on 6.12.

Checking your own machines #

lsmod | grep '^qxl'                                # driver loaded?
journalctl -k -b | grep -c 'Buffer eviction failed'  # this boot

A loaded qxl with a count of zero may simply not have hit it yet. Whether the blacklist fixed it for good I will know after a shutdown with more than five days of uptime. pbs has been up for almost three days.

Related