[Resolved] Darktable Performance issues - Amd GPU

Hello
I bought a new graphic card (Amd rx 6800, 16gb vram) and Darktable seems not using my card at full capacity.

Just wondering, because on my 12 year old Mac pro Darktable ran nicely with my older GPU (amd hd 7900) just the CPU were under some stress and made fans spin louder each time I did some edits in darkroom.

Now, I’ve got a new rig with much better Mobo, CPU and GPU and simply can’t accept that Darktable behaves almost the same with my new GPU / CPU.

In Darktable’ s settings I can only select AMD ROCm (under OpenCL drivers). There’s Nvidia cuda and Intel GPU, but those options shouldn’t be relevant for me. All settings under OpenCL itself (activate opencl support, opencl scheduler, etc) are grated out / unavailable.

So, do I need to install some drivers to get the performance my GPU can deliver?

Os= Linux mint 21.3
GPU= Amd xfx rx 6800, 16gb vram
CPU = Ryzen 5 7600X

Under Linux there are different possibilities to implement openCL. How to do this, strongly depend on the distribution. Unfortunately, I have no idea about Mint. But in addition to the correct graphics driver you may need something like an OpenCL-ICD (installable client driver).

If this forum can not help, try a Mint-specific community.

1 Like

You always have to install some drivers. You need to make sure you have the opencl packages for your card. I don’t know about the Mint ecosystem, so I can’t help further.

have you installed the ROCm packages from AMD?
What is the output of darktable-cltest?

Great, the output is,

Failed to load "xapp-gtk3-module"
Path lookup '$HOME/darktable-cltest' fails with: 'file or directory not found'

I’ve found Rocm-device-libs in the official software repo, Mintinstall. (Rocm is about open compute lib controls, -math lib, kernel lib and openCL build-in lib and more )
The version is 5.0.0-1 but the related GitHub page has already v 6.0.2 .

I don’t use often the terminal to install software. Maybe I should try installing the official suggested package first.

Just hoping this driver will not mess with my GPU otherwise I cant see anything anymore on my screen.

I’m ignorant of drivers as my usual systems were Mac Os. Thanks for your suggestion

In fedora, you would use rocm-opencl via sudo dnf install rocm-opencl. But rocm 5.0.0 is fairly old and might give your trouble. Fedora is on 6.1.2 and that’s not the latest version of rocm.

I dont like the ubuntu ecosystem at the moment because it lags in updates.

1 Like

you can also use rusticl if your OS is recent enough to ship that.

The components of my rig were released 2 years ago .

On Mint install I can’t find any lib called “rustic”. How can I check if rusticCl isn’t already installed?

You would have to check if your GPU is supported by ROCm 5.0.0 - It is likely the case that it is too old. Somewhere in the AMD wiki is a table that shows the compatability, but I cannot find it right now.
Another problem could be that you are not in the groups render and video. Try sudo usermod -a -G render,video $LOGNAME

It seems like you are missing darktable-cltest in your $PATH? Do you use the AppImage?

1 Like

This one?

Rx 6800, Navi 21

No, flatpak

Need to check later “usermod”

No this table: GPU and OS Support (Linux) — ROCm 5.0.0 Documentation Home
Unfortunately they only write the new GPUs for each Release… Somewhere I found a table where they would state the ROCm Version and all the supported GPUs. And that one I cannot find.
But wikipedia says it should work with 5.0+… Is the package rocm-opencl-runtime installed?

We’ve seen more issues with flatpaks not allowing openCL.
Perhaps this older thread for 4.6 helps?

Alternatively, you could try the appimage from the darktable “install” page.

Sounds good, thanks!

Yes, graphic acceleration was off in Flatseal, need to restart my PC to see if this setting is enough.

Right now, Dt throws an error dialog asking me to delete locked preferences. Won’t do that but restart later and report back if this worked for me

Nah, gpu acceleration didn’t unlock openCl but maybe Dt’s performance has improved a bit. Need to test this first.

Still, I think drivers are necessary to unlock OpenCl. Lets see…

Make sure you have the proper mesa flatpak installed, you should get the one with rusticl support.

some of my tests

After installing mesa-opencl-icd, OpenCL is still grayed out in Darktable, but this lib was nevertheless a good addition.
Some warnings at the end of the installation:

W: Possible missing firmware /lib/firmware/amdgpu/ip_discovery.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega10_cap.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_cap.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_cap.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_0_toc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/gc_12_0_1_toc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/gc_12_0_0_toc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_mes.bin for module amdgpu

Also, I tried to change GPU acceleration (ON) with Flatseal, but unluckily, this didn’t work. Darktable would throw an error every time asking me to delete locked preferences. But it was an option -still appreciated.

@g-man
yeah, when I first installed Linux this year, I was unsure about Mint or Silverblue at the end of my search. LM gives me opportuny to make errors, other Linux distributions might be less forgiving. Yes, updates are a bit slow on LMDE and sometimes too slow. Otherwise a great OS.

@reox
Hey thanks for your help, let me show you some output, maybe it is useful:
sudo usermod -a -G render, video $LOGNAME

usermod: group »« doesn't exist

clinfo

Number of platforms:				 1
  Platform Profile:				 FULL_PROFILE
  Platform Version:				 OpenCL 2.1 AMD-APP (3625.0)
  Platform Name:				 AMD Accelerated Parallel Processing
  Platform Vendor:				 Advanced Micro Devices, Inc.
  Platform Extensions:				 cl_khr_icd cl_amd_event_callback 


  Platform Name:				 AMD Accelerated Parallel Processing
Number of devices:				 0

dpkg -l | grep rocm

ii  rocm-core                                  6.2.0.60200-66~22.04                       amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-language-runtime                      6.2.0.60200-66~22.04                       amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-opencl                                2.0.0.60200-66~22.04                       amd64        clr built using CMake
ii  rocm-opencl-icd-loader                     1.2.60200-66~22.04                         amd64        OpenCL-ICD-Loader built using CMake
ii  rocm-opencl-runtime                        6.2.0.60200-66~22.04                       amd64        Radeon Open Compute (ROCm) Runtime software stack

@paperdigits
thanks, I tried with flatpak list | grep mesa but this mesa flatpak you mentioned isn’t there because it must be an app dependency, not an app. I thought, flatpaks bundle all necessary libs?

In my knowledge, flatpak dependencies get installed automatically, so I’ve no idea how to install flatpak dependencies myself. Maybe a *.deb package would be “better” and use my GPU, unlike flatpak. If I really have, I will install an Appimage.

> flatpak list | grep -i mesa
Mesa	org.freedesktop.Platform.GL.default	24.1.3	23.08	user
Mesa (Extra)	org.freedesktop.Platform.GL.default	24.1.3	23.08-extra	user

There must be no space between the comma.
You can also run it with two commands:

sudo usermod -a -G render $LOGNAME
sudo usermod -a -G video $LOGNAME

clinfo cannot find a device, so maybe check again with the groups - for me this was a requirement.

Right I missed the -i option. I get the mesa packages of your output and 2 more.

Must be a flatpak thing, need to ask on the forums of mint. Unfortunately the *.deb package available on Mint’s software repo is far behind, only v.3.8.1-2
So I’ll check the appImage.