I have another question regarding the different behavior of the 2 main brand gpu’s on darktable:
GPU optimization
Performance
3.Stability
Witch do you recommend?
I already own an AMD r390x 8gb, and i know that vram is king in this kind of work-tasks.
Looking to invest in a more recent gpu to optimize performance. Even if i was happy with the r390x, WHEN opencl worked! Darktable without opencl is really slow, after a few modules exporting takes about 5 to 10mns!
(I know that AMD has a problem with local contrast calculations)
Thanks for your advice.
Ubuntu recently upgraded the kernel and the previous version amdgpu-install_22.20.50203-1_all.deb was giving dkms error but was working. But there is a newer version at 22.20.4 in the above link which installs properly without any errors
for Ubuntu 22.04 the link amdgpu-install_22.20.50204-1_all.deb
If you follow the above link you can find drivers for bionic & focal too.
I thought this information will be useful to many users.
then install the latest driver .deb file linked in previous post. Then install the driver with the command given above. IMHO you have tried many things and some how disturbed something.
In my case I have followed the above steps and now my system is stable and everything works.
did you follow the instructions in my previous post? which driver version you are trying to install?can you give me some more detail about your system? what do you mean by After resolving all dependencies problems amdgpu-dkms now impedes installation of the amdgpu driver
I had / I am having the same issues. I suppose it’s related to the kernel version you have installed on your system. I am on 5.17.x and amdgpu-kdms cannot be installed with that kernel version. I am still hoping that kernel 6.1 with Rust support will be available soon so one can try to install the rusticl drivers. Unfortunately 6.0 doesn’t support Rust yet.
Cannot directly help on your issue since I’m using arch linux but you don’t really need any additional kernel module, the kernel vanilla amdgpu module is enough. You only need the amd rocm opencl user space part.
Rusticl is a new mesa rust based user space opencl implementation that could/will replace the current opencl mesa implementation (clover). It’s completely unrelated to the linux kernel support for rust and will work also with current kernels.
My observations and solution. In my case I was able to install 22.20.50204-1 driver and everything was working except when I would tired to upgrade software with apt upgrade it will try to rebuild the driver driver (dkms) and give errors. So as suggested in the error report I examined the make.log file which is as follows
DKMS make.log for amdgpu-5.16.9.22.20-1462318~22.04 for kernel 5.15.0-53-generic (x86_64)
Sunday 20 November 2022 11:45:26 AM IST
make: Entering directory ‘/usr/src/linux-headers-5.15.0-53-generic’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/Makefile:26: “Local GCC version 110303 does not match kernel compiler GCC version 110200”
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/Makefile:27: “This may cause unexpected and hard-to-isolate compiler-related issues”
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/drm_gem_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_execbuf_util.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_common.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_range_manager.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_kernel_params.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amddrm_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_resource.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_pool.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/dma-buf/dma-resv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_sys_manager.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_agp_backend.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_backlight.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_ioctl.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_device.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.c:28: warning: “pr_fmt” redefined
28 | #define pr_fmt(fmt) "[TTM DEVICE] " fmt
|
In file included from ./include/linux/kernel.h:19,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:55,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/backport/backport.h:6,
from :
./include/linux/printk.h:340: note: this is the location of the previous definition
340 | #define pr_fmt(fmt) fmt
|
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_kms.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_atombios.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_kthread.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_io.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/scheduler/amd-sched.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/atombios_crtc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_perf_event.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_seq_file.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_suspend.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/ttm_device.c:28: warning: “pr_fmt” redefined
28 | #define pr_fmt(fmt) "[TTM DEVICE] " fmt
|
In file included from ./include/linux/kernel.h:19,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:55,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/backport/backport.h:6,
from :
./include/linux/printk.h:340: note: this is the location of the previous definition
340 | #define pr_fmt(fmt) fmt
|
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_pci.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_memory.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_sched.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fence.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/ttm/amdttm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_reservation.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_auth.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_fb.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_print.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fbmem.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_crtc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_connector.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_atomic_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_connectors.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/atom.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mn.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_fence.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_modes.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_time.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_ftrace.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_acpi_table.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_page_alloc.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_numa.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_fs_read_write.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_aperture.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_drv.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_simple_kms_helper.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_bitmap.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_vmscan.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_dma_fence_chain.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_mce_amd.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_drm_hdcp.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_debugfs_inode.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/kcl_sysfs_emit.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_encoders.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_display.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_i2c.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_fb.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_gem.o
LD [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdkcl/amdkcl.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ring.o
CC [M] /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_cs.o
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ssg_init’:
/var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.c:2313:31: error: incompatible types when assigning to type ‘struct percpu_ref’ from type ‘struct percpu_ref *’
2313 | adev->ssg.pgmap.ref = &adev->ssg.ref;
| ^
make[2]: *** [scripts/Makefile.build:297: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu/amdgpu_ttm.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[1]: *** [scripts/Makefile.build:560: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build/amd/amdgpu] Error 2
make: *** [Makefile:1903: /var/lib/dkms/amdgpu/5.16.9.22.20-1462318~22.04/build] Error 2
make: Leaving directory ‘/usr/src/linux-headers-5.15.0-53-generic’
I saw that the mismatch of gcc version was a warning and Not an error, the actual error was in amdgpu_ttm.c at line 2313. I searched for this file and found 2 such file on my system, I removed the “&” from “&adev->ssg.ref” line from both files . Now when I gave the apt upgrade command it properly build the amd dkms and now there are no errors.
Please refer to my earlier posts for information about my Ubuntu, kernel and driver version.
Hope it helps someone.
Finally I got opencl working with the integrated gpu of my Ryzen 9 5900hx processor using the mesa rusticl driver. Darktable now recognizes 2 GPUs (nVidia and AMD):
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init] 0 'AMD Radeon Graphics (renoir, LLVM 12.0.1, DRM 3.48, 6.0.0-1007-oem)'
[opencl_init] 1 'NVIDIA GeForce RTX 3060 Laptop GPU'
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
Unfortunately I do have issues with black images shown now …
After making the changes that you mentioned amdgpu-dkms installed but opencl is still not available.
[dt_get_sysresource_level] switched to 2 as `large’
total mem: 32003MB
mipmap cache: 4000MB
available mem: 21877MB
singlebuff: 500MB
OpenCL tune mem: WANTED
OpenCL pinned: WANTED
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: ‘very fast GPU’
[opencl_init] opencl_library: ‘default path’
[opencl_init] opencl_device_priority: ‘/!0,//’
[opencl_init] opencl_mandatory_timeout: 400
[opencl_init] opencl_synch_cache: active module
[opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] no devices found for Advanced Micro Devices, Inc. (vendor) - AMD Accelerated Parallel Processing (name)
[opencl_init] found 1 device
[dt_opencl_device_init]
DEVICE: 0: ‘AMD Radeon ™ R9 390 Series (hawaii, LLVM 13.0.1, DRM 3.46, 5.15.0-57-generic)’
CANONICAL NAME: amdradeontmr9390serieshawaiillvm1301drm346515057generic
PLATFORM NAME & VENDOR: Clover, Mesa
DRIVER VERSION: 22.0.5
DEVICE VERSION: OpenCL 1.1 Mesa 22.0.5
DEVICE_TYPE: GPU
*** The OpenCL driver doesn’t provide image support. See also ‘clinfo’ output ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.
[imageio_load_module_format] failed to open `avif’: (null)