Closed S-Dafarra closed 2 years ago
Running vulkaninfo
on CI fails with the error
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
/build/vulkan-tools-KEbD_A/vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:371: failed with ERROR_INCOMPATIBLE_DRIVER
Error: Process completed with exit code 255.
See https://github.com/ami-iit/yarp-device-openxrheadset/runs/6303508564?check_suite_focus=true
Summoning @traversaro, in case it does ring some bell
Which version of mesa is used (apt show mesa-common-dev
)? Perhaps updating the mesa version via a dedicated ppa (such as https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers) could be useful.
It could also be useful to try to make sure that a software-only vulkan driver is used, I guess by setting the LIBGL_ALWAYS_SOFTWARE=true
option.
Indeed, from https://www.phoronix.com/scan.php?page=news_item&px=Lavapipe-Vulkan-1.3-Turned-On it seems that to use a conformant enough lavapipe (i.e. software vulkan) driver you need a recent mesa, for sure not the one provided in Ubuntu 20.04 .
Which version of mesa is used (
apt show mesa-common-dev
)?
From the last CI run:
Get:23 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 mesa-common-dev amd64 21.2.6-0ubuntu0.1~20.04.2 [1504 kB]
Mesa 21.2.5 was released in October 2021: https://www.mesa3d.org/news/releases/mesa-21-2-5-is-released/ while 21.3.0 in November, hence the inclusion mentioned in https://www.phoronix.com/scan.php?page=news_item&px=Lavapipe-Vulkan-1.3-Turned-On is definitely not there
I have used the ppa of https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers and the mesa version is 22.2~git2205050600
, but still I was not able to launch vulkaninfo
. I got the error
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
/build/vulkan-tools-KEbD_A/vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:371: failed with ERROR_INCOMPATIBLE_DRIVER
After reading the description in https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers, I also tried
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json MESA_LOADER_DRIVER_OVERRIDE=zink vulkaninfo
to use zink + lavapipe OpenGL emulated on a software Vulkan driver
, but I got the error
/build/vulkan-tools-KEbD_A/vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:458: failed with ERROR_INITIALIZATION_FAILED
Error: Process completed with exit code 255.
I finally managed to check the vulkan
extensions in https://github.com/ami-iit/yarp-device-openxrheadset/commit/bde034310b4c9334d6157a88d692da8fe65bd6f1. Basically the mesa-vulkan-drivers
package was missing. I also followed https://wiki.archlinux.org/title/Vulkan#Software_Vulkan:_lavapipe to run the vulkaninfo
command. The problem then is that the following two extensions are missing:
VK_KHR_external_semaphore_fd
VK_KHR_external_fence_fd
I have tried opening an issue on the Monado side: https://gitlab.freedesktop.org/monado/monado/-/issues/170
For the time being, I disable the testing. It will remain in hold until I get some feedback in https://gitlab.freedesktop.org/monado/monado/-/issues/170.
Relevant PR: https://github.com/ami-iit/yarp-device-openxrheadset/pull/15
I am working on this in the branch
ci
: https://github.com/ami-iit/yarp-device-openxrheadset/tree/ciThe pipeline using
conda
works fine. I am also trying to have a pipeline inUbuntu
usingmonado
as runtime to run a test. The problem here is thatmonado
requires to run a GUI, and this is problematic in the GH Actions.When running
monado
normally, I get the following error:I have tried using
xvfb-run
to runmonado
headless, and I have the following outputThen, I tried to follow https://github.com/godotengine/godot/pull/47414 and use
SwiftShader
, but with no result.Checking the error in the
monado
source code, I found that it is triggered here: https://gitlab.freedesktop.org/monado/monado/-/blob/add6ed34b65ea664e2bc58feb3e5d15cbfa4f8b7/src/xrt/compositor/util/comp_vulkan.c#L234-258Hence, I think it is related to a missing extension in the Vulkan implementation.
The
monado
required extensions are defined in https://gitlab.freedesktop.org/monado/monado/-/blob/add6ed34b65ea664e2bc58feb3e5d15cbfa4f8b7/src/xrt/compositor/main/comp_compositor.c#L564-598It is possible to check the available Vulkan extensions running
vulkaninfo
from thevulkan-utils
package.The required extension should be: