AMD Radeon Drivers Not Installing

I have an MSI Radeon RX 580 graphics card that I am trying to get to work on Fedora. It works ok with the generic drivers but I’m trying to run DaVinci Resolve Studio on this computer and in order for Resolve to work I need the proprietary AMD drivers for OpenCL.

Now since Fedora is basically the same as RHEL / CentOS I’m trying to install the RHEL CentOS 8.5 drivers on my computer. I’m getting the drivers from this page. When I install amdgpu-install-21.50.2.50002-1.el8.noarch.rpm and then run amdgpu-install from the command line, I get this output:

$ sudo amdgpu-install
AMDGPU 21.50.2 repository                                                                                         1.2 kB/s | 178  B     00:00    
Errors during downloading metadata for repository 'amdgpu':
  - Status code: 404 for https://repo.radeon.com/amdgpu/21.50.2/rhel//main/x86_64/repodata/repomd.xml (IP: 13.82.220.49)
Error: Failed to download metadata for repo 'amdgpu': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: amdgpu
Last metadata expiration check: 0:00:33 ago on Tue 10 May 2022 01:17:32 PM EDT.
No match for argument: amdgpu-lib
No match for argument: amdgpu-dkms
Error: Unable to find a match: amdgpu-lib amdgpu-dkms

Unsurprisingly, this doesn’t solve my problem and I am still unable to run DaVinci Resolve.

So I looked into the URL it gives me there, https://repo.radeon.com/amdgpu/21.50.2/rhel//main/x86_64/repodata/repomd.xml , and it is indeed a 404. But I found that if I edit the URL a bit and put an 8.5 for the version number in between ‘rhel//main’ I get a URL that works and doesn’t take me to a 404 page. ( https://repo.radeon.com/amdgpu/21.50.2/rhel/8.5/main/x86_64/repodata/repomd.xml )

So I’m thinking that there is a problem with the amdgpu-install script where it isn’t putting the version number in the URL for the metadata, which is preventing the package amdgpu from being installed properly, which is causing all the other problems I’m seeing.

As a side note, I also tried installing the drivers on CentOS Stream 8 and I had the same problem with the URL, but I didn’t have these problems:

No match for argument: amdgpu-lib
No match for argument: amdgpu-dkms

I have rebooted and this is my output from lspci -v:

0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] Radeon RX 580 Armor 4G OC
	Flags: bus master, fast devsel, latency 0, IRQ 120, IOMMU group 26
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at e000 [size=256]
	Memory at fce00000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at fce40000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

Also every time I try to use dnf to install anything I get this message at the top:

AMDGPU 21.50.2 repository                                                                                                                                                                                     1.3 kB/s | 178  B     00:00    
Errors during downloading metadata for repository 'amdgpu':
  - Status code: 404 for https://repo.radeon.com/amdgpu/21.50.2/rhel//main/x86_64/repodata/repomd.xml (IP: 13.82.220.49)
Error: Failed to download metadata for repo 'amdgpu': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: amdgpu
Last metadata expiration check: 2:21:06 ago on Tue 10 May 2022 02:08:57 PM EDT.

Does anybody have any ideas how to get these drivers installed properly so I can run Resolve?

I think I got somewhere-

I found the amdgpu.repo and amdgpu-proprietary.repo files in /etc/yum.repos.d and manually changed the variable that was being used in the URL in the baseurl variables to ‘8.5’.

I ran amdgpu-install again and it seems to have worked.

Yep, when I run clinfo I get this response:

$ clinfo
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.2 AMD-APP (3406.0)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback 
  Platform Extensions function suffix             AMD
  Platform Host timer resolution                  1ns

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  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)  No devices found in platform

Which leads me to believe that the drivers are installed successfully.

1 Like

The amdgpu drivers are in the Fedora kernel already. The amdgpu-pro drivers don’t officially support Fedora. I’ve gotten this far once or twice to find it breaks the system on a future kernel update. Unfortunately, OpenCL support for Radeon cards on Fedora is currently a pain point.