leonmaxx / primus-vk-rpm

RPM packaging script for Primus-vk
2 stars 1 forks source link

32bit libraries not found #2

Closed rxonda closed 5 years ago

rxonda commented 5 years ago

Tried to install through COPR repository and found this:

I used the NVidia installer from the oficial NVidia website.

leonmaxx commented 5 years ago

Hello again :)

  1. I changed installation instructions in readme, it now works.
  2. I'll modify install scripts to detect where vulkan icd files is installed.
rxonda commented 5 years ago

Hi @leonmaxx Just did a fresh Fedora 29 install, and repeat the install instructions from README.MD and still did not install the 32bit libnv_vulkan_wrapper. I also noted that it did install primus_vk.json on /etc/vulkan/implicit_layer.d I dont understand why the dnf installs are so difficult to install the 32bit libs. More also, I noted that under /usr/share/vulkan/ theres intel and amd counterparts, and also i686 json: /usr/share/vulkan/icd.d/radeon_icd.x86_64.json /usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json /usr/share/vulkan/icd.d/intel_icd.i686.json /usr/share/vulkan/icd.d/radeon_icd.i686.json Why isn't there a nvidia_icd.i686.json? The content of the i686 jsons leads to the 32bit libs with absolute paths:

cat /usr/share/vulkan/icd.d/intel_icd.i686.json

{ "ICD": { "api_version": "1.1.80", "library_path": "/usr/lib/libvulkan_intel.so" }, "file_format_version": "1.0.0" }

leonmaxx commented 5 years ago

Hello, thanks for report. Do Nvidia's 32-bit libs is installed at all? Check for libGLX_nvidia.so in /usr/lib or /usr/lib/nvidia directories.
I generally use pre-packaged drivers from RPMFusion, but I'll try to add support for Nvidia installer too.

oyviaase commented 5 years ago

The situation seems to be similar when using the negativo17 nvidia repository the main exception is that it provides the nvidia_icd.i686.json file.

leonmaxx commented 5 years ago

The situation seems to be similar when using the negativo17 nvidia repository the main exception is that it provides the nvidia_icd.i686.json file.

Can you show me contents of that file?

oyviaase commented 5 years ago

This is the contet of nvidia_icd.i686.json

{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.1.84"
    }
}
leonmaxx commented 5 years ago

Updated packages just built on COPR with latest sources and updated installation scripts. For 32-bit libs issue I'll provide custom .repo file that solves it.

leonmaxx commented 5 years ago

Hello guys, Can you test new release and tell the results, please? I need to know if it works for your setups.

oyviaase commented 5 years ago

It seems to work with vulkan-cube except that the output off nvidia-smi is

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 415.18       Driver Version: 415.18       CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1050    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P3    N/A /  N/A |      6MiB /  4042MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     14353      G   /usr/libexec/Xorg                              5MiB |
+-----------------------------------------------------------------------------+

Running it with ´ DISPLAY=8 pvkrun vulkan-cube´ gives the following error message

Cannot find a compatible Vulkan installable client driver (ICD).
Exiting ...
leonmaxx commented 5 years ago

Simple pvkrun vulkan-cube works? And please show me output of it.

oyviaase commented 5 years ago

There is no output to the terminal. And it generates this window with a spinning cube vulkan-cube

leonmaxx commented 5 years ago

Ok, thanks. This package should be used together with bumblebee. Please check whether bumblebee is properly configured, run: optirun glxinfo | grep OpenGL and show me it's output.

oyviaase commented 5 years ago

Bumblebee is installed and works, the output from optirun glxinfo | grep OpenGL is:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1050/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 415.18
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 415.18
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

Bumblebee is installed from chenxiaolong-bumblebee Copr repository

leonmaxx commented 5 years ago

Ok, good. Now please optirun vulkaninfo | grep VkPhysicalDeviceProp -A 10

leonmaxx commented 5 years ago

Or even better get a full log: optirun vulkaninfo | tee vulkaininfo.txt

oyviaase commented 5 years ago

Gives the following output, and perhaps also the reason why it vulkan-cube works even without the nvidia card

