Hi everyone,
I’ve been working on packaging some wine applications as snaps and I discovered something interesting.
It looks like Vulkan is broken on many snaps I tried including my own.
I tried the following on Ubuntu 20.04/19.10 and Manjaro.
For example the Retroarch snap has broken vulkan implementation
Steps to reproduce:
- Ubuntu 18.04/19.10/20.04
- the NVIDIA Proprietary Drivers
sudo apt install vulkan-utils
- run
vulkaninfo
to check that you can get the latest vulkan info also you can runvkcube
to make sure your computer can render properly using vulkan. sudo snap install retroarch
- launch retro arch and go to settings>video>output>video and change the driver to vulkan press Esc a few times until the application closes.
- try to relaunch the app and see that it crashes right away.
I did some more investigations inside the retroarch snap shell and my own snaps using
snap run --shell retroarch
when running the following command
ls -lh $SNAP/usr/share/vulkan/icd.d/
the output only returns the json files for intel and radeon card
-rw-r--r-- 1 root root 163 Feb 19 07:09 intel_icd.x86_64.json
-rw-r--r-- 1 root root 164 Feb 19 07:09 radeon_icd.x86_64.json
back on my system I ran the following command
cat /usr/share/vulkan/icd.d/nvidia_icd.json
and got the following json output
{
"file_format_version" : "1.0.0",
"ICD": {
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.1.119"
}
}
It looks like the libGLX_nvidia.so.0
is the file its looking for
Back inside the snap I ran the following to try and find the nvidia so file
ls -lh $SNAP/usr/lib/x86_64-linux-gnu |grep -e 'libvul' -e 'libGLX_
and it seems to be missing
lrwxrwxrwx 1 root root 16 Feb 19 07:09 libGLX_indirect.so.0 -> libGLX_mesa.so.0
lrwxrwxrwx 1 root root 20 Feb 19 07:09 libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rw-r--r-- 1 root root 477K Feb 19 07:09 libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root 14 Jan 25 2019 libvulkan.so -> libvulkan.so.1
lrwxrwxrwx 1 root root 19 Jan 25 2019 libvulkan.so.1 -> libvulkan.so.1.1.70
-rw-r--r-- 1 root root 315K Jan 25 2019 libvulkan.so.1.1.70
-rw-r--r-- 1 root root 5.6M Feb 19 07:09 libvulkan_intel.so
-rw-r--r-- 1 root root 5.1M Feb 19 07:09 libvulkan_radeon.so
in my own snaps I also tried to add the following since i read it might help
layout:
/usr/share/vulkan:
symlink: $SNAP/usr/share/vulkan
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libGLX_nvidia.so.0:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libGLX_nvidia.so.0
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_intel.so
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libvulkan_radeon.so
also inside my own snap i’ve installed the vulkan utils and when running vulkaninfo
I get the following
===========
VULKAN INFO
===========
Vulkan Instance Version: 1.1.70
/build/vulkan-UL09PJ/vulkan-1.1.70+dfsg1/demos/vulkaninfo.c:2700: failed with VK_ERROR_INITIALIZATION_FAILED
Additional info about my Nvidia drivers
cat /sys/module/nvidia/version
440.64
Additional info about snapd
snap --version
snap 2.44.1
snapd 2.44.1
series 16
ubuntu 20.04
kernel 5.4.0-21-generic
Feel free to ask any questions.
-DM