From ed7c5db8657d499d758e66da686231a9cfdd858a Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Fri, 16 Jul 2021 17:21:35 +0300 Subject: [PATCH] docs: Add Vulkan section to PRIME.md. --- docs/PRIME.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/PRIME.md b/docs/PRIME.md index cadd839f..104926ef 100644 --- a/docs/PRIME.md +++ b/docs/PRIME.md @@ -60,6 +60,44 @@ In Steam set your game's Properties -> GENERAL -> LAUNCH OPTIONS to: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command% +## Vulkan + +In case Vulkan games don't allow you to select a GPU or you experience +problems with graphics APIs implemented on top of Vulkan you can limit or +alter the GPU selection. + +### AMD -> Integrated Intel (Mesa -> Mesa) + +In Steam, set your game's Properties -> GENERAL -> LAUNCH OPTIONS to: + + DRI_PRIME=1 %command% + +This will cause the devices to change order, i.e. the first GPU will swap +places with another one. + +You can also limit the selection using Mesa's DEVICE_SELECT Vulkan layer. To +list the GPUs: + + $ MESA_VK_DEVICE_SELECT=list vulkaninfo + selectable devices: + GPU 0: 1002:67df "AMD RADV POLARIS10 (ACO)" discrete GPU 0000:01:00.0 + GPU 1: 8086:412 "Intel(R) HD Graphics 4600 (HSW GT2)" integrated GPU 0000:00:02.0 + +Then set the launch options using one of the vendor and product ids, e.g.: + + DRI_PRIME=1 MESA_VK_DEVICE_SELECT=1002:67df $command% + + +### Nvidia -> Integrated Intel (Nvidia's Proprietary Driver -> Mesa) + +In Steam set your game's Properties -> GENERAL -> LAUNCH OPTIONS to: + + __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command% + +This will load the Optimus Vulkan layer and use it to limit the GPU selection +to NVIDIA only. Using `non_NVIDIA_only` will do the opposite. + + # Troubleshooting ## Performance