INTEL-MESA: warning: vulkan/anv_device.c:1150: FINISHME: Implement pop-free point clipping
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401050  (1.1.80)
    driverVersion  = 75505668 (0x4802004)
    vendorID       = 0x8086
    deviceID       = 0x591b
    deviceType     = INTEGRATED_GPU
    deviceName     = Intel(R) HD Graphics 630 (Kaby Lake GT2)
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 16384

Here is the full log: vulkaninfo.txt

leonmaxx commented 5 years ago

Probably I have bug in my RPM spec, please check if primus-vk-libs.x86_64 is installed: dnf install primus-vk-libs.x86_64

oyviaase commented 5 years ago

That seems to install the vulkan drivers the output of optirun vulkaninfo | grep VkPhysicalDeviceProp -A 10 is now:

INTEL-MESA: warning: vulkan/anv_device.c:1150: FINISHME: Implement pop-free point clipping
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401050  (1.1.80)
    driverVersion  = 75505668 (0x4802004)
    vendorID       = 0x8086
    deviceID       = 0x591b
    deviceType     = INTEGRATED_GPU
    deviceName     = Intel(R) HD Graphics 630 (Kaby Lake GT2)
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 16384

It does however break vulkan-cube for some reason

$ pvkrun vulkan-cube                                  
PrimusVK: CreateInstance
PrimusVK: Getting devices
PrimusVK: 0x556883b36e50: 
PrimusVK: got render!
PrimusVK: Device: GeForce GTX 1050
PrimusVK:   Type: 2
PrimusVK: 0x556883b36e50: 
PrimusVK: got render!
PrimusVK: Device: GeForce GTX 1050
PrimusVK:   Type: 2
PrimusVK: 0x556883b36e50: 
PrimusVK: got render!
PrimusVK: Device: GeForce GTX 1050
PrimusVK:   Type: 2
PrimusVK: 0x556883b36e50: 
PrimusVK: got render!
PrimusVK: Device: GeForce GTX 1050
PrimusVK:   Type: 2
PrimusVK: 0x556883b36e50: 
PrimusVK: got display!
PrimusVK: Device: Intel(R) HD Graphics 630 (Kaby Lake GT2)
PrimusVK:   Type: 1
PrimusVK: Support: 0x556883b36e50, 1
PrimusVK: Support: 0x556883b36e50, 1
PrimusVK: Support: 0x556883b36e50, 1
PrimusVK: in function: creating device
PrimusVK: Extension: 3
PrimusVK: Extension: 48
PrimusVK: Extension: 48
PrimusVK: spawning secondary device creation
PrimusVK: After reset:0
PrimusVK: fetching dispatch for 0x556883f399d0
PrimusVK: GetDeviceProcAddr is: 0x7f34b85c9b80
PrimusVK: Create Swapchain KHR is: 0x7f34b85d4f30
PrimusVK: Thread running
PrimusVK: getting rendering suff: 0x556883b36e50
PrimusVK: CreateDevice done
PrimusVK: Gpus: 2
PrimusVK: phys[1]: 0x7f34a0000bb0
PrimusVK: render queues: 1
PrimusVK:  flags: 7
PrimusVK: joining secondary device creation
PrimusVK: When startup hangs here, you have probably hit the initialization deadlock
PrimusVK: in function: creating device
PrimusVK: Extension: 3
PrimusVK: Extension: 48
PrimusVK: Extension: 48
^C[46610.485668] [WARN]Received Interrupt signal.
leonmaxx commented 5 years ago

Ok, there seems to be too much entries for a single discrete card. Now show me output of: find /etc/vulkan/icd.d/ /usr/share/vulkan/icd.d/ -name "nvidia_icd*.json" -type f

oyviaase commented 5 years ago

You might be right.

/usr/share/vulkan/icd.d/nvidia_icd.i686.org.json
/usr/share/vulkan/icd.d/nvidia_icd.x86_64.org.json
/usr/share/vulkan/icd.d/nvidia_icd.i686.json
/usr/share/vulkan/icd.d/nvidia_icd.x86_64.json

Some of them are from trying to install primus_vk manualy, deleting the org.json made it down to three devices

$ optirun vulkaninfo | grep VkPhysicalDeviceProp -A 10       
INTEL-MESA: warning: vulkan/anv_device.c:1150: FINISHME: Implement pop-free point clipping
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401054  (1.1.84)
    driverVersion  = 1740931072 (0x67c48000)
    vendorID       = 0x10de
    deviceID       = 0x1c8d
    deviceType     = DISCRETE_GPU
    deviceName     = GeForce GTX 1050
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 32768
--
VkPhysicalDeviceProperties:
===========================
    apiVersion     = 0x401050  (1.1.80)
    driverVersion  = 75505668 (0x4802004)
    vendorID       = 0x8086
    deviceID       = 0x591b
    deviceType     = INTEGRATED_GPU
    deviceName     = Intel(R) HD Graphics 630 (Kaby Lake GT2)
    VkPhysicalDeviceLimits:
    -----------------------
        maxImageDimension1D                     = 16384
leonmaxx commented 5 years ago

Now if you remove or rename one of nvidia_icd.*.json, to leave only one card entry, then primus-vk should work.

oyviaase commented 5 years ago

That seems to help but vulkan-cube does still not work, through that might be because I for some reason hits the initialization deadlock. All it shows is a black window

$ pvkrun vulkan-cube                                                  
PrimusVK: CreateInstance
PrimusVK: Getting devices
PrimusVK: 0x55e09af430f0: 
PrimusVK: got render!
PrimusVK: Device: GeForce GTX 1050
PrimusVK:   Type: 2
PrimusVK: 0x55e09af430f0: 
PrimusVK: got display!
PrimusVK: Device: Intel(R) HD Graphics 630 (Kaby Lake GT2)
PrimusVK:   Type: 1
PrimusVK: Support: 0x55e09af430f0, 1
PrimusVK: Support: 0x55e09af430f0, 1
PrimusVK: Support: 0x55e09af430f0, 1
PrimusVK: in function: creating device
PrimusVK: Extension: 3
PrimusVK: Extension: 48
PrimusVK: Extension: 48
PrimusVK: spawning secondary device creation
PrimusVK: After reset:0
PrimusVK: fetching dispatch for 0x55e09b296b70
PrimusVK: GetDeviceProcAddr is: 0x7fa56ebb8b80
PrimusVK: Create Swapchain KHR is: 0x7fa56ebc3f30
PrimusVK: Thread running
PrimusVK: getting rendering suff: 0x55e09af430f0
PrimusVK: CreateDevice done
PrimusVK: Gpus: 2
PrimusVK: phys[1]: 0x55e09b291020
PrimusVK: render queues: 1
PrimusVK:  flags: 7
PrimusVK: joining secondary device creation
PrimusVK: When startup hangs here, you have probably hit the initialization deadlock
PrimusVK: in function: creating device
PrimusVK: Extension: 3
PrimusVK: Extension: 48
PrimusVK: Extension: 48
^C[47617.782677] [WARN]Received Interrupt signal.
leonmaxx commented 5 years ago

Ok, can you show me contents of remaining nvidia_icd.*.json file?

oyviaase commented 5 years ago

At the moment are there these two files with the following content:

$  cat /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json
{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libnv_vulkan_wrapper.so",
        "api_version" : "1.1.84"
    }
}
$ cat /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json.primus-vk 
{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.1.84"
    }
}
leonmaxx commented 5 years ago

Strange, it should work, can you try: pvkrun vulkan-smoketest vulkan-smoketest is in vulkan-demos package.

oyviaase commented 5 years ago

I am running f29 and for some reason have nobody made a f29 version of the vulkan-demos package. And trying to download and install it from rpmfind.net does not work because of mismatching vulkan versions.

leonmaxx commented 5 years ago

Thanks for your help to investigate installation issues. Primus-Vk seems now properly installed, i'll update install scripts later. About Primus-Vk still not working, you can try open issue in primus-vk repository.

oyviaase commented 5 years ago

Seems like the best place to do that, it does at least seems that the installation does what it should

leonmaxx commented 5 years ago

I'll leave this issue open while I'm fixing install scripts.