protonscr

DRI_PRIME=1 equivilant for vulkan games

protonclosed
ValveSoftware/Proton#2870 · opened 2019-07-10 by kenthinson · updated 2020-03-11 · 9 comments · github
Kkenthinson 2019-07-10 github

Feature Request

I confirm:

  • [x] that I haven't found another request for this feature.
  • [x] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Ability to hide cards from vulkan or somehow specfiy what one should be used by the game. Similar to DRI_PRIME=1.

Justification [optional]

Example. Running a Asus tuf book with Vega / RX 560.
Doom 2016 running with open-gl mode. I can simply launch steam with DRI_PRIME=1 to set the RX 560 as the rendering card. However If I switch the game over to Vulkan mode then DRI_PRIME=1 is ignored and the game runs on the vega graphics. I'm assuming that the game can see both cards and is just selecting the incorrect one? However I have no way to confirm this.

Risks [optional]

None known.

Kkenthinson 2019-07-10 github

closing as i found the Primus-VK project.

Kkenthinson 2019-07-10 github

Reopening as Primus-VK seems to be a Nvidia only solution.

Kkisak-valve maintainer 2019-07-10 github

Hello @kenthinson, it sounds like you're looking for DXVK_FILTER_DEVICE_NAME to limit what GPUs are used.

Otherwise, this should be a feature request for manipulating the order GPUs are listed in vkEnumeratePhysicalDevices in Vulkan's loader rather than something that should be implemented in Proton.

Kkenthinson 2019-07-11 github

@kisak-valve Doom uses vulkan native not DXVK. I figured that the wine layer would be responsible for what order the graphics cards are presented to the exe no? For example maybe we dont want to change the default order for all apps just the game in question.

Jjozefkucia 2019-07-11 github

You can use VK_ICD_FILENAMES, e.g. VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json.

Kkisak-valve maintainer 2019-07-11 github

It should be noted that while VK_ICD_FILENAMES is effective in limiting the enumerated videocard to a driver vendor, it doesn't help with forcing the vulkan loader to pick between video cards of the same brand like the AMD RX560 / Vega in the example.

Kkenthinson 2019-07-11 github

I opened a issue with the vulkan team here is the link in case anyone with the same issue happens on this via google.

https://github.com/KhronosGroup/Vulkan-Loader/issues/202

Ffelixdoerre 2019-08-09 github

Hi @kenthinson
I don't see any reason why primus_vk should now work on an amd laptop, however I don't have any such hardware to try to understand how the amd-driver behaves and how one could get this working. The NVIDIA-Driver hack (https://github.com/felixdoerre/primus_vk/blob/master/nv_vulkan_wrapper.cpp) is obviously not needed but maybe, the AMD driver behaves correctly from the start.

Jjuanro49 2020-03-11 github

I have same problem. I found this tool https://github.com/aejsmith/vkdevicechooser but I have a compile error

Launch options

Upstream links