I'm trying to get started doing some vulkan programming and am having difficulties with the development environment. While trying to troubleshoot I encountered some issues that might illuminate my configuration issues. How do I correct these development environment issues to make vkcube work?
vkcube
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
vulkaninfo | head -n 0
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_lvp.so: wrong ELF class: ELFCLASS32
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
uname -a
Linux ndconv 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
nvidia-smi
NVIDIA-SMI 460.91.03 Driver Version: 460.91.03 CUDA Version: 11.2
inxi -Gx
Graphics: Device-1: Intel HD Graphics 630 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0
Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: Lenovo driver: nvidia
v: 460.91.03 bus ID: 01:00.0
Display: x11 server: X.Org 1.20.11 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa
tty: N/A
OpenGL: renderer: GeForce GTX 1060 with Max-Q Design/PCIe/SSE2 v: 4.6.0 NVIDIA 460.91.03
direct render: Yes
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
cat $VK_ICD_FILENAMES | grep " "
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.2.155"
hwinfo --gfxcard
...
Device: pci 0x1c20 "GP106M [GeForce GTX 1060 Mobile]"
...
Driver Status: nvidiafb is not active
Driver Status: nouveau is not active
Driver Status: nvidia_drm is active
Driver Status: nvidia is active
Apparently the 32 bit errors for vulkaninfo are just vulkan trying all of the available drivers. See: Vulkaninfo output errors on Nvidia
Trying the command in the warning doesn't help (as suggested by : https://www.reddit.com/r/wine_gaming/comments/m7ircp/mesaintel_warning_performance_support_disabled/ ).
Tried https://github.com/SaschaWillems/Vulkan as a sanity test to see if maybe vulkan worked but vkcube didn't. Still a black screen. Likely a driver configuration error.
Very minimal change, tried downloading the newest vulkan version.
https://vulkan.lunarg.com/doc/sdk/1.2.189.0/linux/getting_started.html
Download, extract
source ~/vulkan/1.x.yy.z/setup-env.sh
vkcube works
I downloaded it to the applications folder and extracted it there. I then added the following lines to the end of my ~/.bashrc.
export VULKAN_SDK=~/applications/1.2.189.0/x86_64
export PATH=$VULKAN_SDK/bin:$PATH
export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
export VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/explicit_layer.d
I was at this point still getting errors (or a blank screen) when trying to run the examples from...
git clone https://github.com/SaschaWillems/Vulkan.git
cd Vulkan
python download_assets.py
cmake CMakeLists.txt
make
cd bin
./triangle
Everything worked after purging the mesa-vulkan-drivers.
sudo apt-get purge --auto-remove mesa-vulkan-drivers
restart, and try ./triangle again (worked)
As a sanity check,I commented out the ~/.bashrc lines I added previously, then repeated the prior clone steps and everything worked.