felixdoerre / primus_vk

Vulkan GPU-offloading layer
BSD 2-Clause "Simplified" License
230 stars 17 forks source link

ERROR! Nvidia driver could not be loaded from '/usr/lib/x86_64-linux-gnu/nvidia/current/libGL.so.1' #65

Closed arcivanov closed 4 years ago

arcivanov commented 4 years ago

Fedora 32, Mesa 20.0.7, Quadro T2000/PCIe/SSE2, 4.6.0 NVIDIA 440.82

bash-5.0$ ENABLE_PRIMUS_LAYER=1 optirun vulkaninfo
PrimusVK: ERROR! Nvidia driver could not be loaded from '/usr/lib/x86_64-linux-gnu/nvidia/current/libGL.so.1'.
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: ICD libnv_vulkan_wrapper.so.1 doesn't support interface version compatible with loader, skip this ICD.
PrimusVK: Searching for display GPU:
PrimusVK: 0x55d6f7588f80: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) UHD Graphics 630 (CFL GT2)
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0x55d6f7588f80.
PrimusVK: No device for the rendering GPU found. Is the correct driver installed?
PrimusVK: VK_ICD_FILENAMES not set
ERROR at vulkaninfo/vulkaninfo.h:642:vkCreateInstance failed with ERROR_INITIALIZATION_FAILED
felixdoerre commented 4 years ago

This is the "real" error message:

PrimusVK: ERROR! Nvidia driver could not be loaded from '/usr/lib/x86_64-linux-gnu/nvidia/current/libGL.so.1'.

I am assuming this file does not exist on you system. From the installation instructions:

check that the path to the nvidia-driver in nv_vulkan_wrapper.so is correct

(Yes, probably it would be better to point to the corresponding source file here... ) I don't really have an about where your real nvidia driver is located (as I don't have a Fedora installation at hand), but I guess it's libGLX_nvidia.so.0 and it is in the library search path (so no need for an absolute path). So please change NV_DRIVER_PATH (https://github.com/felixdoerre/primus_vk/blob/master/nv_vulkan_wrapper.cpp#L11) either by changing the source file or by providing a corresponding compile flag.

arcivanov commented 4 years ago

Fixed by building as follows on Fedora 32: make 'CXXFLAGS=-DNV_DRIVER_PATH=\"/usr/lib64/libGLX_nvidia.so.0\"'