Vulkan-Loader disables VK_LAYER_MESA_device_select due to old API version
I'm trying to use MESA_VK_DEVICE_SELECT
to make my Radeon card take precendence over a headless Nvidia card.
Unfortunately it seems to have no effect and the Nvidia card remains in vulkaninfo
's GPU0 slot.
VK_LOADER_DEBUG=info
output suggests the api_version = 1.2.73
in VkLayer_MESA_device_select.json
is too old for modern Vulkan-Loader versions.
Setting api_version = 1.3
gets rid of the "Disabling implicit layer VK_LAYER_MESA_device_select" messages and lets MESA_VK_DEVICE_SELECT
do its thing.
Seems related to KhronosGroup/Vulkan-Loader#870.
Steps to reproduce
-
Install
mesa-22.0.2
(latest release tag as of writing) with-D vulkan-layers=device-select
-
Install Vulkan-Loader
v1.3.212
(latest release tag as of writing) -
Run
vulkaninfo
withVK_LOADER_DEBUG=info
:VK_LOADER_DEBUG=info vulkaninfo --summary 2>&1 | \ grep "Disabling implicit layer VK_LAYER_MESA_device_select"
-
Observe one or more "Disabling implicit layer VK_LAYER_MESA_device_select" messages from the loader:
INFO: loader_add_implicit_layer: Disabling implicit layer VK_LAYER_MESA_device_select for using an old API version 1.2 versus application requested 1.3
System information
System: Host: <redacted> Kernel: 5.15.0-0.bpo.2-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: KDE Plasma 5.20.5
tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM Distro: Debian GNU/Linux 11 (bullseye)
CPU: Info: 12-Core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3 rev: 0 L2 cache: 6 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 177271
Speed: 2195 MHz min/max: 2200/3700 MHz boost: enabled Core speeds (MHz): 1: 2195 2: 2190 3: 2875 4: 2874 5: 3596
6: 2473 7: 2193 8: 2561 9: 3589 10: 2871 11: 2873 12: 3588 13: 2862 14: 2866 15: 2872 16: 2872 17: 2871 18: 2872
19: 3593 20: 2872 21: 2873 22: 3591 23: 2868 24: 2874
Graphics: Device-1: NVIDIA TU117 [GeForce GTX 1650] vendor: ASUSTeK driver: nvidia v: 470.103.01 bus ID: 04:00.0
chip ID: 10de:1f82
Device-2: Advanced Micro Devices [AMD/ATI] Navi 22 driver: amdgpu v: kernel bus ID: 09:00.0 chip ID: 1002:73df
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: amdgpu,ati,nvidia
unloaded: fbdev,modesetting,nouveau,radeon,vesa alternate: nv resolution: 1: 1920x1200~60Hz 2: 1920x1200~60Hz
s-dpi: 96
OpenGL: renderer: AMD Radeon RX 6700 XT (navy_flounder LLVM 11.0.1 DRM 3.42 5.15.0-0.bpo.2-amd64)
v: 4.6 Mesa 22.0.2 (git-f1d9e66a84) direct render: Yes