我想在Debian12上使用Vulkan,
uname
Linux 5.4.210.bsk.6-amd64 #5.4.210.bsk.6 SMP Debian 5.4.210.bsk.6 Fri Apr 7 15:18:32 UTC 2 x86_64 GNU/Linux
系统是 Debian 12 Bookworm
在我安装了mesa-vulkan-drivers时,vulkan会直接使用llvmpipe,并无法检测到GPU
vulkaninfo
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
'DISPLAY' environment variable not set... skipping surface info
...
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
llvmpipe (LLVM 15.0.6, 256 bits) (ID: 0)
subsetAllocation = 0
Present Capabilities:
llvmpipe (LLVM 15.0.6, 256 bits) (ID: 0):
Can present images from the following devices: count = 1
llvmpipe (LLVM 15.0.6, 256 bits) (ID: 0)
Present modes: count = 1
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
如果我删除了 mesa-vulkan-drivers
vulkaninfo会显示
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at ./vulkaninfo/vulkaninfo.h:674:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
有点怪的是我这里libGLX_nvidia.so.0有三个
cat /usr/share/vulkan/icd.d/nvidia_icd.json
{
"file_format_version" : "1.0.0",
"ICD": {
"library_path": "libGLX_nvidia.so.0",
"api_version" : "1.3.242"
}
}
find / -name "libGLX_nvidia.so.0" 2> /dev/null
/usr/lib/x86_64-linux-gnu/nvidia/current/libGLX_nvidia.so.0
/usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0
/opt/tiger/x86_64-linux-gnu/libGLX_nvidia.so.0
ldconfig -p | grep libGLX_nvidia.so.0
libGLX_nvidia.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
dpkg -l | grep vulkan
ii libvulkan1:amd64 1.3.239.0-1 amd64 Vulkan loader library
ii nvidia-vulkan-common 535.183.01-1~deb12u1 amd64 NVIDIA Vulkan driver - common files
ii nvidia-vulkan-icd:amd64 535.183.01-1~deb12u1 amd64 NVIDIA Vulkan installable client driver (ICD)
ii vulkan-tools 1.3.239.0+dfsg1-1 amd64 Miscellaneous Vulkan utilities
dpkg -l | grep nvidia
ii firmware-nvidia-gsp 535.183.01-1~deb12u1 amd64 NVIDIA GSP firmware
ii glx-alternative-nvidia 1.2.2 amd64 allows the selection of NVIDIA as GLX provider
ii libegl-nvidia0:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary EGL library
ii libgl1-nvidia-glvnd-glx:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary OpenGL/GLX library (GLVND variant)
ii libgles-nvidia1:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary OpenGL|ES 1.x library
ii libgles-nvidia2:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary OpenGL|ES 2.x library
ii libglx-nvidia0:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary GLX library
ii libnvidia-allocator1:amd64 535.183.01-1~deb12u1 amd64 NVIDIA allocator runtime library
ii libnvidia-cfg1:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-egl-gbm1:amd64 1.1.0-2 amd64 GBM EGL external platform library for NVIDIA
ii libnvidia-egl-wayland1:amd64 1:1.1.10-1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-eglcore:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary EGL core libraries
ii libnvidia-encode1:amd64 535.183.01-1~deb12u1 amd64 NVENC Video Encoding runtime library
ii libnvidia-glcore:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary OpenGL/GLX core libraries
ii libnvidia-glvkspirv:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary Vulkan Spir-V compiler library
ii libnvidia-ml1:amd64 535.183.01-1~deb12u1 amd64 NVIDIA Management Library (NVML) runtime library
ii libnvidia-pkcs11-openssl3:amd64 535.183.01-1~deb12u1 amd64 NVIDIA PKCS #11 Library (OpenSSL 3)
ii libnvidia-ptxjitcompiler1:amd64 535.183.01-1~deb12u1 amd64 NVIDIA PTX JIT Compiler library
ii libnvidia-rtcore:amd64 535.183.01-1~deb12u1 amd64 NVIDIA binary Vulkan ray tracing (rtcore) library
ii nvidia-alternative 535.183.01-1~deb12u1 amd64 allows the selection of NVIDIA as GLX provider
ii nvidia-driver 535.183.01-1~deb12u1 amd64 NVIDIA metapackage
ii nvidia-driver-bin 535.183.01-1~deb12u1 amd64 NVIDIA driver support binaries
ii nvidia-driver-libs:amd64 535.183.01-1~deb12u1 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries)
ii nvidia-egl-common 535.183.01-1~deb12u1 amd64 NVIDIA binary EGL driver - common files
ii nvidia-egl-icd:amd64 535.183.01-1~deb12u1 amd64 NVIDIA EGL installable client driver (ICD)
ii nvidia-installer-cleanup 20220217+3~deb12u1 amd64 cleanup after driver installation with the nvidia-installer
ii nvidia-kernel-common 20220217+3~deb12u1 amd64 NVIDIA binary kernel module support files
ii nvidia-kernel-dkms 535.183.01-1~deb12u1 amd64 NVIDIA binary kernel module DKMS source
ii nvidia-kernel-support 535.183.01-1~deb12u1 amd64 NVIDIA binary kernel module support files
ii nvidia-legacy-check 535.183.01-1~deb12u1 amd64 check for NVIDIA GPUs requiring a legacy driver
ii nvidia-modprobe 535.161.07-1~deb12u1 amd64 utility to load NVIDIA kernel modules and create device nodes
ii nvidia-settings 535.171.04-1~deb12u1 amd64 tool for configuring the NVIDIA graphics driver
ii nvidia-smi 535.183.01-1~deb12u1 amd64 NVIDIA System Management Interface
ii nvidia-support 20220217+3~deb12u1 amd64 NVIDIA binary graphics driver support files
ii nvidia-suspend-common 535.183.01-1~deb12u1 amd64 NVIDIA driver - systemd power management scripts
ii nvidia-vdpau-driver:amd64 535.183.01-1~deb12u1 amd64 Video Decode and Presentation API for Unix - NVIDIA driver
ii nvidia-vulkan-common 535.183.01-1~deb12u1 amd64 NVIDIA Vulkan driver - common files
ii nvidia-vulkan-icd:amd64 535.183.01-1~deb12u1 amd64 NVIDIA Vulkan installable client driver (ICD)
ii xserver-xorg-video-nvidia 535.183.01-1~deb12u1 amd64 NVIDIA binary Xorg driver
nvidia-smi
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.161.08 Driver Version: 535.161.08 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA L20 On | 00000000:6B:01.0 Off | 0 |
| N/A 37C P0 86W / 350W | 0MiB / 46068MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
Note: PID in a container does not match the PID on the host.
+-----+----------+------+------+---------+---------+----------+----------+----------+
| GPU | HOST PID | NAME | TYPE | GPU MEM | SM-UTIL | MEM-UTIL | ENC-UTIL | DEC-UTIL |
+-----+----------+------+------+---------+---------+----------+----------+----------+
+-----+----------+------+------+---------+---------+----------+----------+----------+
辛苦大家帮忙看下
最近编辑记录 evanfeng (2024-11-19 21:30:09)
离线