问题
I'm trying to run a Vulkan-based graphical application on a headless Ubuntu 19.10 virtual machine, via xvfb.
Starting from a bare Ubuntu 19.10 image (created using lxc), I prep the machine as follows:
> sudo apt update
> sudo apt install -y xvfb mesa-vulkan-drivers vulkan-tools
I then run the following two commands:
In Terminal 1: Start XVFB
Xvfb :1 -screen 0 1024x768x24
In Terminal 2: Run vulkaninfo
> DISPLAY=:1 vulkaninfo
==========
VULKANINFO
==========
Vulkan Instance Version: 1.1.114
/build/vulkan-tools-IZAxVX/vulkan-tools-1.1.114.0+dfsg1/vulkaninfo/vulkaninfo.c:5884:
failed with VK_ERROR_INITIALIZATION_FAILED
(Running my own custom Vulkan application yields a similar failure.)
From what I understand, Xvfb depends on mesa, and I'm using Mesa 19.2.1
And, based on the Mesa 19.2.1 release notes, it is supposed to support Vulkan:
"Mesa 19.2.1 implements the Vulkan 1.1 API, but the version reported by the apiVersion property of the VkPhysicalDeviceProperties struct depends on the particular driver being used."
Question: Is it reasonable to expect that vulkan apps would work with xvfb on Ubuntu 19.10, especially since the latest mesa releases claim to support Vulkan?
Versions of relevant some packages that I'm using:
> apt-cache show xvfb | grep Version
Version: 2:1.20.5+git20191008-0ubuntu1
> apt-cache show mesa-vulkan-drivers | grep Version
Version: 19.2.1-1ubuntu1
> apt-cache show libvulkan1 | grep Version
Version: 1.1.114.0-1
> apt-cache show vulkan-tools | grep Version
Version: 1.1.114.0+dfsg1-1
来源:https://stackoverflow.com/questions/58631962/is-xvfb-with-mesa-19-2-compatible-with-vulkan