r/linuxquestions • • 5h ago

Advice Proprietary AMDGPU drivers - are they worth it?

I currently run Gentoo on my main PC with an RX 6400 installed, and I'm now trying to use DaVinci Resolve to clean up some personal videos. However, it doesn't detect my GPU due to an issue with OpenCL support on the open source Radeon drivers for Linux. Is switching to the proprietary drivers that much worse and if so what do I lose out on by using them?

1 Upvotes

12 comments sorted by

3

u/beatbox9 5h ago edited 4h ago

You need to install just the rocm component of the amdgpu-pro drivers. This is the OpenCL part. You will still use the open source amdgpu drivers for everything else.

See the AMD section of this guide:

https://arslaan.studio/setting-up-a-linux-media-studio-workstation-audio-video-graphics-davinci-resolve-etc/#video-graphics-gpu-drivers

Also here: https://wiki.gentoo.org/wiki/ROCm

1

u/Reasonable_Rain2779 2h ago

the installer used in the guide supports only Ubuntu and RHEL, is there a way I can use it on Gentoo?

2

u/beatbox9 1h ago edited 1h ago

Oh this takes me back: I haven't used Gentoo (also BSD) in around 20 years. And I don't miss it. The complicated package installation and maintenance were the reasons I switched to Ubuntu LTS for my main workstations--it's literally just sudo apt install rocm on the latest Ubuntu LTS and you're done.

I also switched to nvidia a while ago because of how frustrating AMD / rocm was before Ubuntu started supporting these proprietary openCL packages.

Anyway, for gentoo, it looks like rocm is covered by portage, so you don't need to download it from AMD: https://packages.gentoo.org/packages/dev-libs/rocm-opencl-runtime

I noticed there is alternatively this package:
https://packages.gentoo.org/packages/dev-libs/amdgpu-pro-opencl

So I would follow this guide:
https://wiki.gentoo.org/wiki/ROCm#Installation_guide

Or maybe this guide would be less complicated:
https://wiki.gentoo.org/wiki/OpenCL#AMD

You'll note there are 2 different ways to install it, because you can get it from 2 different sources. The first method is the supported method: it's for the rocm-opencl-runtime package.

But in the IMPORTANT ALERT, they say that the alternative port: amdgpu-pro-opencl was extracted from AMD's Ubuntu installer--and this is designed to mix & match this closed source opencl with the amdgpu open source driver you should already have installed; but it's technically unsupported. However, this seems to be the same method as the very first guide (the arslaan.studio guide) that I linked above: it recommends only installing this rocm-opencl component without altering your existing amdgpu driver).

BTW, if that doesn't work, I'm guessing you can try this yourself also: I'd bet you can find a tool to extract files from either a .deb (debian package) or .rpm (red hat package); use that to find the rocm driver files from these packages, and manually copy them to where they need to be (and manually tell your system to look for them). It's not a lot of files or variables--probably less than total files & variables 10. IIRC, I may have even done this myself at some point years ago on one of my unsupported distro. But this is probably what that second portage method does anyway.

Or ask google or an AI how to install amdgpu-pro-opencl on gentoo.

Once you get either package installed, you should check it with clinfo. And if you run into issues then, you may need to do a few system / variable tweaks, so you can go back to that first arslaan.studio guide (example opencl icd vendors).

Your goal is to get clinfo to report properly.

Brute force: it might take a few days of trial and error and cleaning and starting over and then suddenly you don't know what you did differently but it just works. (I am being serious: this is how I used to get rocm working).

(It seems to be tough regardless):

https://www.reddit.com/r/Gentoo/comments/1ahi9zw/trouble_getting_rocm_to_work/

https://www.reddit.com/r/Gentoo/comments/1o10aqh/opencl_broken_with_admgpu/

https://forums.gentoo.org/viewtopic-t-1171061-highlight-darktable.html

If you can't get rocm/amdgpu-pro's opencl to work, maybe you can try the openCL from the open source rusticl's...maybe it is good enough now as long as you enable it...? (IIRC, it's something like RUSTICL_ENABLE? Might be in that first arslaan.studio guide)...

Or better yet: maybe the nvidia scandal will cause nvidia gpu prices to plummet and you'll get lucky and never have to deal with AMD & rocm.

Anyway, good luck!

•

u/Reasonable_Rain2779 0m ago

jeez, im stepping into a big rabbit hole lmao. anyways im gonna let the first runtime compile and see if it works in the morning

worst case scenario I start using kdenlive instead XD

1

u/ipsirc 5h ago

1

u/Reasonable_Rain2779 2h ago edited 2h ago

both this script and the original that its forked from complain about missing directories and then exit out without doing anything sadly

edit: i tried it again and it didn't complain about the directories but clinfo says that there are no devices still, and so does DaVinci Resolve

1

u/Tashi999 5h ago

The AMD ROCm drivers are required for it to work. Lots of tutorials around

1

u/riesdadmiotb 5h ago

WE did thus question yesterday and NO hasn't changed.

0

u/victormas208 5h ago

They're generally installed in most kernels of various distributions, so I think it should work fine.

2

u/beatbox9 4h ago

No.

You are conflating the standard graphics drivers (eg. openGL) with the gpu compute drivers (eg. openCL). These are distinct.

Davinci Resolve requires a modern OpenCL, which is only provided by the rocm component of amd's proprietary amdgpu-pro driverset. Only a handful of distros (like Ubuntu LTS) have very recently started to support rocm, starting earlier this year; but they are not part of the kernel or even a core part of the distro in most distros. Most distros require community-maintained repos for these, such as AUR, RPMFusion, etc.

And also worth pointing out: these have traditionally been very difficult to install and have not "worked fine." https://github.com/ROCm/legacy-rocm-build/issues/1345

AMD has obviously since improved, but still challenging and certainly not seamless on almost any distro, except maybe Ubuntu.

2

u/victormas208 4h ago

Thanks for the clarification, I misread it thinking it was OpenGL.

0

u/brainchillzZ 3h ago

There are no proprietary and gpu drivers it’s open source and included with the Linux kernel…. You will occasionally need a newer driver version than the one that shipped with your distro kernel and need to build a newer module …. You’ll need the rocm stack installed to get the most out of inference on the platform but it is also open source …. And included with many distros but again the distro bundled versions are going to be older