Skip to content

AMD RADEON SETUP ON FEDORA LINUX

This guide is to help get rocking with an AMD GPU on Fedora 29 or later. Tested on F29 + XFX RX590 Fatboy, and somewhat tailored to the RX590, but intentionally made that other GPUs can be made working as well. This will cover removal of any NVIDIA drivers present, and packages that are needed, and any file modifications.

UPDATE SYSTEM

You need to have kernel 4.20 or later. 5.x is best, and now in the repos as of the time of writing (kernel-5.0.3-200)

PACKAGE MANIPULATION

  • Remove all things nvidia.

    sudo yum remove nvidia* xorg-x11-drv-nvidia*
    
  • Install vulkan

    $ rpm -qa | grep vulkan | sort
    mesa-vulkan-drivers-18.3.4-1.fc29.i686
    mesa-vulkan-drivers-18.3.4-1.fc29.x86_64
    vulkan-loader-1.1.92.0-1.fc29.i686
    vulkan-loader-1.1.92.0-1.fc29.x86_64
    vulkan-tools-1.1.82.0-1.fc29.x86_64
    
  • Ensure mesa is installed. You will need both x32 & x64 versions of vulkan, libGL, dri-drivers minimally. This will allow for vulkan, dxvk, radv to all work correctly. Here is what I have from my working setup:

    # rpm -qa | grep mesa | sort
    mesa-dri-drivers-18.3.4-1.fc29.i686
    mesa-dri-drivers-18.3.4-1.fc29.x86_64
    mesa-filesystem-18.3.4-1.fc29.i686
    mesa-filesystem-18.3.4-1.fc29.x86_64
    mesa-khr-devel-18.3.4-1.fc29.i686
    mesa-khr-devel-18.3.4-1.fc29.x86_64
    mesa-libEGL-18.3.4-1.fc29.i686
    mesa-libEGL-18.3.4-1.fc29.x86_64
    mesa-libEGL-devel-18.3.4-1.fc29.i686
    mesa-libEGL-devel-18.3.4-1.fc29.x86_64
    mesa-libgbm-18.3.4-1.fc29.i686
    mesa-libgbm-18.3.4-1.fc29.x86_64
    mesa-libGL-18.3.4-1.fc29.i686
    mesa-libGL-18.3.4-1.fc29.x86_64
    mesa-libglapi-18.3.4-1.fc29.i686
    mesa-libglapi-18.3.4-1.fc29.x86_64
    mesa-libGL-devel-18.3.4-1.fc29.x86_64
    mesa-libGLES-18.3.4-1.fc29.i686
    mesa-libGLES-18.3.4-1.fc29.x86_64
    mesa-libGLES-devel-18.3.4-1.fc29.i686
    mesa-libGLES-devel-18.3.4-1.fc29.x86_64
    mesa-libGLU-9.0.0-16.fc29.x86_64
    mesa-libGLU-devel-9.0.0-16.fc29.x86_64
    mesa-libOpenCL-18.3.4-1.fc29.x86_64
    mesa-libOSMesa-18.3.4-1.fc29.i686
    mesa-libOSMesa-18.3.4-1.fc29.x86_64
    mesa-libxatracker-18.3.4-1.fc29.x86_64
    mesa-vulkan-drivers-18.3.4-1.fc29.i686
    mesa-vulkan-drivers-18.3.4-1.fc29.x86_64
    
  • Install xorg driver.

    sudo yum install xorg-x11-drv-amdgpu
    

