AMD Radeon 5700 XT - Fully working

There are a few posts in various places talking about the 5700 xt, but most of them are months old and a lot has changed in that time. I've tried a number of things and my best attempt (before now) got me stable, but not fast.

Tonight, however, things changed, after following through some of the other threads and undoing a lot of what I tried previously, I got things working and performing amazing... and since the actual steps to working are now pretty simple, I thought I'd share them.

First, I had to stick to the 5.3 kernel to get things to work in a stable fashion. It's possible it will work in 5.4, but I haven't tried since I got it working. As of right now, I am running the linux53 kernel: 5.3.18-1-MANJARO

I installed the following packages (all the current defaults under stable as of 2020-01-06)

clang 9.0.0-3
lib32-clang 9.0.0-2
llvm 9.0.0-4
lib32-llvm 9.0.0-1
llvm-libs 9.0.0-4
lib32-llvm-libs 9.0.0-1
mesa 19.3.1-1
lib32-mesa 19.3.1-1
xf86-video-amdgpu 19.1.0-1
lib32-vulkan-icd-loader 1.1.130-1
vulkan-headers 1:1.1.130-1
vulkan-icd-loader 1.1.130-1
vulkan-radeon 19.3.1-1
vulkan-tools 1.1.130-1
amdvlk 2019.Q4.5-1
lib32-amdvlk 2019.Q4.5-1
opencl-amd 19.30.934563-1

You can install those with the following command:

sudo pacman -S clang lib32-clang llvm lib32-llvm llvm-libs lib32-llvm-libs mesa lib32-mesa xf86-video-amdgpu lib32-vulkan-icd-loadervulkan-headers vulkan-icd-loader vulkan-radeon vulkan-tools amdvlk lib32-amdvlk opencl-amd

and then reboot.

I do NOT have any special settings in my modprobe.d (no aspm=0 or dpm=0, as mentioned in other posts)

I do have an /etc/X11/xorg.conf.d/20-amdgpu.conf that contains:

Section "Device"
    Option     "Accel" "true"
    Identifier  "Card0"
    Driver      "amdgpu"

Before I had this set up I had it working, but was getting very poor performance, as evidenced by these glmark2 scores:

glmark2 2014.03
OpenGL Information
GL_VENDOR:     X.Org
GL_RENDERER:   AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 10.0.0)
GL_VERSION:    4.6 (Compatibility Profile) Mesa 20.0.0-devel (git-645b195312)
[build] use-vbo=false: FPS: 5103 FrameTime: 0.196 ms
[build] use-vbo=true: FPS: 6988 FrameTime: 0.143 ms
[texture] texture-filter=nearest: FPS: 6523 FrameTime: 0.153 ms
[texture] texture-filter=linear: FPS: 6452 FrameTime: 0.155 ms
[texture] texture-filter=mipmap: FPS: 6670 FrameTime: 0.150 ms
[shading] shading=gouraud: FPS: 6363 FrameTime: 0.157 ms
[shading] shading=blinn-phong-inf: FPS: 6269 FrameTime: 0.160 ms
[shading] shading=phong: FPS: 6063 FrameTime: 0.165 ms
[shading] shading=cel: FPS: 6076 FrameTime: 0.165 ms
[bump] bump-render=high-poly: FPS: 3917 FrameTime: 0.255 ms
[bump] bump-render=normals: FPS: 6978 FrameTime: 0.143 ms
[bump] bump-render=height: FPS: 6679 FrameTime: 0.150 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 5064 FrameTime: 0.197 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 3041 FrameTime: 0.329 ms
[pulsar] light=false:quads=5:texture=false: FPS: 6409 FrameTime: 0.156 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 2072 FrameTime: 0.483 ms
[desktop] effect=shadow:windows=4: FPS: 4332 FrameTime: 0.231 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1687 FrameTime: 0.593 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 2053 FrameTime: 0.487 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1756 FrameTime: 0.569 ms
[ideas] speed=duration: FPS: 3869 FrameTime: 0.258 ms
[jellyfish] <default>: FPS: 5041 FrameTime: 0.198 ms
[terrain] <default>: FPS: 541 FrameTime: 1.848 ms
[shadow] <default>: FPS: 4691 FrameTime: 0.213 ms
[refract] <default>: FPS: 1413 FrameTime: 0.708 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 6144 FrameTime: 0.163 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 6084 FrameTime: 0.164 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 6089 FrameTime: 0.164 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 6037 FrameTime: 0.166 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 6124 FrameTime: 0.163 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 6050 FrameTime: 0.165 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 5831 FrameTime: 0.171 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 6099 FrameTime: 0.164 ms
glmark2 Score: 4985

My new scores with the packages / configs outlined above:

