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

From RCS Wiki
Jump to navigation Jump to search
(Add missing openssl-devel installation command)
(Copy config of currently running kernel (old code fails if more than one kernel is installed))
 
Line 114: Line 114:
 
Configure the kernel, selecting the defaults and DCN2_0 if prompted:
 
Configure the kernel, selecting the defaults and DCN2_0 if prompted:
 
<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 fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span>
+
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-$(uname -r) .config</span>
 +
[user@bb fedora]$ <span style="font-weight: bold;"># cp /boot/config-*.ppc64le .config # this works only if you have exactly one installed kernel!</span>
 
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span>
 
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span>
 
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span>
 
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span>

Latest revision as of 16:38, 31 January 2020

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. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:

Download and apply the kernel patches:

Configure the kernel, selecting the defaults and DCN2_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. (Replace the text in red as appropriate.)

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