FILE MANIPULATIONS

  • Ensure you have the Polaris firmware for the RX590, or the appropriate ones for your GPU. If you have kernel 4.20+ you should be good with the RX590, earlier cards I would be shocked if it wasn't present.

    # ls -C1 /lib/firmware/amdgpu/polaris*
    /lib/firmware/amdgpu/polaris10_ce_2.bin
    /lib/firmware/amdgpu/polaris10_ce.bin
    /lib/firmware/amdgpu/polaris10_k2_smc.bin
    /lib/firmware/amdgpu/polaris10_k_mc.bin
    /lib/firmware/amdgpu/polaris10_k_smc.bin
    /lib/firmware/amdgpu/polaris10_mc.bin
    /lib/firmware/amdgpu/polaris10_me_2.bin
    /lib/firmware/amdgpu/polaris10_me.bin
    /lib/firmware/amdgpu/polaris10_mec2_2.bin
    /lib/firmware/amdgpu/polaris10_mec_2.bin
    /lib/firmware/amdgpu/polaris10_mec2.bin
    /lib/firmware/amdgpu/polaris10_mec.bin
    /lib/firmware/amdgpu/polaris10_pfp_2.bin
    /lib/firmware/amdgpu/polaris10_pfp.bin
    /lib/firmware/amdgpu/polaris10_rlc.bin
    /lib/firmware/amdgpu/polaris10_sdma1.bin
    /lib/firmware/amdgpu/polaris10_sdma.bin
    /lib/firmware/amdgpu/polaris10_smc.bin
    /lib/firmware/amdgpu/polaris10_smc_sk.bin
    /lib/firmware/amdgpu/polaris10_uvd.bin
    /lib/firmware/amdgpu/polaris10_vce.bin
    /lib/firmware/amdgpu/polaris11_ce_2.bin
    /lib/firmware/amdgpu/polaris11_ce.bin
    /lib/firmware/amdgpu/polaris11_k2_smc.bin
    /lib/firmware/amdgpu/polaris11_k_mc.bin
    /lib/firmware/amdgpu/polaris11_k_smc.bin
    /lib/firmware/amdgpu/polaris11_mc.bin
    /lib/firmware/amdgpu/polaris11_me_2.bin
    /lib/firmware/amdgpu/polaris11_me.bin
    /lib/firmware/amdgpu/polaris11_mec2_2.bin
    /lib/firmware/amdgpu/polaris11_mec_2.bin
    /lib/firmware/amdgpu/polaris11_mec2.bin
    /lib/firmware/amdgpu/polaris11_mec.bin
    /lib/firmware/amdgpu/polaris11_pfp_2.bin
    /lib/firmware/amdgpu/polaris11_pfp.bin
    /lib/firmware/amdgpu/polaris11_rlc.bin
    /lib/firmware/amdgpu/polaris11_sdma1.bin
    /lib/firmware/amdgpu/polaris11_sdma.bin
    /lib/firmware/amdgpu/polaris11_smc.bin
    /lib/firmware/amdgpu/polaris11_smc_sk.bin
    /lib/firmware/amdgpu/polaris11_uvd.bin
    /lib/firmware/amdgpu/polaris11_vce.bin
    /lib/firmware/amdgpu/polaris12_ce_2.bin
    /lib/firmware/amdgpu/polaris12_ce.bin
    /lib/firmware/amdgpu/polaris12_k_mc.bin
    /lib/firmware/amdgpu/polaris12_k_smc.bin
    /lib/firmware/amdgpu/polaris12_mc.bin
    /lib/firmware/amdgpu/polaris12_me_2.bin
    /lib/firmware/amdgpu/polaris12_me.bin
    /lib/firmware/amdgpu/polaris12_mec2_2.bin
    /lib/firmware/amdgpu/polaris12_mec_2.bin
    /lib/firmware/amdgpu/polaris12_mec2.bin
    /lib/firmware/amdgpu/polaris12_mec.bin
    /lib/firmware/amdgpu/polaris12_pfp_2.bin
    /lib/firmware/amdgpu/polaris12_pfp.bin
    /lib/firmware/amdgpu/polaris12_rlc.bin
    /lib/firmware/amdgpu/polaris12_sdma1.bin
    /lib/firmware/amdgpu/polaris12_sdma.bin
    /lib/firmware/amdgpu/polaris12_smc.bin
    /lib/firmware/amdgpu/polaris12_uvd.bin
    /lib/firmware/amdgpu/polaris12_vce.bin
    #
    
  • Due to Kernel issues with new hardware, a change to /etc/default/grub may be necessary for proper boot. To fix, have the last two elements on the GRUB_CMDLINE_LINUX line below as it fixes amdgpu not loading correctly due to improper GPU detection. The flag depends on the GCN version we are using. Non GCN based cards are not compatible with amdgpu, rather use the radeon driver instead. If you are unsure, try booting without the flag. If you get to a login, you do not need the paramaters. A black screen for more than a few minutes indicates that something went wrong with the detection. Initial boots may be slow, but subsequent ones are very fast - seconds, not minutes.

GCN 1

  • Southern Islands
    GRUB_CMDLINE_LINUX="rhgb quiet splash radeon.si_support=0 amdgpu.si_support=1"
    

GCN 2+

  • GCN 2: Sea Islands
  • GCN 3: Volcanic Islands, Pirate Islands
  • GCN 4: Polaris
  • GCN 5: Vega

            GRUB_CMDLINE_LINUX="rhgb quiet splash radeon.cik_support=0 amdgpu.cik_support=1"
    
  • Install GRUB with the new settings.

    • EFI

      $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

    • BIOS/Legacy

      $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

REBOOT

Poweroff to install card. Then power on. You should be eventually looking at a login, whether GUI or TUI, depending on runlevel. There may be a delay as the card is initialized the very first boot. If it is slow, wait it out for a few moments.

FIXING PLYMOUTH

I ran into an issue where plymouth didn't show anything. Most of what I saw online didn't help, and led me to believe that either I needed a forced dracut run or the system was too fast due to the SSD for my /efi, /boot, and /. Here are some steps to absolutlely fix the issue, albeit perhaps a wee bit overkill. This is tailored to EFI based systems, alter accordingly to any BIOS/legacy installation environments.

  1. Edit /etc/default/grub to have the following lines and information:

    GRUB_CMDLINE_LINUX="rhgb quiet splash radeon.cik_support=0 amdgpu.cik_support=1"
    GRUB_GFXPAYLOAD_LINUX="keep"
    GRUB_VIDEO_BACKEND="efi_uga"
    GRUB_TERMINAL_OUTPUT="gfxterm"
    GRUB_FONT_PATH="/boot/efi/EFI/fedora/fonts/unicode.pf2"
    GRUB_GFXMODE="auto"
    
  2. Edit /etc/plymouth/plymouthd.conf and add the following line somewhere:

    ShowDelay=0
    
  3. Set your favorite plymouth theme. Here is how to setup from scratch the beefy-miracle theme:

    $ sudo dnf install plymouth-theme-hot-dog
    $ sudo plymouth-set-default-theme hot-dog -R
    $ sudo plymouth-set-default-theme
    hot-dog
    
  4. Rebuild GRUB:

    $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
    
  5. Force dracut to run:

    $ sudo dracut --force
    
  6. Reboot

    $ sudo systemctl reboot
    

At this point you should be able to see the splash screen with our wonderful beefy miracle saying, "Yeah!"

REFERENCES