glmark2 2014.03
OpenGL Information
GL_VENDOR:     X.Org
GL_RENDERER:   AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 9.0.0)
GL_VERSION:    4.5 (Compatibility Profile) Mesa 19.3.1
[build] use-vbo=false: FPS: 9715 FrameTime: 0.103 ms
[build] use-vbo=true: FPS: 15567 FrameTime: 0.064 ms
[texture] texture-filter=nearest: FPS: 15612 FrameTime: 0.064 ms
[texture] texture-filter=linear: FPS: 15922 FrameTime: 0.063 ms
[texture] texture-filter=mipmap: FPS: 16471 FrameTime: 0.061 ms
[shading] shading=gouraud: FPS: 16020 FrameTime: 0.062 ms
[shading] shading=blinn-phong-inf: FPS: 16569 FrameTime: 0.060 ms
[shading] shading=phong: FPS: 14681 FrameTime: 0.068 ms
[shading] shading=cel: FPS: 15297 FrameTime: 0.065 ms
[bump] bump-render=high-poly: FPS: 14807 FrameTime: 0.068 ms
[bump] bump-render=normals: FPS: 15465 FrameTime: 0.065 ms
[bump] bump-render=height: FPS: 14837 FrameTime: 0.067 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 14973 FrameTime: 0.067 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 15696 FrameTime: 0.064 ms
[pulsar] light=false:quads=5:texture=false: FPS: 15409 FrameTime: 0.065 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 10134 FrameTime: 0.099 ms
[desktop] effect=shadow:windows=4: FPS: 10018 FrameTime: 0.100 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1826 FrameTime: 0.548 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 2321 FrameTime: 0.431 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1929 FrameTime: 0.518 ms
[ideas] speed=duration: FPS: 5331 FrameTime: 0.188 ms
[jellyfish] <default>: FPS: 14488 FrameTime: 0.069 ms
[terrain] <default>: FPS: 3037 FrameTime: 0.329 ms
[shadow] <default>: FPS: 13823 FrameTime: 0.072 ms
[refract] <default>: FPS: 7614 FrameTime: 0.131 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 14661 FrameTime: 0.068 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 15538 FrameTime: 0.064 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 14840 FrameTime: 0.067 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 14973 FrameTime: 0.067 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 14374 FrameTime: 0.070 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 15686 FrameTime: 0.064 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 14294 FrameTime: 0.070 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 15534 FrameTime: 0.064 ms
glmark2 Score: 12650

Just thought I'd share for future travelers. I'm happy to answer any questions if anyone has any.



@philm can you check this with LLVM 9.00 ( not 10 ) , and also Mesa 19.3.1 ?

You should try kernel 5.5, it works amazingly!

Is opencl working on it?

My 5700 (without XT) works out of the box with 5.4 and Mesa > 19.3.0.

I want to run 5.5, but I have zfs drives, and zfs and 5.5 don't get along yet. Soon, I hope.

Hmm. Maybe I'll test with 5.4 later today. Do you still need to have the AMDGPU=nodma in /etc/environment?

No, I don't have that.

The first few versions of 5.4 were a little problematic with dual-monitor, but the problem seems to have been solved with later releases.
Note that I use a custom 5.4 with a few amdgpu related patches, but I installed it with default Manjaro 5.4 kernel without any issue.

clinfo says yes, but I don't know how to test it:

$ clinfo
Number of platforms                               2
Platform Name                                   Clover
Platform Vendor                                 Mesa
Platform Version                                OpenCL 1.1 Mesa 19.3.1
Platform Profile                                FULL_PROFILE
Platform Extensions                             cl_khr_icd
Platform Extensions function suffix             MESA

Platform Name                                   AMD Accelerated Parallel Processing
Platform Vendor                                 Advanced Micro Devices, Inc.
Platform Version                                OpenCL 2.1 AMD-APP (2906.7)
Platform Profile                                FULL_PROFILE
Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
Platform Host timer resolution                  1ns
Platform Extensions function suffix             AMD

