Closed frank777777777 closed 5 years ago
I found a temporary fix.
The important thing is that intel icd's are listed in VK_ICD_FILENAME and that primus-vk-wrapper.json comes before nvidia_icd.json in the list.
The alternative is to remove nvidia.json
completely from /usr/share/vulkan/icd.d
. The diver will not start without the wrapper so it is of no use. But that's difficult to do in a regular package.
I would not recommend selecting the device drivers manually and setting VK_ICD_FILENAMES
, as I already discussed here: https://github.com/felixdoerre/primus_vk/issues/33#issuecomment-484139009
The Problem is, if the "old" nvidia.json loads before the "wrapped", then the nvidia-driver library detects that there is no nvidia GPU available, as DISPLAY
does not point to the secondary bumblebee X server, but to :0
. And as the driver has now decided it won't start at all, the wrapper cant trick it into loading properly.
Just out of interest, how did you get PrimusVK: No device for the display GPU found. Are the intel-mesa drivers installed?
? Did you configure Lutris to set VK_ICD_FILENAMES
to the wrapped icd? https://github.com/lutris/lutris/blob/121a735341bcf94dc719f17663961096f7a5a787/lutris/game.py#L413 Theoretically, you would need to have both the "wrapped nvidia" and intel_icd.x86_64.json
configured in vk_icd
(separated by :
, order should not matter), however Lutris checks that this file exists and will no apply such a setting. So here are my 2 recommendation:
So my recommendation would be to chose one of these:
a) Configure Lutris to not mess with VK_ICD_FILENAMES
(and if that does not work additionally delete nvidia.json
, which I have done on my system)
b) Patch Lutris to not validate vk_icd
is a file here: https://github.com/lutris/lutris/blob/121a735341bcf94dc719f17663961096f7a5a787/lutris/game.py#L412 (or check that all or at least one path in the :
-separated list point to existing files). Configure Lutris' vk_icd
to be /usr/share/vulkan/icd.d/primus_vk_wrapper.json:/usr/share/vulkan/icd.d/intel_icd.x86_64.json
.
Just out of interest, how did you get PrimusVK: No device for the display GPU found. Are the intel-mesa drivers installed??
Yes, intel-mesa driver is installed, I guess if lutris loads nvidia.json so it does not detect intel driver.
Than you for recommendation. Finally I got it working. To be able to let Lutris to launch it with the correct ICD loader, here is what I did.
/usr/share/vulkan/icd.d/nvidia_icd.json
, and pointed nvidia_icd.json
to libGLX_nvidia.so.0. I think remove it would do the trick too.Solution for this, on Debian-based systems though: sudo apt install mesa-vulkan-drivers:amd64
On my system (Debian 9) with NVidia drivers installed from backports repositiry (418), I just needed to copy the json files to the system directories. The libnv_vulkan_wrapper.so are placed on /usr/lib/x86_64-linux-gnu/nvidia/ and libprimus_vk.so on /usr/lib/x86_64-linux-gnu/ ? Without changing other ICD's, this wrapper works perfectly. Also the pvkrun binary makes more easy on Steam, since it will only need to use such command to use Vulkan games with NVidia.
I've added a print in master
to display VK_ICD_FILENAME
when the devices cannot be found to finde this configuration problem more easily in the future. As everything seems to work now, I close this issue.
The alternative is to remove
nvidia.json
completely from/usr/share/vulkan/icd.d
. The diver will not start without the wrapper so it is of no use. But that's difficult to do in a regular package.I would not recommend selecting the device drivers manually and setting
VK_ICD_FILENAMES
, as I already discussed here: #33 (comment)The Problem is, if the "old" nvidia.json loads before the "wrapped", then the nvidia-driver library detects that there is no nvidia GPU available, as
DISPLAY
does not point to the secondary bumblebee X server, but to:0
. And as the driver has now decided it won't start at all, the wrapper cant trick it into loading properly.Just out of interest, how did you get
PrimusVK: No device for the display GPU found. Are the intel-mesa drivers installed?
? Did you configure Lutris to setVK_ICD_FILENAMES
to the wrapped icd? https://github.com/lutris/lutris/blob/121a735341bcf94dc719f17663961096f7a5a787/lutris/game.py#L413 Theoretically, you would need to have both the "wrapped nvidia" andintel_icd.x86_64.json
configured invk_icd
(separated by:
, order should not matter), however Lutris checks that this file exists and will no apply such a setting. So here are my 2 recommendation:So my recommendation would be to chose one of these: a) Configure Lutris to not mess with
VK_ICD_FILENAMES
(and if that does not work additionally deletenvidia.json
, which I have done on my system) b) Patch Lutris to not validatevk_icd
is a file here: https://github.com/lutris/lutris/blob/121a735341bcf94dc719f17663961096f7a5a787/lutris/game.py#L412 (or check that all or at least one path in the:
-separated list point to existing files). Configure Lutris'vk_icd
to be/usr/share/vulkan/icd.d/primus_vk_wrapper.json:/usr/share/vulkan/icd.d/intel_icd.x86_64.json
.
Thanks for you solution and it saved my day! Now it's 2020 and the primus_vk_wrapper.json has now been renamed to nv_vulkan_wrapper.json in my nvidia setup. In my situation, the nvidia_icd.json shows before nv_vulkan_wrapper.json in lutris. So I manually edited "vk_icd" in the corresponding config file (.yml) at ~/.config/lutris/games/ as @felixdoerre suggested:
/usr/share/vulkan/icd.d/nv_vulkan_wrapper.json:/usr/share/vulkan/icd.d/intel_icd.x86_64.json
And the game runs successfully.
Hi, I am trying to set up DXVK in Lutris, but bumblebee does not support vulkan. I am excited to see this hack, but I can't get my head around the configuration.
I have hybrid nvidia laptop.
I have bumblebee installed through Manjaro mhwd.
My setup:
Json files:
/usr/share/vulkan/icd.d/primus_vk_wrapper.json
/usr/share/vulkan/implicit_layer.d/primus_vk.json
What I got from launching Assassin's Creed Unity logs:
Am I missing anything? No device for the display GPU found? If I change Vulkan ICD loader to
intel_icd.x86_64.json
, then