Guide | Install AMD OpenCL on: Pop!OS & some Ubuntu Derivates | Linux, amdgpu, amdgpu-pro, rocm, rocr

Here is the /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/make.log which provides more info on the error.

DKMS make.log for amdgpu-5.6.20.906300-1164792 for kernel 5.8.0-7630-generic (amd64) Mon Nov 30 08:06:07 PM MST 2020 make: Entering directory '/usr/src/linux-headers-5.8.0-7630-generic' /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/Makefile:20: "Local GCC version 100202 does not match kernel compiler GCC version 100200" /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/Makefile:21: "This may cause unexpected and hard-to-isolate compiler-related issues" AR /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/built-in.a CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/scheduler/sched_main.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/scheduler/sched_fence.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/scheduler/sched_entity.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_memory.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_tt.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/main.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/symbols.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_util.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_memory.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_drv.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_device.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_ioctl.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_kms.o /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.c: In function ‘ttm_bo_vm_fault_idle’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.c:76:24: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 76 | up_read(&vma->vm_mm->mmap_sem); | ^~~~~~~~ | mmap_base /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.c: In function ‘amdttm_bo_vm_reserve’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.c:155:26: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’? 155 | up_read(&vma->vm_mm->mmap_sem); | ^~~~~~~~ | mmap_base make[2]: *** [scripts/Makefile.build:290: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm/ttm_bo_vm.o] Error 1 make[2]: *** Waiting for unfinished jobs.... CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_atombios.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/atombios_crtc.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_device_cgroup.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_cache.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_fence_array.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_fence.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.o LD [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/scheduler/amd-sched.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/atom.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_io.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_kthread.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_mm.o make[1]: *** [scripts/Makefile.build:519: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/ttm] Error 2 make[1]: *** Waiting for unfinished jobs.... CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_pci.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_perf_event.o /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_kms.c: In function ‘amdgpu_driver_load_kms’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_kms.c:202:38: error: ‘DPM_FLAG_NEVER_SKIP’ undeclared (first use in this function) 202 | dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP); | ^~~~~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_kms.c:202:38: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:290: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_kms.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_fence.c:30:1: warning: ‘dma_fence_test_signaled_any’ defined but not used [-Wunused-function] 30 | dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_reservation.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_suspend.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_workqueue.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_seq_file.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_connector.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_backlight.o /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_pci.c: In function ‘amdkcl_pci_init’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_pci.c:103:84: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 103 | _kcl_pcie_link_speed = (const unsigned char *) amdkcl_fp_setup("pcie_link_speed", _kcl_pcie_link_speed_stub); | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_pci.c:4: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_common.h:12:63: note: expected ‘void *’ but argument is of type ‘const unsigned char *’ 12 | static inline void *amdkcl_fp_setup(const char *symbol, void *fp_stup) | ~~~~~~^~~~~~~ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_update_scratch_regs’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:235:6: warning: unused variable ‘i’ [-Wunused-variable] 235 | int i; | ^ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_find_encoder’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:258:6: warning: unused variable ‘i’ [-Wunused-variable] 258 | int i; | ^ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_best_single_encoder’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:373:6: warning: unused variable ‘i’ [-Wunused-variable] 373 | int i; | ^ CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_atomic_helper.o /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_dvi_detect’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:1121:7: warning: unused variable ‘i’ [-Wunused-variable] 1121 | int i; | ^ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_dvi_encoder’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:1177:6: warning: unused variable ‘i’ [-Wunused-variable] 1177 | int i; | ^ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_encoder_get_dp_bridge_encoder_id’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:1341:6: warning: unused variable ‘i’ [-Wunused-variable] 1341 | int i; | ^ /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c: In function ‘amdgpu_connector_encoder_is_hbr2’: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu/amdgpu_connectors.c:1366:6: warning: unused variable ‘i’ [-Wunused-variable] 1366 | int i; | ^ CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_crtc.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_fb.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_modeset_lock.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_drm_modes.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/kcl_mn.o CC [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/dma-buf/dma-resv.o LD [M] /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdkcl/amdkcl.o make[1]: *** [scripts/Makefile.build:519: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/amd/amdgpu] Error 2 make: *** [Makefile:1780: /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.8.0-7630-generic'

Yes, I have been following step 4 this whole time. I’ve been only operating from a terminal pointing to that directory.

"For now: it’s also a possibility to avoid the problematic package like:
sudo apt install libdrm-amdgpu-amdgpu1"

How? That is the solution you provided for uninstalling the drivers. Without that I was not able to correctly uninstall it. As of this moment I’m not even sure I actually uninstalled it since the new error is confusing to me.

Okay, first things first:
Your uninstall problem.
requires the following steps:
./amdgpu-pro-install --uninstall
./amdgpu-install --uninstall
Just do both.
This should do the trick, at least it always worked in my tests. No matter which combination I tried.
The drivers were uninstalled properly.
If you want, let me know if it works.

AMD changed their drivers!
I found the problem on recent installation attempts.
AMD changed its drivers.
Pal and Legacy headers have been replaced in favor of ROCm and ROCr.

This change also requires the installation of dkms packages and a kernel rebuild,
which is incompatible with Pop!OS.

I’m not entirely sure if the combination of operating system and driver is causing the problem.
Pop! OS 20.10 + Radeon ™ software for Linux® drivers for Ubuntu 20.04.1
Or whether it’s just the change of headers.

From what it looks like, if your kernel is too new, you won’t be able to build DKMS. I’ve been trying to figure out how but had no luck so far. I’m on Kubuntu 20.10 with kernel 5.8.0-29.

When I try to build I get errors mentioning “mmap_sem”. According to this post, anything newer than 5.7 (or maybe that has some patches from 5.7 applied to older kernels) there were changes that won’t allow building DKMS to complete. https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/issues/104

Tried the “renamed mmap_sem to mmap_lock” option on the source files and was able to get past the “mmap_sem” errors… and introduced a bunch of new errors. No idea how to fix them.

So until AMD releases a new amdgpu-pro build that works with newer kernels, no OpenCL for me. Or I can reinstall using Kubuntu 20.04 LTS.

1 Like

You got the --no-dkms option to work? Every time I try, it still tries to build the dkms.

I just ran “./amdgpu-install --opencl=legacy,rocr --no-dkms --headless” and after some other stuff gets done I get this:

Setting up dkms (2.8.3-4) …
Setting up amdgpu-dkms (1:5.6.20.906300-1164792) …
Loading new amdgpu-5.6.20.906300-1164792 DKMS files…
Building for 5.8.0-29-generic 5.8.0-31-generic
Building for architecture x86_64
Building initial module for 5.8.0-29-generic
ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/amdgpu-dkms.0.crash’
Error! Bad return status for module build on kernel: 5.8.0-29-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.6.20.906300-1164792/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (–configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10

This is going to sound silly, and I’m amazed that it worked myself, but I was running into the same issue and got around it by simply removing the check for --no-dkms in the installer script.

Open up your ./amdgpu-pro-install script and look for the check_options function. Change it to something like this:

    function check_options() {
    #       if [[ "${OPTIONS[*]}" =~ "no-dkms" ]] && \
    #               [[ "${OPTIONS[*]}" =~ "pro" ]]; then
    #               echo -e "ERROR: using --no-dkms with a pro install is "`
    #                       `"invalid.\nDid you want to run the following`
    #                       ` instead?\namdgpu-install --no-dkms" | stderr
    #               exit 1
    #       fi
            echo 'Skipping'
    }

You can’t just remove it because it’s being called elsewhere, but apparently it’s just rejecting you based on the fact you’re running the pro installer. I don’t know DKMS well enough to say if this will cause problems down the line, so run at your own risk. But once I made that modification these instructions worked like a charm - I confirmed with both clinfo and in Blender.

I used the 20.40 driver on PopOS 20.04, not sure how it might behave in other environments.

Edit: I’m on kernel 5.8.0-7630-generic

1 Like

Hi,
I know that this thread is not strictly for the case im going to lay out, but I’m writing about it here, in hope there is a possibility that this is GPU driver issue and maybe someone here can help me. This problem is really difficult to diagnose.

For some time I’m struggling with Blender randomly hanging out on me. It’s happenig during multithreaded workloads and the Blender process cannot be killed.

Here is original thread: Blender randomly hangs - what CLI debug options should be enabled for GPU issues?
Here is bugreport: https://developer.blender.org/T83939

As of now I’ve uninstalled all AMDGPU-PRO drivers and I’m running some tests to see if this can be ruled out of the equation.

UPDATE:
After uninstalling AMDGPU-PRO drivers the issue is gone.

1 Like

Which driver version were you using?

I’ve been seeing similar behavior recently but no idea what the issue is. I wonder if maybe uninstalling and then reinstalling a different version would help?

EDIT: I started looking into this a bit more and I had the AMD PPA (oibaf-graphics) still enabled from a previous installation attempt. Purging it and keeping my driver version at 20.40 seems to be helping. Here are some instructions on how to remove the PPA if you’re using that and want to see if disabling it helps: https://linuxconfig.org/amd-radeon-ubuntu-20-04-driver-installation

Hello @pzona!
I’m also using 20.40. I’ve reinstalled the drivers with the hack you posted above and everything so far it seems to be OK. Tested Blender versions 2.90, 2.91 and 2.92.
I don’t have PPA’s in sources.

Hmm not sure what the issue was then but glad it’s working!

It looks like my issue was related to the Mesa and Vulkan libraries being upgraded past the AMDGPU driver. If you’re not using the PPA (and are careful when upgrading) you should be okay :slight_smile:

1 Like

Hey, just asking for the sake of interest, are your Radeon VII pro variants?
If not, the installation without pro might be helpful to solve your problem/s.

./amdgpu-install --no-dkms --opencl=legacy,pal --headless

I’m not sure if you mentioned using the Pro installer or someone else did.

Nevertheless, I would like to point out that, contrary to AMD’s statement, OpenCL can also be installed without the PRO version.

Happy new year.

2 Likes

Hello.
Following your tutorial now I can’t even open Blender:

# Blender 2.83.12, Commit date: 2021-01-26 15:41, Hash ad0da4275159

# backtrace
./blender(BLI_system_backtrace+0x1d) [0x698becd]
./blender() [0xc15d22]
/lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f5e47436210]
./blender(free+0x7b) [0xef80eb]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(+0xb2f87) [0x7f5dec9bdf87]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(+0xb3db1) [0x7f5dec9bedb1]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(+0x7a923) [0x7f5dec985923]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(+0x83fce) [0x7f5dec98efce]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(+0x75395) [0x7f5dec980395]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x1247f) [0x7f5e47b3b47f]
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so(clIcdGetPlatformIDsKHR+0xad) [0x7f5dec9804bd]
/lib/x86_64-linux-gnu/libOpenCL.so(+0x4a66) [0x7f5deca45a66]
/lib/x86_64-linux-gnu/libOpenCL.so(clGetPlatformIDs+0xc3) [0x7f5deca460d3]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN7luxrays23OpenCLDeviceDescription16GetPlatformsListERSt6vectorIP15_cl_platform_idSaIS3_EE+0x2b) [0x7f5dfa21856b]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN7luxrays7ContextC1EPFvPKcERKNS_10PropertiesE+0x293e) [0x7f5dfa1b362e]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN7luxcore20GetOpenCLDeviceDescsEv+0xff) [0x7f5df9bc259f]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x462c56) [0x7f5df9b79c56]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x18bb045) [0x7f5dfafd2045]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x18bb1a8) [0x7f5dfafd21a8]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x18c1283) [0x7f5dfafd8283]
/home/administrador/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x18b88f9) [0x7f5dfafcf8f9]
./blender(_PyObject_FastCallKeywords+0x104) [0x5710ef4]
./blender(_PyEval_EvalFrameDefault+0x6e42) [0xc0fdb2]
./blender() [0xc07ec0]
./blender(_PyEval_EvalFrameDefault+0x88dc) [0xc1184c]
./blender() [0xc07ec0]
./blender(_PyEval_EvalFrameDefault+0x88dc) [0xc1184c]
./blender() [0xc07ec0]
./blender(_PyFunction_FastCallDict+0x2a6) [0x5710796]
./blender(bpy_app_generic_callback+0x18d) [0x1206c4d]
./blender(BKE_callback_exec+0x3f) [0xc1d52f]
./blender(WM_init+0x216) [0xed4e46]
./blender(main+0x293) [0xb4c6c3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f5e474170b3]
./blender() [0xc1249c]

I am on Lubuntu 20.04.2 (5.4.0-67-generic) using driver amdgpu-pro-20.45-1188099-ubuntu-20.04 for a RX 580 GPU:
sudo clinfo
[sudo] password for administrador:
dlerror: libamdocl-orca32.so: cannot open shared object file: No such file or directory
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3188.4)
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                                   AMD Accelerated Parallel Processing
    Number of devices                                 1
      Device Name                                     Ellesmere
      Device Vendor                                   Advanced Micro Devices, Inc.
      Device Vendor ID                                0x1002
      Device Version                                  OpenCL 1.2 AMD-APP (3188.4)
      Driver Version                                  3188.4
      Device OpenCL C Version                         OpenCL C 1.2 
      Device Type                                     GPU
      Device Board Name (AMD)                         Radeon RX 580 Series
      Device Topology (AMD)                           PCI-E, 07:00.0
      Device Profile                                  FULL_PROFILE
      Device Available                                Yes
      Compiler Available                              Yes
      Linker Available                                Yes
      Max compute units                               36
      SIMD per compute unit (AMD)                     4
      SIMD width (AMD)                                16
      SIMD instruction width (AMD)                    1
      Max clock frequency                             1366MHz
      Graphics IP (AMD)                               8.0
      Device Partition                                (core)
        Max number of sub-devices                     36
        Supported partition types                     None
        Supported affinity domains                    (n/a)
      Max work item dimensions                        3
      Max work item sizes                             1024x1024x1024
      Max work group size                             256
      Preferred work group size (AMD)                 256
      Max work group size (AMD)                       1024
      Preferred work group size multiple              64
      Wavefront width (AMD)                           64
      Preferred / native vector sizes                 
        char                                                 4 / 4       
        short                                                2 / 2       
        int                                                  1 / 1       
        long                                                 1 / 1       
        half                                                 1 / 1        (cl_khr_fp16)
        float                                                1 / 1       
        double                                               1 / 1        (cl_khr_fp64)
      Half-precision Floating-point support           (cl_khr_fp16)
        Denormals                                     No
        Infinity and NANs                             No
        Round to nearest                              No
        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                                 Yes
        Round to infinity                             Yes
        IEEE754-2008 fused multiply-add               Yes
        Support is emulated in software               No
        Correctly-rounded divide and sqrt operations  Yes
      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                              8407891968 (7.83GiB)
      Global free memory (AMD)                        8191748 (7.812GiB)
      Global memory channels (AMD)                    8
      Global memory banks per channel (AMD)           16
      Global memory bank width (AMD)                  256 bytes
      Error Correction support                        No
      Max memory allocation                           6946812108 (6.47GiB)
      Unified memory for Host and Device              No
      Minimum alignment for any data type             128 bytes
      Alignment of base address                       2048 bits (256 bytes)
      Global Memory cache type                        Read/Write
      Global Memory cache size                        16384 (16KiB)
      Global Memory cache line size                   64 bytes
      Image support                                   Yes
        Max number of samplers per kernel             16
        Max size for 1D images from buffer            134217728 pixels
        Max 1D or 2D image array size                 2048 images
        Base address alignment for 2D image buffers   256 bytes
        Pitch alignment for 2D image buffers          256 pixels
        Max 2D image size                             16384x16384 pixels
        Max 3D image size                             2048x2048x2048 pixels
        Max number of read image args                 128
        Max number of write image args                8
      Local memory type                               Local
      Local memory size                               32768 (32KiB)
      Local memory syze per CU (AMD)                  65536 (64KiB)
      Local memory banks (AMD)                        32
      Max number of constant args                     8
      Max constant buffer size                        6946812108 (6.47GiB)
      Preferred constant buffer size (AMD)            16384 (16KiB)
      Max size of kernel argument                     1024
      Queue properties                                
        Out-of-order execution                        No
        Profiling                                     Yes
      Prefer user sync for interop                    Yes
      Profiling timer resolution                      1ns
      Profiling timer offset since Epoch (AMD)        1614249385312070405ns (Thu Feb 25 04:36:25 2021)
      Execution capabilities                          
        Run OpenCL kernels                            Yes
        Run native kernels                            No
        Thread trace supported (AMD)                  Yes
        Number of async queues (AMD)                  2
        Max real-time compute queues (AMD)            0
        Max real-time compute units (AMD)             0
        SPIR versions                                 1.2
      printf() buffer size                            4194304 (4MiB)
      Built-in kernels                                (n/a)
      Device Extensions                               cl_khr_fp64 cl_amd_fp64 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_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event 

    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]              Success [AMD]
      clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
        Platform Name                                 AMD Accelerated Parallel Processing
        Device Name                                   Ellesmere
      clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
      clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
        Platform Name                                 AMD Accelerated Parallel Processing
        Device Name                                   Ellesmere
      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                                 AMD Accelerated Parallel Processing
        Device Name                                   Ellesmere

AMD Driver Rev: 20.45 is not compatible with system versions >= 20.04.
Blender doesn’t seem to be compatible with it either.
Blender crashes at start, has artifacts in evvee and/or the kernel bulding for cycles is not successful.

As you and your logs say, you are using an RX580. Try the driver version:
Radeon ™ Software for Linux® driver for Ubuntu 18.04.5 HWE. Revision Number
20.40, after a proper uninstall of the current.

Hope this helps, best regards.

Yes, the driver amdgpu-pro-20.40-1147287-ubuntu-18.04 worked for my operating system, although I could not install the pro variant of the driver even with the advice of pzona the standard version works fine with eevee and Luxcore, although I get a message in terminal:

/Blender/2.83.13$ ./blender
Read prefs: /home/administrador/.config/blender/2.83/config/userpref.blend
found bundled python: /media/administrador/WD-Black/Blender/2.83.13/2.83/python
BlendLuxCore 2.5beta1 registered (with pyluxcore 2.5beta1)
Updating device list
LLVM triggered Diagnostic Handler: Illegal instruction detected: VOP* instruction violates constant bus restriction
renamable $vgpr2 = V_CNDMASK_B32_e32 32768, killed $vgpr2, implicit killed $vcc, implicit $exec
LLVM failed to compile shader
radeonsi: can't compile a main shader part
Read blend: /media/administrador/WD-Black/Blender/Blends/wanderer.blend
Updating device list
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.

But it seems to have no negative effects on rendering at a glance.
Thanks for the advice.

1 Like

Hi, I’m not sure if this is mentioned in the guide. I have seen that some Ubuntu users needed to add the Linux “user” to video and render group when installing pro driver with legacy OpenCL (./amdgpu-pro-install --opencl=legacy --headless).

$LOGNAME is your Linux User name.
So for those who can’t get OpenCL working, just in case follow those steps to add the user to those groups.

1 Like

Hey, thanks for the comment.

I preferred to omit this information because:

  1. This guide has to cover too many marginal cases anyway and is already very bloated.

  2. In forums are many experiences, that the Linux login can be affected.
    Up to a complete rejection of the login.

However, since this information can be found instantly on a Google search, it shouldn’t be too much of a loss.

1 Like

No problem. I just wanted to mention this in this thread where different tips related to ATI in Ubuntu and derived Linux distributions are being collected.

2 Likes

On Pop 20.10 trying to run ./amdgpu-install, I’m getting the following

PACKAGES: clinfo-amdgpu-pro opencl-orca-amdgpu-pro-icd clinfo-amdgpu-pro opencl-amdgpu-pro-icd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait
E: Unable to locate package Name

Any idea why that would be? It’s happening with both Rev 20.20 and 20.40.

Thanks, @Tpal. My Radeons are no-pro, but I’m running them with -pro drivers anyway. After reinstall the issue is gone. I think it was related to some Mesa package.

Shame that Blender does not work with either 20.45, or recent 21.10 AMD drivers.

Hey @Tpal

I wanted to report an evolution on my setup as I have upgraded and can run blender 2.92 successfully with OpenCL for my RX580.

OS: Pop’OS 20.10
Kernel: 5.11.0-7614
amdgpu: v21.10
blender: v2.92
GPU: AMD RX580 8GB
CPU: Intel Core i5-8600k

I tried the version 20.50 and that messed up my system pretty badly due to the kernel 5.11 and me experimenting with the amdgpu installer with DKMS - not fully surprised by the result.
I managed to install v21.10 by using ./amdgpu-install --no-dkms --opencl=legacy,pal

When I messed my install with 20.50, I rebooted and amdgpu was gone with other video driver resulting to the system falling back to a 1024x768 resolution.
After checking /etc/modprobe.d folder. After boot, I just loaded the module using sudo modprobe amdgpu and it worked. I also disabled the blacklist that I guess, came from my destructive testing with v20.50.

With regards to Blender v2.92, I tried the flatpak version but there is no amdgpu version integrated into flatpak so the available v2.92 on flatpak does not have amdgpu support.
From the packages, only v2.83.5 is available. I decided to compile blender which worked successfully for me by following this guide:
https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu
Make sure to pull the right branch as blender 3.0 is now (as the time of this post) the master branch and very much in alpha version.

I just followed the documentation and can summarize it here:
sudo apt-get update
sudo apt-get install build-essential git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libglew-dev

Then for version 2.92:

mkdir ~/blender-git
cd ~/blender-git
git clone -b v2.92.0 https://git.blender.org/blender.git

Download libraries - a must (I have tried building them but it is a waste of time):
mkdir ~/blender-git/lib
cd ~/blender-git/lib
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_centos7_x86_64

And finally:
cd ~/blender-git/blender
make update
make

I have now the ability to also test future builds which I had not really considered before.
I can launch v2.92 with OpenCL support on my RX580

2 Likes