Difference between revisions of "Enabling Navi 10 On Fedora 31"

From RCS Wiki
Jump to navigation Jump to search
Line 194: Line 194:
 
The /boot/grub2/grubenv file must be updated
 
The /boot/grub2/grubenv file must be updated
 
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}">
 
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}">
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1</span>+/g' /boot/grub2/grubenv
+
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv
 
[user@bb ~]$ sudo cat /boot/grub2/grubenv
 
[user@bb ~]$ sudo cat /boot/grub2/grubenv
 
# GRUB Environment Block
 
# GRUB Environment Block

Revision as of 23:12, 10 December 2019

Purpose

This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.

Background

Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.

Preparations

Disabling fast-reset

AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot.

First, exit to the shell in petitboot.

Next, update the nvram configuration using nvram -p ibm,skiboot --update-config fast-reset=0

To confirm that the variable was updated, use nvram -p ibm,skiboot --print-config

Exit and boot back in to Fedora.

Installing the Development Tools

Before building a custom kernel, the development tools must be installed

Compiling The Kernel

An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees

First, checkout the kernel source code:

Download and apply the kernel patches:

Configure the kernel, selecting the defaults and DCN_2_0 if prompted:

Build the kernel

Installing the kernel

At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.

Defaulting to the new Kernel

Before the patched kernel will be automatically booted, the grub configuration file must be changed.

Locate the entry id

Update the default kernel

The /boot/grub2/grubenv file must be updated

Configuring The Display

Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime