Return to Level1Techs.com

OpenCL or ROCm on kernels > 5.4?

I understand that AMD only supports LTS distributions, but has anyone managed to get OpenCL or ROCm running with a kernel newer than 5.4?

I had PopOS 20.10 set up running kernel 5.11.7 and am 90% certain I had it running before I managed to break things really badly while setting up VFIO and needed to reinstall. I can’t remember what I did and haven’t been able to replicate it since so it’s possible I was just tired and confused.

Long story short, I’d really prefer to run a more recent kernel but I also need OpenCL for things like Blender and overnight mining. From what I understand there was some sort of command removed from newer kernels that is specifically needed by amdgpu-dkms and rock-, rocm-dkms which is where my attempts always fail.

Has anyone found a way around this, or am I doomed to use kernel 5.4 until AMD releases newer drivers?

Current setup as of this moment:

PopOS 20.10 w/ kernel 5.12-rc4
AMD Ryzen 3900x
MSI Radeon 6800xt
Sapphire Radeon 5700xt Nitro+
Asrock X570 Taichi, BIOS 4.50

Edit: I should add that the official ROCm documentation includes this:

"Using Debian-based ROCm with Upstream Kernel Drivers

You can install ROCm user-level software without installing AMD’s custom ROCk kernel driver. The kernel used must have the HSA kernel driver option enabled and compiled into the amdgpu kernel driver. To install only ROCm user-level software, run the following commands instead of installing rocm-dkms:

sudo apt update
sudo apt install rocm-dev
echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules

"

I’ve tried installing rocm-dev and running the subsequent command, but haven’t had success. So far my Google-fu is failing me on how to enable the HSA kernel driver option, and how to compile that in to the amdgpu kernel driver.

There’s your answer. You’ll need to check the kernel config file to see whether or not this feature is enabled and if it isn’t, enable it and recompile (rebuild) the kernel. You’ll need to install the build-essential package from the repositories, which will create a build environment for you. You’ll also need the kernel source package for your chosen kernel. There’s a fair few howto’s on kernel compiling to be found, use one that reflects the package manager (apt/dpkg, in this case) for guidance.

1 Like

Thanks, I’ll have to look in to that more!

Also, it appears I may have jumped the gun on this post.

After following the process given here then rebooting again it appears that clinfo is recognizing both GPUs even though the official amdgpu-pro-install failed, and on kernel 5.12-rc4!

So that’s exciting. I’ll have to test a few relevant applications and confirm they work as expected.