Điểm:1

vkcube black display

lá cờ 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
lá cờ cn
Đây có phải là chương trình 32 bit không?
lá cờ vn
Không: tệp /usr/bin/vkcube -> Đối tượng chia sẻ LSB 64-bit ELF, x86-64
David avatar
lá cờ cn
Đây là lý do tại sao tôi hỏi bạn. https://support.oneidentity.com/kb/307090/error-when-running-sudo-commands-wrong-elf-class-elfclass32- Nó báo rằng bạn đang cố DL một thứ 32 bit trong môi trường 64 bit.
lá cờ vn
À, vậy, các thư viện thiết bị là 64 bit nhưng vulkan mong đợi 32 bit? Làm thế nào để tôi hòa giải điều này?
David avatar
lá cờ cn
Không biết tôi chỉ nhận thấy họ đã sai.
lá cờ vn
Cảm ơn. Bài đăng liên quan có liên quan: https://www.reddit.com/r/pop_os/comments/lj2qqw/issues_with_vulkan_driver_in_a_fresh_install_of/
muru avatar
lá cờ us
Vui lòng không thêm "đã giải quyết" vào tiêu đề. Nếu bạn có một giải pháp, xin vui lòng gửi một câu trả lời.
lá cờ vn
@muru đã xóa "đã giải quyết" khỏi tiêu đề như bạn đã đề xuất. Bài đăng đã được cập nhật khi tôi khắc phục sự cố cho đến khi nó hoạt động nên việc thay đổi tiêu đề có ý nghĩa đối với tôi. Cảm ơn đã cho tôi biết rằng đây là một thủ tục không chính thống. Tôi sẽ kiềm chế điều đó trong tương lai.
Điểm:0
lá cờ cn

Không hữu ích cho OP nhưng đối với các hệ thống nvidia khác, hãy thử xuất VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json

Điều này xuất phát từ một mặt trăng bài diễn đàn.

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.