Radeon RX 6800 XT and Linux


So I got Radeon 6800 XT working on Ubuntu 18.04.5 LTS but it wasn’t hassle free, given the card is too new

To get it working, you’ll need the following:

Kernel Installation

Without a newer Kernel, the OS won’t know how to talk to the GPU.

Kernel 5.13 is recommended. Why? Because at 5.11 idle consumption is around 35W with idle temps at 50°C

With 5.13 idle consumption is around 7-10W with idle temps at 30°C

Newer firmware

Download the bundle, uncompress it, and then type

sudo make install

Then reboot

Kisak PPA

I’m not sure if it’s needed but it was on my machine, but my machine is a mess of custom-Mesa installations. Kisak’s PPA fixed it for me.

sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get update 
sudo apt-get upgrade

Note: Kisak’s PPA is incompatible with upstream LLVM apt repositories because Kisak will want to install i386 versions too, but upstream LLVM no longer provides i386 installations. Hence apt will want to install LLVM from upstream over Kisak for x64 but then reject the solution because only Kisak’s i386 are available and can’t continue.

Make sure to remove upstream LLVM for the relevant LLVM version Kisak wants to install before upgrading. IF YOU DON’T DO THIS YOUR SYSTEM GRAPHICS WILL OTHERWISE BE PUT INTO A HEAVILY BROKEN STATE AND PPA-PURGE WON’T FIX IT. YOU’VE BEEN WARNED.

Note 2: If Kisak’s upgrade fails on the first try, try again using aptitude and accept the proposed solution where everything is installed

Full RGB

These cards come with 3 Display Ports and 1 HDMI. If you use a passive DP -> HDMI adapter and connect the DP port to an HDMI display, you’ll noticed the blacks got “crushed”:

Full RGB
YCbCr

Open both images in another tab and switch between them. You’ll notice the YCbCr is ‘darker’. These pics were taken with the same F-stop, ISO level and focus. And it is VERY noticeable to the naked eye.

This happens on Windows too. But on Windows the solution is simple: Go to AMD Control Panel -> Display -> Pixel Format -> Full RGB 4:4:4

To fix it on Linux you have two solutions:

  1. Create a fake EDID that doesn’t report YCbCr (uggggghhhh)
  2. Build kernel 5.13.7 yourself and apply this patch (I fixed a few missing ‘;’ that will cause it to fail to compile from the patch submitted to the ticket). It hasn’t been integrated to upstream yet due to upstream KMS requirements.

Building kernel from source isn’t hard, it just takes time. Where you’ve decompressed the kernel:

git apply patch FullRGB_5.13.7.patch
cp -v /boot/config-$(uname -r) .config
make menuconfig
# Chose Save and then Exit
# Open .config and unset CONFIG_DEBUG_INFO_BTF which will cause trouble while linking the whole thing in Ubuntu 18.04 & 21.04
make -j4
sudo make modules_install INSTALL_MOD_STRIP=1
sudo make install
sudo update-grub

Now reboot. And use the following cmd to change the pixel format:

xrandr --output DisplayPort-1 --set "pixel encoding" "rgb"

You’re done.

I hope the patch gets to upstream soon, all major distros pick it up (specially before freezing the next LTS…), and userspace programs adapt to include this option in the display settings. This is important for a good out of the box experience with this HW.

There’s a lot of rough edges because the HW is too new; and it seems Linux is taking longer time than usual (for AMD GPUs, which has always been plug and play for the last 5 years) to catch up and get a good experience out of the box. But now after this grunt work it will end up working beautifully. This must obviously be the reason Valve is shipping Steam Deck (RDNA2 hardware) with Arch.

The only thing’s missing is Mesa Raytracing.