Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Gamers & Players
  • Search

AMD Mesa Vulkan RADV and AMDVLK heads up

Having problems getting your favorite Linux game to work? Want to discuss strategies? This is the place!
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Author
Message
ritzmax72
Tux's lil' helper
Tux's lil' helper
Posts: 131
Joined: Sun Aug 10, 2014 5:59 am

AMD Mesa Vulkan RADV and AMDVLK heads up

  • Quote

Post by ritzmax72 » Tue Oct 29, 2024 10:03 am

Despite what the gentoo page says https://wiki.gentoo.org/wiki/AMDVLK
that RADV and AMDVLK can co-exists and simply switching them with environment variables will make application use particular implementation;
that is not correct.

This worked for "Sons of the forest" as I switched between two drivers to measure difference but for Elden Ring the mere presence of amdvlk-bin made it crashed/suspended.
Elden Ring will start but it crashes/suspends before going into game world no matter what value you use for AMD_VULKAN_ICD=RADV/AMDVLK.

Uninstalling amdvlk-bin fixes Elden Ring and it runs fine with RADV.
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

  • Quote

Post by Naib » Fri Nov 01, 2024 10:39 pm

When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you select pro driver.

The best way to manage this, if you have the 3 types of drivers ( radv, amdvlk and pro) is to
1. disable switchable export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1

2. set VK_ICD_FILENAMES to the appropriate driver

Code: Select all


#!/bin/bash

# This script applies amdvlk-pro/amdvlk/radv Vulkan driver for specific application.
# You can see the list of available drivers with vulkaninfo utility, see the driverName and driverID lines.
# 
# Usage:
#   <vk_radv|vk_amdvlk|vk_pro> <app and its parameters>
# For example:
#   $ vk_pro vkmark
# This will start vkmark with AMDGPU PRO vulkan driver.

# When amdvlk is installed, then VK_ICD_FILENAMES is ignored and AMD_VULKAN_ICD is read instead. However, AMD_VULKAN_ICD does not allow you (afaics) select pro driver.
# So we revert this behavior to standard one.
export DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1

ICD_DIR="/usr/share/vulkan/icd.d"

vk_radv() {
    export VK_ICD_FILENAMES="${ICD_DIR}/radeon_icd.i686.json:${ICD_DIR}/radeon_icd.x86_64.json"
}

vk_amdvlk() {
    export VK_ICD_FILENAMES="${ICD_DIR}/amd_icd32.json:${ICD_DIR}/amd_icd64.json"
}

vk_pro() {
    export VK_ICD_FILENAMES="${ICD_DIR}/amd_pro_icd32.json:${ICD_DIR}/amd_pro_icd64.json"
}

if [[ $(basename $0) == vk_radv ]]; then
    vk_radv
elif [[ $(basename $0) == vk_amdvlk ]]; then
    vk_amdvlk
elif [[ $(basename $0) == vk_pro ]]; then
    vk_pro
else
    echo "Unknown function"
    exit 1
fi

# applied variables, now execute the rest of the command
"$@"
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
ritzmax72
Tux's lil' helper
Tux's lil' helper
Posts: 131
Joined: Sun Aug 10, 2014 5:59 am

  • Quote

Post by ritzmax72 » Thu Nov 07, 2024 4:57 am

Thanks. I will check that. Wish such kind of info was updated on gentoo's wiki? I don't know how Gentoo pages are managed but that could be a good thing to do.
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Thu Nov 07, 2024 12:14 pm

ritzmax72 wrote:I don't know how Gentoo pages are managed but that could be a good thing to do.
New details are managed by users like you, I and Naib as far as I can tell (I recognise some of the names appearing in code hints etc), The info in this thread should be in https://wiki.gentoo.org/wiki/AMDVLK#Mes ... perability IMHO, but other wiki editors will guide you if that's wrong I'm sure.
Top
Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Gamers & Players”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic