Page MenuHomeSolus

Vulkan ICD Loader favours Intel iGPU over discrete Nvidia
Open, NormalPublic

Description

Issue: On a system with a GTX 970 and an Intel i5-4590, vulkaninfo tries to load the ICD for the integrated Intel GPU over the dedicated Nvidia one by default. Disabling the Intel GPU on BIOS causes a segmentation fault on vulkaninfo.

Solution: move all the other ICD loaders out of "/usr/share/vulkan/icd.d/", only keeping the Nvidia one there.

So for some reason, Solus prioritized the Intel ICD Loader as long as the Intel related .json files were in that directory. Fiddling with the libGL.so locations and filenames in 10_nvidia .json did not solve the problem.

Extra Notes: I did not report the issue when I first had it and solved it myself. However, seeing some other people encounter the same issue (https://www.reddit.com/r/linux_gaming/comments/8h5jrp/cant_run_vulkan_on_nvidia_1050_ti_on/), and that the same solution works for them as well, led me to believe that there might be a larger underlying problem that can be solved. So that this does not happen by default.

  • Segmentation fault with all files in the directory (iGPU is disabled in the BIOS. If it's not disabled it just shows the iGPU attributes):

SegFault.png (580×690 px, 49 KB)

  • Working with only the Nvidia related loader:

Working.png (588×694 px, 62 KB)

Event Timeline

arkhenius updated the task description. (Show Details)
arkhenius updated the task description. (Show Details)

Can confirm this is also happening with a Clevo N850HK1 (an Optimus-powered i7-7700HQ + GTX 1050Ti laptop).

Deleting the mentioned files indeed solves the problem.

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/10_nvidia.json vulkaninfo

DataDrake triaged this task as Normal priority.Oct 16 2018, 11:03 PM
DataDrake moved this task from Backlog to System and Configuration Fixes on the Software board.

This is amazingly helpful, thanks everyone!
What I'm still missing is why Intel ICD'd Vulkan fails to work - it clearly works fine on systems without dedicated GPU.

We should probably change the names of the files in mesalib:

-rw-r--r-- 1 root root  147 Mar 14 22:17 intel_icd.i686.json
-rw-r--r-- 1 root root  147 Mar 14 22:23 intel_icd.x86_64.json
-rw-r--r-- 1 root root  148 Mar 14 22:17 radeon_icd.i686.json
-rw-r--r-- 1 root root  148 Mar 14 22:23 radeon_icd.x86_64.json

If we give them a lower (higher number) priority value it should select the discrete card first. Admittedly, this probably will fall over when Intel releases discrete GPUs.