Рейтинг:1

vkcube black display

флаг vn

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
Это 32-битная программа?
флаг vn
Нет: файл /usr/bin/vkcube -> ELF 64-битный общий объект LSB, x86-64
David avatar
флаг cn
Вот почему я спросил вас. https://support.oneidentity.com/kb/307090/error-when-running-sudo-commands-wrong-elf-class-elfclass32- В нем говорится, что вы пытаетесь DL 32-битной вещи в 64-битной среде.
флаг vn
Итак, библиотеки устройств 64-битные, но vulkan ожидает 32-битные? Как мне с этим смириться?
David avatar
флаг cn
Понятия не имею, я просто заметил, что они были неправы.
флаг vn
Спасибо. Соответствующий пост по теме: https://www.reddit.com/r/pop_os/comments/lj2qqw/issues_with_vulkan_driver_in_a_fresh_install_of/
muru avatar
флаг us
Пожалуйста, не добавляйте "решено" к заголовку. Если у вас есть решение, напишите ответ.
флаг vn
@muru удалил слово «решено» из названия, как вы и предложили. Сообщение обновлялось по мере того, как я устранял неполадки, пока оно не сработало, поэтому изменение заголовка имело для меня смысл. Спасибо, что сообщили мне, что это неортодоксальная процедура. Я воздержусь от этого в будущем.
Рейтинг:0
флаг cn

Бесполезно для OP, но для других систем nvidia попробуйте экспортировать VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

Это происходит от лунарг пост на форуме.

Этот вопрос на других языках:

Ответить или комментировать

Большинство людей не понимают, что склонность к познанию нового открывает путь к обучению и улучшает межличностные связи. В исследованиях Элисон, например, хотя люди могли точно вспомнить, сколько вопросов было задано в их разговорах, они не чувствовали интуитивно связи между вопросами и симпатиями. В четырех исследованиях, в которых участники сами участвовали в разговорах или читали стенограммы чужих разговоров, люди, как правило, не осознавали, что задаваемый вопрос повлияет — или повлиял — на уровень дружбы между собеседниками.