FS#69289 - [amdvlk] Installing overrides all Vulkan apps to use AMDVLK by default instead of RADV

Attached to Project: Arch Linux
Opened by Kyle Devir (QuartzDragon) - Monday, 11 January 2021, 13:51 GMT
Last edited by Laurent Carlier (lordheavy) - Saturday, 17 September 2022, 03:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Laurent Carlier (lordheavy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

When AMDVLK is installed, the VK_LAYER_AMD_switchable_graphics layer is enabled by default.

It queries for the "AMD_VULKAN_ICD" environment variable, with a choice between "RADV" and "AMDVLK".

If the environment variable isn't set, the layer automatically causes all Vulkan application to use AMDVLK instead of RADV by default.

Installing AMDVLK should not cause such behaviour, and should be left to the user.

Thus, AMD_VULKAN_ICD should be set to "RADV" by default, when installing AMDVLK.

Additional info:
* package version ~ amdvlk 2021.Q1.1-1
* upstream bug report ~ amdvlk 2021.Q1.1-1

Steps to reproduce:
1. run `vulkaninfo | grep RADV` to confirm that RADV is being used
2. Install AMDVLK via `pacman -Sy amdvlk`
3. run `vulkaninfo | grep RADV` to confirm that RADV is no longer being used, due to AMD's VK_LAYER_AMD_switchable_graphics
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Saturday, 17 September 2022, 03:03 GMT
Reason for closing:  Fixed
Comment by Kyle Devir (QuartzDragon) - Monday, 11 January 2021, 13:59 GMT
Whoops ~ upstream bug report should be https://github.com/GPUOpen-Drivers/AMDVLK/issues/195
Comment by Bas Nieuwenhuizen (bnieuwenhuizen) - Monday, 11 January 2021, 14:03 GMT
I think it is further worth mentioning that the layer actually removes the driver from enumeration instead of putting the preferred driver first which breaks applications with application specific methods to select the driver (good example here would be renderdoc which tries to use the same driver as the driver that recorded the trace).

Furthermore, by default it will still filter out RADV even if VK_ICD_FILENAMES gets pointed to RADV with multiple GPUs (which includes typical AMD+Intel or AMD+AMD laptop setups) resulting in breaking this common user paradigm.

Somewhat less contentious than setting AMD_VULKAN_ICD=RADV as the initial poster suggested would be to put the implicit layer symlinks into a dedicated package so the user has to make an explicit choice for this layer.

Comment by Thomas (KrenoDeno) - Wednesday, 14 April 2021, 11:48 GMT
Hi, I have the strange behavior where when having RADV(21.0.2) and AMDVLK(2021.Q2.1) installed, I get error `The selected gpu (0) is not a valid GPU index. The available GPUs are in the range of 0 to 18446744073709551615.` but with either one of the driver installed, everything run fine.

Do you think this is related ?
Comment by Laurent Carlier (lordheavy) - Wednesday, 21 April 2021, 16:10 GMT
Please check with amdvlk-2021.Q2.1-2 in testing. I forced AMD_VULKAN_ICD=RADV, change AMD_VULKAN_ICD environment variable to something else to restore amdvlk driver loading.
Comment by Thomas (KrenoDeno) - Monday, 26 April 2021, 08:45 GMT
I still get the same behavior with amdvlk-2021.Q2.1-2, vkcube tells me that "vkEnumeratePhysicalDevices reported zero accessible devices."
Comment by Laurent Carlier (lordheavy) - Friday, 11 March 2022, 19:18 GMT
afaik it's fixed now

Loading...