Jump to content

AMD Vulkan issues


Seleucids
 Share

Recommended Posts

I bought a new AMD GPU and I try to play 0ad on it. However, I run into errors when using the Vulkan renderer:

 ~/b/A27-1 $ binaries/system/pyrogenesis                                                                            I 
TIMER| InitVfs: 192.018 us
FILES| Main log written to '/home/rena/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/rena/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 2.94495 ms
Sound: AlcInit success, using OpenAL Soft
WARNING: Failed to create a Vulkan window: Installed Vulkan doesn't implement the VK_KHR_surface extension
ERROR: Unable to create device for Vulkan backend, switching to GL.

I am of course using the A27.1 RC version which I built from source, on this environment. I suspect that I made a mistake while trying to install Vulkan on the system: trying to query vulkaninfo gave these:

 ~ $ vulkaninfo --summary                                                                                           I 
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools/vulkaninfo/./vulkaninfo.h:573:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER

The basic GPU driver, vulkan-radeon and amdgpu are installed and activated. Radeontop does work correctly. Below are my grub kernel parameters in /etc/default/grub:

loglevel=3 intel_iommu=on quiet radeon

My question is: how can I set up vulkan driver for AMD GPUs on Arch so that I can run 0ad smoothly? What kernel parameters and config did the developers use?

userreport_hwdetect.txt

system_info.txt

Link to comment
Share on other sites

45 minutes ago, phosit said:

Did you instal vulkan-icd-loader and vulkan-radeon?

Yes. here is the list of Vulkan-related software that I have installed:

 ~/b/A27-1  sudo pacman -Q | grep "vulkan"                                                                                                                                                                                               I 
lib32-vulkan-icd-loader 1.4.313.0-1
lib32-vulkan-mesa-layers 1:25.1.4-2
lib32-vulkan-radeon 1:25.1.4-2
lib32-vulkan-swrast 1:25.1.4-2
lib32-vulkan-validation-layers 1.4.313.0-1
vulkan-headers 1:1.4.313.0-1
vulkan-icd-loader 1.4.313.0-1.1
vulkan-mesa-layers 1:25.1.4-2
vulkan-radeon 1:25.1.4-2
vulkan-swrast 1:25.1.4-2
vulkan-tools 1.4.313.0-1.1

 

Link to comment
Share on other sites

I managed the solve this. It seems that for certain generations of AMD cards, you need to set some special kernel parameters. Radeon drivers are the right ones, don't listen to those who suggest AMDVLK. 

 

1. Packages (Arch Linux):
 

 sudo pacman -Q | grep "vulkan"
lib32-vulkan-icd-loader 1.4.313.0-1
lib32-vulkan-radeon 1:25.1.4-2
vulkan-icd-loader 1.4.313.0-1.1
vulkan-radeon 1:25.1.4-2
vulkan-tools 1.4.313.0-1.1

 sudo pacman -Q | grep "radeon"
lib32-vulkan-radeon 1:25.1.4-2
linux-firmware-radeon 1:20250508.788aadc8-3
vulkan-radeon 1:25.1.4-2


2. Kernel Parameters:
Add the below kernel parameters to /etc/default/grub and then update with the command: sudo mkconfig -o /boot/grub/grub.cfg 

radeon.cik_support=0 
radeon.si_support=0 
amdgpu.cik_support=1 
amdgpu.si_support=1

In total, I have:

GRUB_CMDLINE_LINUX_DEFAULT='radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 nvme_load=YES zswap.enabled=0 splash loglevel=3'

 

3. Don't set environment variables unless the above doesn't work for you. If you must, set the renderer to RADV

Link to comment
Share on other sites

One additional point: these kernel parameters combined with some experimental kernels (namely CachyOS BORE) will stress the GPU to the extent of becoming unstable. It is somewhat likely to crash your entire OS mid-game if you stress your GPU too much. You can switch to Linux-LTS for more stability at the cost of some performance. But if you don't want to change kernels, my advice:

1. Make sure your GPU cooling is sufficient and temperatures are low. You might need to manually adjust the fans (I kept it at 100% while gaming and the crash didn't happen; the default fan curve was not ideal)

2. Throttle the maximum fps in your game settings options:

  • Vsync = on
  • Menu maximum fps = 60
  • Game maximum fps = whatever your screen offers, or 120fps (generally enough).

3. Cancel overclocks or turbo mode for stability. 

4. Some AMD cards draw more power than a PCIE power supply is designed to give. If it has 2x 8-pin connectors, plug in 2 different PCIe cables from the power supply, not from the same one cable with a splitter. 

5. If game still crashes on Vulkan, lower graphics settings.

 

Fortunately, 0ad is not a very big GPU destroyer. Some Steam games when run with proton crashes the system in just a few minutes. 

Edited by Seleucids
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...