Aug 30, 2021

Fedora 35-37 Vulkan driver for some AMD GPUs

For AMD graphics cards between around 2012 and 2015, Fedora does not always correctly implement the amdgpu driver with Vulkan support for these cards.
 

Note: "Caribbean Island" is sometimes used to refer to "Sea Island" cards

 

Why Want or Need Vulkan?

Vulkan is a serious cross platform graphics API that many Linux interfaces and games are using to more directly and efficiently use a GPU's power.

Some desktop environments and games are moving to use Vulkan exclusively.


 


This Guide

After I made the changes in this post, I could run Veloren, as well as Steam Proton games like ESV Skyrim on my 2GB card.


Most of the information I found was obscurely placed, and generally for Ubuntu based distros. Linux gaming should not be very techy, so hopefully this post can be of some use.




Contents:



Methods to Verify GPU's Vulkan Support

Vulkan support is frequently unlisted on vendor sites and packaging






 
 
 
 
Use the browser's find tool to search for the GPU model name.




















 
Look Up the GPU Model Name




 
 
Click the Driver Release Notes Link
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 

 















Testing Whether Vulkan Is In Use

Requires sudo privileges


You can test Vulkan operation with vkcube

In a terminal:
  1. $ dnf install vulkan-tools
  2. $ vkcube


Vkcube should open a graphical window with a animated cube if Vulkan is working.




How to check the driver in use:

Requires sudo privileges
 
 In a terminal:
  1. $ dnf install lshw
  2. $ lshw -c video | grep driver=

If you see "radeon" as in:

driver=radeon latency=x

then, you will want to switch to the amdgpu driver for these older AMD graphics cards. (Which is covered in the next sections.)


If you are already using the amdgpu driver and Vulkan is not working, then your older card might not support Vulkan at all, or you need to find a solution outside this blog post.









Blacklisting the Radeon Driver

NOTE: Doing this is redundant with adding the kernel parameters in the next section. However, I'm going to include this section just in case people are curious.

Requires sudo privileges

 

In a terminal:

  1. Navigate to the directory with kernel module .conf files
    • $ cd /etc/modprobe.d/
  2. Create a custom .conf file
    • $ touch custom_blacklist.conf
  3. Open/Edit the file:
    • $ vi custom_blacklist.conf
    • (in vi, you must hit the "i" key for insert text mode)
  4. Add/Save this single line to the file
    • blacklist radeon
    • (in vi, you hit the Esc key to exit insert text mode, then type ":!wq", and then Enter/Return to save and exit)








Configure Grub Kernel Parameters

Requires sudo privileges


In a terminal:

  1. Navigate to the directory with the grub configuration file
    • $ cd /etc/default/
  2. Back up the configuration file (in case you need to reverse these changes)
    • $ cp grub grub.bak
  3. Open the grub configuration file
    • $ vi grub
    • (in vi, you must hit the "i" key for insert text mode)
  4. Add/Save this single line to the file
    • GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 amdgpu.dc=1 amdgpu.dpm=1"
    • (in vi, you hit the Esc key to exit insert text mode, then type ":!wq", and then Enter/Return to save and exit)
  5. Finalize the kernel settings to grub's configuration
    • $ grub2-mkconfig -o /boot/efi/EFI/fedora/grub2.cfg
    • (This is the default location of this file, but you might want to check
  6. Restart the computer, and the changes should take effect


In order to reverse your changes

  1. rename the file "grub.bak" to "grub", in place of the new one
    1. $ cd /etc/default/
    2. ie: $ mv grub grub.failed && mv grub.bak grub
  2. Re-run the grub configuration command:
    •  $ grub2-mkconfig -o /boot/efi/EFI/fedora/grub2.cfg
  3. Restart the computer again




Explanation of kernel parameter settings

  • amdgpu.ppfeaturemask=0xffffffff
    • This is very optional, and it honestly does not relate to Vulkan
    • This makes it so the CoreCtrl desktop application can help you optimize GPU settings conveniently
    • $ dnf install corectrl
  • radeon.si_support=0
    • [zero] disallows the radeon driver for southern island chip GPUs 
    • "si" stands for "southern island" meaning southern island chips
    • "radeon" means the radeon driver (as opposed to the amdgpu driver)
  • radeon.cik_support=0
    • [zero] disallows the radeon driver for caribbean/sea island chip GPUs and newer
    • "cik" means "caribbean island" or "sea island" chips (and newer?)
    • "radeon" means the radeon driver (as opposed to the amdgpu driver)
  • amdgpu.si_support=1
    • [one] allows the amdgpu driver for southern island chip GPUs, which includes Vulkan support for some older cards
    • "amdgpu" and "si" refers to the amdgpu driver, for southern island chip GPUs
  • amdgpu.cik_support=1
    • [one] allows the amdgpu driver for caribbean/sea island chip GPUs and newer
    • "amdgpu" and "cik" refers to the amdgpu driver, for caribbean/sea island chip GPUs and newer

 

These Parameter Settings Might Fix or Brake Things

  • amdgpu.dc=1
    • Display Core driver for debugging
      • -1 : auto
      • 0 : disabled
      • 1 : enabled
  • amdgpu.dpm=1
    • Dynamic Power Management
      • -1 auto
      • 0 : disabled
      • 1 : enabled

 

 

 

 

 

 

 

 

 

References:

https://ask.fedoraproject.org/t/activate-amdgpu-for-ci-or-si-generation/9176

https://wiki.archlinux.org/title/Kernel_mode_setting

https://wiki.archlinux.org/title/AMDGPU

https://www.kernel.org/doc/html/v4.20/gpu/amdgpu.html






1 comment:

Post a Comment