Blender opencl, I need the propertairy drivers?

Since a few weeks I am learning myself blender.

Made this:
https://www.youtube.com/watch?v=fbJrFz2nKls

Now my problem
In settings in blender I can’t use opencl.

After some google searching, I installed Mesa-libOpenCL - Mesa OpenCL implementation

My vid card, a RX570 seems to support opencl. But as far as I understand things, only with the proprietary drivers. :frowning:

Can somebody confirm this, or better yet know a solution ?

Not happy if I have to to install the proprietary drivers. Was trying to avoid that.

On the bright site blender is working fine without opencl, so ignoring this issue is an option too.

Hi
Is clinfo installed and the output is?


Information for package clinfo:
-------------------------------
Repository     : Main Repository (OSS)
Name           : clinfo
Version        : 2.2.18.04.06-1.7
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 109.8 KiB
Installed      : Yes
Status         : up-to-date
Source package : clinfo-2.2.18.04.06-1.7.src
Summary        : Utility that reports status information for all installed OpenCL ICDs
Description    : 
    A simple OpenCL application that enumerates all possible platform and
    device properties. Inspired by AMD's program of the same name, it is
    coded in pure C99 and it tries to output all possible information,
    including that provided by platform-specific extensions, and not to
    crash on platform-unsupported properties (e.g. 1.2 properties on 1.1
    platforms).

I installed clinfo, and now I get:

Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 20.1.2
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX 570 Series (POLARIS10, DRM 3.37.0, 5.7.5-1-default, LLVM 10.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 20.1.2
  Driver Version                                  20.1.2
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               32
  Max clock frequency                             1268MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              64
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 0 / 0        (n/a)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  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                              4294967296 (4GiB)
  Error Correction support                        No
  Max memory allocation                           3435973836 (3.2GiB)
  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                        2147483392 (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

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 570 Series (POLARIS10, DRM 3.37.0, 5.7.5-1-default, LLVM 10.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                                   Radeon RX 570 Series (POLARIS10, DRM 3.37.0, 5.7.5-1-default, LLVM 10.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                                   Radeon RX 570 Series (POLARIS10, DRM 3.37.0, 5.7.5-1-default, LLVM 10.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

Blender stil says:
No compatible GPU found for path tracing.
Cycles will render on the cpu.

Cycles is one of the render engines in Blender.

AFAIK OpenCL support is indeed one of the things restricted to the proprietary AMDGPU PRO driver.

Thank you guys, and that sucks.

Finally for gaming I don’t need the proprietaries drivers but now I stumble on this.

Almost feels like I get punished every time I go amd ( opensource) also for the vid card.

Don’t like that on linux the amd opensource drvers don’t have a setting panel, like the driver has on windows.
I did a google search and it is what I thought it was. It makes it possible for a program to use both the gpu and the cpu for calculating stuff.

Still will have to do some more research, in blender you can choose for rendering the cpu or the gpu.
Maybe I should just try the gpu setting and see what happens.

The only part I do get is that video cards are “better” (faster) with rendering, because they are better at doing parallel task.
I have no idea how this translate to blender though, when you do a rendering.

For now I won’t install the proprietary drivers, and wait if this will come to the open source drivers too. :slight_smile:

And going nvidia is something I am trying to not do either. I believe in open source and the idea behind it, that’s why I try to support amd.

Found something interesting:
https://linuxconfig.org/install-opencl-for-the-amdgpu-open-source-drivers-on-debian-and-ubuntu

Could it be it will be more simple on openSUSE ? Because as far as I know suse is supported.
But what I already had read, its probably an issue on tumbleweed, because that driver wont work with all kernels.
So it might be better to just accept it, and not have opencl.

Hi
Sure, just extract the tarball and install the openCL rpm… will it work on Tumbleweed…unknown :wink:

See here: https://forums.opensuse.org/showthread.php/532776-amdgpu-pro-up-and-running

Well, from how I understand things that I read some time ago, the proprietary and the open source drivers seem to use the same kernel module.
The rpms do install a kernel module as well AFAIK, but maybe that’s only an updated version (which would be included in Tumbleweed anyway, so probably no issue in this regard)?

I have absolutely no idea either whether the proprietary driver works on Tumbleweed as well though.

One thing I do know: there was (and probably still is) a problem with the openSUSE packages. When you uninstall them, they don’t remove some dracut config that adds the kernel module to the initrd, resulting in possible problems afterwards.
It was said to be fixed, but still happened, though maybe it really is fixed meanwhile. But just be aware of that in case you do decide to give it a try, you may have to remove some files manually if you uninstall it again.
More details here: 1168611 – Installation and subsequent uninstallation of AMD drivers with AMD ROCm breaks creation of initrd files and causes system hangs during boot
Quoting the relevant parts:

It’s been a known problem in amdgpu-pro package that left some broken entry for dracut. Please check /etc/dracut.conf.d/* and /usr/lib/dracut/dracut.conf.d/* whether any stale entry is present.
If there is, delete it and rebuild initrd.

Indeed, AMD’s uninstaller forgot to delete file /etc/dracut.conf.d/amdgpu-5.6.0-1.g4de1111-default.conf which contained strings:


add_drivers+=" amdgpu"
fw_dir+=“/lib/firmware/5.6.0-1.g4de1111-default”

After removing this file I reinstalled kernels.
Now they can be loaded normally - 5.5.13 from TW and 5.6.2 from Kernel:stable repo.

I couldn’t find instruction for rebuilding init files for openSUSE (dracut?), so reinstalling worked it out.

Rebuilding the initrd can be done by this command btw, there should be no need to reinstall the kernels then:

sudo mkinitrd

Not for GCN2+.

No and not.

To OP: try to search in this forum. Everything is already done.

For using OpenCL with AMD GCN2+ you need AMD ROCm package.
For Leap you can use it with AMD’s proprietary driver or with “upstream Linux kernel” open driver.
For TW you have to use open driver.

Uninstall Mesa’s OpenCL driver.
Then install AMD ROCm.

Here are instructions for the OpenCL-only AMD ROCm installation: https://forums.opensuse.org/showthread.php/539896-Leap-TW-Getting-working-OpenCL-with-AMD-ROCm-for-videocards-and-APUs-(AMD-hardware)
I have to perform OpenCL-only AMD ROCm installation because I am using APU, not discrete graphics card.
You are using discrete graphics card, so you can install full package - if you need it.

Thank you guys.

Funny I remember reading about the open-source and proprietary driver sharing some code, but that was probably not the kernel part then. :slight_smile:

I might ask on the Blender stackexhange to see I can get more info on the purely Blender part of things.

Gpu vs Cpu setting and how much influence opencl has.

I did notice in the setting, if you have an Nvidia card, you can choose cuda. ( some tutorial vid )
One of the options , if I understand it right is about the vid card and cpu working together on calculating the render.

I suspect to see setting like this under opencl, for my AMD card if I install AMD ROCm.

For those that do not know about rendering lets keep it simple, for rendering in Blender or programs like that, your pc is never fast enough.
I did a test with my model, and the animation was working, my lights react to the music.

I then started render animation, roughly about 1/4 of the entire movie and that took already over 30 min, with my pc clearly ramping up the fans.( ryzen 5 -6 cores)
Cpu temp was fine though, 55 - 69 c probably thanks to my not stock cpu cooler. ( coolermaster 212 )

Pc did not start to respond slow to me, which to some extent worried me, because it makes me wonder if it was using all 6 cores.
Memories of windows NT and 3D studio max popped up. Start a render, go do something else, leave pc alone and hope it won’t crash. :stuck_out_tongue:

To some it up, if I can reduce the render time in anyway I am interested.
Already been watching Blender tutorials on how to reduce the render time.
Also gonna try to lower the screen resolution of the render, that used to help allot in the Windows NT days.
For those wondering about widows NT it was rather simple, the pc had two cpu’s and back then only windows NT could handle that.

I hope to get back to this, with some result.
About opencl reducing render time. :slight_smile:

Lets try to laugh about this. ( I like to vent some frustration )

The first reply I got ( stack exchange) was to try an debian based distro Ubuntu Mint or arch. ( manjero )

The fun with internet , and I am not talking about this forum, people giving advice who do not really understand what they are talking about.

What ever distro I would choose besides openSUSE that installs the opensource drivers, will have this issue. ( blender complaining )

What this person does not know is that I had googled and found an Ubuntu user who could not install the proprietary drivers, because his ubuntu version was not supported. rotfl!

I in general don’t understand this try another distro advice anyway, but did explain to him that I am on Tumbleweed which is like Arch an rolling release.

Lets hope it will help some other Linux users on the stack exchange, that the problem is with the vid card drivers.

For now I will wait if I get a more usefull reply on the stackexhange, but will probably install AMD ROCm.
Then I can test if it reduces the render times.

Patience pays :wink:

Long story short. Until Vulkan is implemented in Blender (which is going to be soon from what I hear) you can use OpenCL

  • Yes using OpenCL will reduce your render times significantly compared to when you have set it to ‘None’.
  • But since 570x is not that fast compared to 2600X CPU, it comes down to very specific situations where you will have advantage in using GPU over CPU (while in other cases it would be opposite). It won’t be as vast as in my case, as I have a pretty old CPU.
  • Using a rough estimate, you would get better results using CPU in cycles (an additional setting, not present in eevee), but make sure to set the tile size accordingly in Performance Submenu In Render Settings (right side on blender, not in preferences menu). A tile size of 128 or 256 or 512 is ideal for GPU (render something on each setting to test), and 16 or 32 is ideal for CPU.
  • Somethings only use CPU, like the cloth simulations.
  • Also Blender allows you to use CPU & GPU together where possible. Just click the box in front of both CPU and GPU, like in my following screenshot.
  • Also, most of the blender devs use Linux, various flavors, so Linux is strongly supported. You can even get bleeding edge Alphas from builder.blender.org
  • Note that Blender would not raise or cause any errors based on what you are using CPU or GPU. You have to test it by doing different renders or better yet running the benchmark (BMW scene only … or the comprehensive 5-7 scenes)
  • In my experience, for a beginner, you are better off just using the settings I showed below, and use eevee without worries.
  • Having installed ROCM recently myself on a seperate system (Ubuntu used for some unrelated testing)… I don’t think you need AMD ROCM.But rather the drivers downloaded from AMD website (they released Linux drivers, that include OpenCL support), or alternatively try installing the xf86-video-amdgpu if you are using XORG

So I “need” to install AMD ROCm so I can in the setting under opencl, set blender to use both the gpu and the cpu.

The other render setting needs to be set to cpu, because my cpu is much faster then my gpu.
It wont hurt to do some test.

To accelerate you may use Blender + OptiX engine:

https://en.wikipedia.org/wiki/OptiX
https://code.blender.org/2019/07/accelerating-cycles-using-nvidia-rtx/
https://techgage.com/article/testing-blender-2-81-alpha-with-nvidia-rtx/
https://blender.community/c/graphicall/2gbbbc/

Nvidia RTX is good for it.

You can use more than 1 videocard for accelerating Blender.
You can use some videocards for accelerating Blender, and one another for an ordinary use (DE, browser, etc.).

For work with Blender and another application software it is better to use Leap, not TW.

Trying to start Blender’s benchmark-launcher https://opendata.blender.org/ :

version `GLIBC_2.27' not found

https://software.opensuse.org/package/glibc

Leap 15.1 and 15.2 have glibc version 2.26, so you need TW to benchmark - what a … fun …
Or install glibc from TW into Leap…
IDK why Leap 15.2 is not using glibc 2.27+.

AMD Radeon ProRender for Blender

https://www.amd.com/en/technologies/radeon-prorender-blender

Interesting, I had downloaded the benchmark, but it does not seem to work.

Because I am also a gamer, I went for tumbleweed, Also because in the past when I tried to compile stuff, I ended up adding the tumbleweed repositories anyway.

Looking at installing AMD ROCm
I need to be added to the video group, and that were I get confused.

https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html

guus@linux-2ls4:~> groups
users
guus@linux-2ls4:~> sudo usermod -a -G video guus
[sudo] wachtwoord voor root: 
guus@linux-2ls4:~> groups
users
guus@linux-2ls4:~> groups
users
guus@linux-2ls4:~> 

https://paste.opensuse.org/27065369

What is the difference ? why is it not listed when I type groups on the cli ? :confused:

  1. Check user that is used:

whoami

  1. Maybe reboot is needed?
guus@linux-2ls4:~> whoami
guus
guus@linux-2ls4:~> 

A reboot did help, now it says I am member of the group users and video. :slight_smile: