Score:1

vkcube black display

vn flag

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.

David avatar
cn flag
Is it a 32 bit program?
vn flag
Nope: file /usr/bin/vkcube -> ELF 64-bit LSB shared object, x86-64
David avatar
cn flag
This is why I asked you. https://support.oneidentity.com/kb/307090/error-when-running-sudo-commands-wrong-elf-class-elfclass32- It says you are trying to DL a 32 bit thing in a 64 bit environment.
vn flag
Ah, so, the device libraries are 64 bit but vulkan expects 32 bit? How do I reconcile this?
David avatar
cn flag
No idea I just noticed they were wrong.
vn flag
Thanks. Relevant related post: https://www.reddit.com/r/pop_os/comments/lj2qqw/issues_with_vulkan_driver_in_a_fresh_install_of/
muru avatar
us flag
Please don't add "solved" to the title. If you have a solution, please post an answer.
vn flag
@muru removed "solved" from the title as you suggested. The post was updated as I troubleshooted until it worked so changing the title made sense to me. Thanks for letting me know that this is an unorthodox procedure. I'll refrain from that in the future.
Score:0
cn flag

Not useful for OP but for other nvidia systems try export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

This comes from a lunarg forum post.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.