Platform Name                                   Clover
Number of devices                                 1
Device Name                                     AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 9.0.0)
Device Vendor                                   AMD
Device Vendor ID                                0x1002
Device Version                                  OpenCL 1.1 Mesa 19.3.1
Driver Version                                  19.3.1
Device OpenCL C Version                         OpenCL C 1.1 
Device Type                                     GPU
Device Profile                                  FULL_PROFILE
Device Available                                Yes
Compiler Available                              Yes
Max compute units                               40
Max clock frequency                             2100MHz
Max work item dimensions                        3
Max work item sizes                             256x256x256
Max work group size                             256
fatal error: cannot open file '/usr/lib/clc/gfx1010-amdgcn-mesa-mesa3d.bc': No such file or directory
Preferred work group size multiple              <getWGsizes:1200: create kernel : error -46>
Preferred / native vector sizes                 
char                                                16 / 16      
short                                                8 / 8       
int                                                  4 / 4       
long                                                 2 / 2       
half                                                 8 / 8        (cl_khr_fp16)
float                                                4 / 4       
double                                               2 / 2        (cl_khr_fp64)
Half-precision Floating-point support           (cl_khr_fp16)
Denormals                                     No
Infinity and NANs                             Yes
Round to nearest                              Yes
Round to zero                                 No
Round to infinity                             No
IEEE754-2008 fused multiply-add               No
Support is emulated in software               No
Single-precision Floating-point support         (core)
Denormals                                     No
Infinity and NANs                             Yes
Round to nearest                              Yes
Round to zero                                 No
Round to infinity                             No
IEEE754-2008 fused multiply-add               No
Support is emulated in software               No
Correctly-rounded divide and sqrt operations  No
Double-precision Floating-point support         (cl_khr_fp64)
Denormals                                     Yes
Infinity and NANs                             Yes
Round to nearest                              Yes
Round to zero                                 Yes
Round to infinity                             Yes
IEEE754-2008 fused multiply-add               Yes
Support is emulated in software               No
Address bits                                    64, Little-Endian
Global memory size                              8589934592 (8GiB)
Error Correction support                        No
Max memory allocation                           6871947673 (6.4GiB)
Unified memory for Host and Device              No
Minimum alignment for any data type             128 bytes
Alignment of base address                       32768 bits (4096 bytes)
Global Memory cache type                        None
Image support                                   No
Local memory type                               Local
Local memory size                               32768 (32KiB)
Max number of constant args                     16
Max constant buffer size                        2147483647 (2GiB)
Max size of kernel argument                     1024
Queue properties
Out-of-order execution                        No
Profiling                                     Yes
Profiling timer resolution                      0ns
Execution capabilities
Run OpenCL kernels                            Yes
Run native kernels                            No
Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16

Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 0

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
clCreateContext(NULL, ...) [default]            Success [MESA]
clCreateContext(NULL, ...) [other]              p��V
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
Platform Name                                 Clover
Device Name                                   AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 9.0.0)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
Platform Name                                 Clover
Device Name                                   AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 9.0.0)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
Platform Name                                 Clover
Device Name                                   AMD NAVI10 (DRM 3.33.0, 5.3.18-1-MANJARO, LLVM 9.0.0)

ICD loader properties
ICD loader Name                                 OpenCL ICD Loader
ICD loader Vendor                               OCL Icd free software
ICD loader Version                              2.2.12
ICD loader Profile                              OpenCL 2.2
1 Like

Maybe that was my issue. I run two 1440p monitors and it was not happy.

What patches? What do they do?


Kinda sad it took so long to get it up, but it's great to see it working now.

How did the issue present itself?
In my case, it was some apparently random flickering with early versions of 5.4. The problem seems to have been solved with later releases, so you might want to check 5.4 again.

I'm running 5.4.8 with the 5700 XT. No extra packages, no kernel parameters, just a simple out of the box install. Everything is running perfectly.

I did however have a few issues earlier on that I wrongly associated with amdgpu. It was the realtek drivers for my wifi card. Disabled the card in the BIOS and everything runs perfectly.

Saying that though, I do not game on Linux. Under Windows, when gaming, each game will crash to desktop at least once.

you should run a memtest on your RAM. That behaviour was always typical when I had bad RAM modules on the board - only in some cases it produced bluescreens.

The RAM is fairly new and I test it regularly (Had a stick go bad after 6 months). Most games ran without a problem before the Radeon driver had an overhaul. I'm not a big gamer so I don't really make an issue of it, but the game will usually crash within 5 minutes of being opened then run without a problem on relaunch. I'm fairly certain it's a driver issue.

Also, should mention that it doesn't necessarily need to be bad RAM. I had similar issues when the wrong XMP profile was selected in the BIOS.

I had some flickering and some screen garbage in some scenarios, but I also got really slow performance and hangs.

I tried updating my manjaro to testing and kernel 5.4.8 this morning. Unfortunately, though I don't have errors anymore, the performance tanks. In the phoronix unigen-heaven test - I went from 121 fps under 5.3.18 to 24 fps under 5.4.8.

So, for the time being 5.3 seems to be it for me. :-/

The problem is that 5.3 is EOL and doesn't receive updates anymore...

A step in the right direction at least. Maybe 5.4 needs a few more fixes until it's suitable for you.
When I find some time, I can compare Manjaro 5.4 with my custom one and see if there's a difference in Unigine Heaven.

That's ok. No updates means it will keep working. :laughing:

That'd be great if you are willing. I'd love to know what you get in like glmark2 or vkmark currently.

Didn't have time for the Manjaro kernel, but with my custom 5.4, I get

GL_RENDERER:   AMD NAVI10 (DRM 3.35.0, 5.4.8-1-vd, LLVM 9.0.0)
GL_VERSION:    4.5 (Compatibility Profile) Mesa 19.3.1
glmark2 Score: 20369

That's quite a difference, although I don't know how reliable glmark2 is.

Unigine Heaven (1920x1080 windowed, 8x AA, ultra quality):

FPS: 97.8
Score: 2462
Min FPS: 17.0
Max FPS: 176.5

Thanks for that. :smile:

Wow. So yours is showing even faster than mine when it's working well. That's something to look forward to. What patches are you using? Can you share your kernel config? I'd like to try the same thing.

Forum kindly sponsored by