felixdoerre / primus_vk

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

"No device for the rendering GPU found." on openSUSE Tumbleweed #22

Closed DragonSWDev closed 1 year ago

DragonSWDev commented 5 years ago

Hello. I've tried to use primus_vk on openSUSE Tumbleweed and it's not working very well. I've changed NV_DRIVER_PATH in nv_vulkan_wrapper.cpp file to "/usr/lib64/libGLX_nvidia.so.0" (location for Nvidia driver on openSUSE), compiled everything without errors, copied compiled libraries to /opt/primus_vk and changed path in nvidia_icd.json and primus_vk.json files to point correct libraries. Now when I'm trying to run Vulkan application (not important which, on every there is same situation) I get error:

PrimusVK: CreateInstance Xlib: extension "NV-GLX" missing on display ":0". Xlib: extension "NV-GLX" missing on display ":0". PrimusVK: Getting devices PrimusVK: 0x55f5b7503050: PrimusVK: got display! PrimusVK: Device: Intel(R) HD Graphics 520 (Skylake GT2) PrimusVK: Type: 1 PrimusVK: No device for the rendering GPU found. Is the correct driver installed? vkCreateInstance failed.

No idea what is wrong, everything points to right libraries and I have correct files for Nvidia and Intel GPU in /usr/share/vulkan/icd.d directory.

snoopcatt commented 5 years ago

You should set NV_DRIVER_PATH to library called "libGL.so.1", that provided by NVidia package in your distro, not libEGL or something else.

I assume it is usr/lib64/nvidia/libGL.so.1 or /usr/lib64/libGL.so.1 Or you can try with

$ find /usr/ | grep -i libgl.so | grep -i nvidia

You can check it is NVidia's libGL by running

$ ldd <library_path> | grep nvidia

DragonSWDev commented 5 years ago

@snoopcatt Nvidia driver on openSUSE is using GLVND, so libGL.so.1 isn't linked to Nvidia libGL (I've checked this with ldd). But I've found another libGL in /usr/lib64/nvidia directory which has links to Nvidia libs. I'll try change NV_DRIVER_PATH to it and see what happens.

Edit: Nope, still same error. It seems it something with nvidia_icd.json but I don't know what. Path is correct and Vulkan is working on Nvidia with nvidia-xrun (which starts new X.Org session on Nvidia GPU).

nemasu commented 5 years ago

I'm having the same problem, can't find the GPU.

$  ENABLE_PRIMUS_LAYER=1 optirun vkcube
PrimusVK: CreateInstance
PrimusVK: Getting devices
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
PrimusVK: Searching for display GPU:
PrimusVK: 0xa4bf60: 
PrimusVK: Got integrated gpu!
PrimusVK: Device: Intel(R) Ivybridge Mobile
PrimusVK:   Type: 1
PrimusVK: Searching for render GPU:
PrimusVK: 0xa4bf60: 
PrimusVK: 0xa4bf60: 
PrimusVK: No device for the rendering GPU found. Is the correct driver installed?
vkCreateInstance failed.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

I have: mesa 19.0.1 vulkan 1.1.100 nvidia 390.116

optirun glxspheres64 works with: OpenGL Renderer: GeForce GT 620M/PCIe/SSE2

and glxspheres64 works with: OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile

I had to change NV_DRIVER_PATH to /usr/lib/libGLX_nvidia.so.0

Tried changing the icd path in nvidia_icd.json to /usr/lib/libnv_vulkan_wrapper.so (since I put it there), didn't work. Same with the library path in /usr/share/vulkan/implicit_layer.d/primus_vk.json.

felixdoerre commented 5 years ago

General hint's when the devices cannot be found:

felixdoerre commented 5 years ago

Additionally there is primus_vk_diag. You can use this as test utility to ensure that the two graphics drivers are working. Test with optirun primus_vk_diag vulkan. It has to show both devices.

felixdoerre commented 1 year ago

I think we've solved all configuration issues mentioned in this issue.