ROCm: [Issue]: amdgpu-dkms fails with Ubuntu kernel 6.8.0-44

Problem Description

Looks like another problem with amdgpu-dkms and new kernels. I was running ROCm 6.2 just fine with kernel 6.8.0-41 - Ubuntu just pushed kernel 6.8.0-44, however, amdgpu-dkms fails with that kernel. Rolling back to kernel 6.8.0-41 restored ROCm for me.

Operating System

Ubuntu 24.04.1

CPU

Zen 2 and Zen 3

GPU

AMD Radeon RX 7900 XTX, AMD Radeon VII

ROCm Version

ROCm 6.2.0

ROCm Component

ROCm

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 25
  • Comments: 85 (3 by maintainers)

Most upvoted comments

— amdgpu-6.8.5-2009582.24.04/amd/display/amdgpu_dm/amdgpu_dm_helpers.c.orig 2024-09-15 02:14:04.832572558 +0200 +++ amdgpu-6.8.5-2009582.24.04/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 2024-09-15 02:15:20.000526238 +0200 @@ -560,7 +560,7 @@ #endif

#if defined(HAVE_DRM_DP_MST_TOPOLOGY_STATE_PAYLOADS)

  • ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, new_payload);
  • ret = drm_dp_add_payload_part2(mst_mgr, new_payload); #else ret = drm_dp_update_payload_part2(mst_mgr); #endif

I did this, it compiles and upgrade, but i have no idea of the consequences (and how long it will last with future upgrades)

Thanks for finding that… for those who want to try it, here are shell commands…

This is assuming you have your apt system setup for ROCm - and are set to use ROCm version 6.2 ( under Ubuntu… 24.04.1 )

# attempt (and fail) to install amdgpu-dkms - this get the source code, so we can change it...
sudo apt install  amdgpu-dkms 
# go to the directory...
cd /usr/src/amdgpu-6.8.5-2009582.24.04/amd/display/amdgpu_dm/
# backup file before editing...
sudo cp amdgpu_dm_helpers.c amdgpu_dm_helpers.c.orig
# edit the line...
sudo sed -i "s@mst_state->base.state,@\ @g" amdgpu_dm_helpers.c
# now we can finish the install with the amended code...
sudo apt install  amdgpu-dkms 
# in case that doesn't work... because it's installed, to 'reinstall' : 
# sudo apt reinstall  amdgpu-dkms 

Of course as always, it is use at your own risk, with no warranty… That said, it appears like it is working for me, with the ‘new’ kernel.
This solution is likely better than using outdated kernels.

Should be soon. Just getting the deployment out across all components and repos and mirrors and such.

6.2.1 has this resolved. I just pushed the code out now, specifically: https://github.com/ROCm/ROCK-Kernel-Driver/commit/2f767b98d4539164c9f1fcb930e4c8f329d586e6 Will close this off next week unless someone finds it to not be working properly

We’re working on a KCL (Kernel Compatibility Layer) fix and will be deploying that once it’s validated. No idea when it’ll be released or which release it will be, though (IE if it’ll be a respin of 6.2.1, come in 6.2.2, wait to 6.3, etc)

For reference, the KCL has a ton of “if this, then do that” checks based on what the base kernel supports. You can see them in “drivers/gpu/drm/amd/dkms/m4” . This will just be another one. We’ll check for the number of params in drm_dp_add_payload_part2 and adjust accordingly. It happens a ton, and normally we have more time to detect and resolve these issues, before it ends up impacting the majority of users using the kernel provided by their OS. It’s just some bad timing.

The current solution is possibly provided below. This is an internal patch, and the official AMD stance is to wait for the solution to be published in the next release. But if you want to do your own code editing, this is possibly the patch coming to resolve the issue:

commit 11d2faacb515afca6e2b0bc625d7c9889e3e9bb4
Author: Asher Song <Asher.Song@amd.com>
Date:   Tue Aug 27 09:35:42 2024 +0800

    drm/amdkcl: check drm_dp_add_payload_part2 whether requires three
    argunments

    It's caused by v6.9-rc6-1554-g8a0a7b98d4b6
    drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

    commit v5.19-rc6-1771-g4d07b0bc4034
    drm/display/dp_mst: Move all payload info into the atomic state

    Signed-off-by: Asher Song <Asher.Song@amd.com>

diff --git a/drivers/gpu/drm/amd/dkms/m4/drm-dp-mst-topology-state.m4 b/drivers/gpu/drm/amd/dkms/m4/drm-dp-mst-topology-state.m4
index 424778ea6606..d5928adc0984 100644
--- a/drivers/gpu/drm/amd/dkms/m4/drm-dp-mst-topology-state.m4
+++ b/drivers/gpu/drm/amd/dkms/m4/drm-dp-mst-topology-state.m4
@@ -67,3 +67,23 @@ AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_STATE_PBN_DIV], [
         ])
 ])

+dnl #
+dnl # commit v6.9-rc6-1554-g8a0a7b98d4b6
+dnl # drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2
+dnl #
+dnl # commit v5.19-rc6-1771-g4d07b0bc4034
+dnl # drm/display/dp_mst: Move all payload info into the atomic state
+dnl #
+AC_DEFUN([AC_AMDGPU_DRM_DP_ADD_PAYLOAD_PART2_THREE_ARGUMENTS], [
+       AC_KERNEL_DO_BACKGROUND([
+               AC_KERNEL_TRY_COMPILE([
+                       #include <drm/display/drm_dp_mst_helper.h>
+               ], [
+                   int a = 0;
+                       a = drm_dp_add_payload_part2(NULL, NULL, NULL);
+               ], [
+                       AC_DEFINE(HAVE_DRM_DP_ADD_PAYLOAD_PART2_THREE_ARGUMENTS, 1,
+                               [drm_dp_add_payload_part2 has three arguments])
+               ])
+       ])
+])
diff --git a/drivers/gpu/drm/amd/dkms/m4/kernel.m4 b/drivers/gpu/drm/amd/dkms/m4/kernel.m4
index 28f6cecf6472..81f4e9e2015a 100644
--- a/drivers/gpu/drm/amd/dkms/m4/kernel.m4
+++ b/drivers/gpu/drm/amd/dkms/m4/kernel.m4
@@ -239,6 +239,7 @@ AC_DEFUN([AC_CONFIG_KERNEL], [
        AC_AMDGPU_SMCA_UMC_V2
        AC_AMDGPU_TOPOLOGY_NUM_CORES_PER_PACKAGE
        AC_AMDGPU_DRM_CRTC_VBLANK_CRTC
+       AC_AMDGPU_DRM_DP_ADD_PAYLOAD_PART2_THREE_ARGUMENTS

        AC_KERNEL_WAIT
        AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
diff --git a/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h b/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
index 9791910ed58b..a84cd2ac22cc 100644
--- a/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
+++ b/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
@@ -104,4 +104,17 @@ _kcl_drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
 #define drm_dp_mst_topology_mgr_resume _kcl_drm_dp_mst_topology_mgr_resume
 #endif

+#ifdef HAVE_DRM_DP_ADD_PAYLOAD_PART2_THREE_ARGUMENTS
+static inline int
+_kcl_drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr,
+                             struct drm_dp_mst_atomic_payload *payload)
+{
+       struct drm_dp_mst_topology_state *mst_state;
+
+       mst_state = to_drm_dp_mst_topology_state(mgr->base.state);
+       return drm_dp_add_payload_part2(mgr, mst_state->base.state, payload);
+}
+#define drm_dp_add_payload_part2 _kcl_drm_dp_add_payload_part2
+#endif
+
 #endif
(END)
        AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
diff --git a/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h b/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
index 9791910ed58b..a84cd2ac22cc 100644
--- a/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
+++ b/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
@@ -104,4 +104,17 @@ _kcl_drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
 #define drm_dp_mst_topology_mgr_resume _kcl_drm_dp_mst_topology_mgr_resume
 #endif

+#ifdef HAVE_DRM_DP_ADD_PAYLOAD_PART2_THREE_ARGUMENTS
+static inline int
+_kcl_drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr,
+                             struct drm_dp_mst_atomic_payload *payload)
+{
+       struct drm_dp_mst_topology_state *mst_state;
+
+       mst_state = to_drm_dp_mst_topology_state(mgr->base.state);
+       return drm_dp_add_payload_part2(mgr, mst_state->base.state, payload);
+}
+#define drm_dp_add_payload_part2 _kcl_drm_dp_add_payload_part2
+#endif
+
 #endif

Again, this isn’t 100% confirmed, it’s not been fully validated/tested, and it’s not an “AMD-approved solution”. It’s just a kernel dev (me) who found what the potential solution might be using a patch that would be used for a release, in theory.

But it’s a method to get you all unblocked until the fix gets released. You can definitely wait for the next release to include the fix, but this would hopefully get sufficient numbers of you all unblocked.

Repeating myself, this is not an “AMD recommended solution”. This is just from a guy who understands the issue and knows that getting unblocked is paramount for some/most people. This patch comes with no official AMD testing or support as of today. But if you want to try it out, it could get you around the issue.

Here are the commands to swap in the old kernel ( for those who need them… )

# check kernel version 
uname -r 
# example output : "6.8.0-44-generic" or after reboot "6.8.0-41-generic"

# list the apt packages that refer to that kernel version -
apt list --installed | grep 6.8.0-44 
# this shows the relevant files we need alternate versions for...

# install 6.8.0-41 files : 
sudo apt install linux-headers-6.8.0-41-generic linux-headers-6.8.0-41 linux-image-6.8.0-41-generic linux-modules-6.8.0-41-generic linux-modules-extra-6.8.0-41-generic linux-tools-6.8.0-41-generic linux-tools-6.8.0-41 -y

# remove current kernel - note that this will show a warning screen ( logic is reversed ) 
sudo apt remove linux-headers-6.8.0-44-generic linux-headers-6.8.0-44 linux-image-6.8.0-44-generic linux-modules-6.8.0-44-generic linux-modules-extra-6.8.0-44-generic linux-tools-6.8.0-44-generic linux-tools-6.8.0-44 -y

# Now refresh grub ( controls boot process ) 
sudo update-grub
# notice it's output should show only the preferred kernel. 

reboot 
# this will get you rebooted with the preferred kernel

Can confirm amdgpu dkms drivers from repo.radeon.com/amdgpu/6.2.1 now install on kernel 6.8.0-45 without error, system boots and the GPU works.

Just a reminder to anyone not used to linux, you will need to tell your distro to use these repositories to get the latest drivers, in my case I added the following to my sources and let the system apt upgrade do the rest;

deb https://repo.radeon.com/amdgpu/6.2.1/ubuntu jammy main 
deb https://repo.radeon.com/rocm/apt/6.2.1 jammy main

Or you could wait for the maintainers to update: https://www.amd.com/en/support/download/linux-drivers.html for your distro.

Big thank you amdgpu devs and maintainers!

I found some minor changes in the Kernel driver:

Recover the original NULL fix and remove the unnecessary input parameter ‘state’ for drm_dp_add_payload_part2()

they can be used for /var/lib/dkms/amdgpu/6.8.5-2009582.24.04/source/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

After this correction, I managed to build the driver: amdgpu/6.8.5-2009582.24.04, 6.8.0-44-generic, x86_64: installed

i believe this is a ubuntu specific problem, as they choose 6.8 kernel (sadly not a LTS one) , picked some patch in -44 and thus break their partner’s code !

I create a bug report on Ubuntu side, as it is their patch that caused the bug

(<rant> Ubuntu picks random patch without testing partner’s software , not even basic compile test = bad QA ! </rant>)

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2080823

Just click to say “affects me too” 😃 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2080823/+affectsmetoo

Same on my end, upgrading from 6.8.0-41-generic to 6.8.0-44-generic: make.log

@nktice @alain-bkr , I used what you found to make a custom dkms.conf which allows to build ans install amdgpu-dkms without editing the source file.

It’s a config file in /etc/dkms which contains the patch and the command to build the modules. See : https://github.com/chrisaga/amd-dkms-patch Hopping this can be useful while we wait for a more permanent solution.

https://github.com/ROCm/ROCm/issues/3701#issuecomment-2351631247 Work fo me.

Today 6.8.0-45-generic new Ubuntu 24 updates, kernel updates appeared again. Same problems.

https://github.com/ROCm/ROCm/issues/3701#issuecomment-2351075492

I found some minor changes in the Kernel driver:

Recover the original NULL fix and remove the unnecessary input parameter ‘state’ for drm_dp_add_payload_part2()

they can be used for /var/lib/dkms/amdgpu/6.8.5-2009582.24.04/source/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

After this correction, I managed to build the driver: amdgpu/6.8.5-2009582.24.04, 6.8.0-44-generic, x86_64: installed

Nice investigation 👍

I guess you did just suppress the offending second argument

--- amdgpu-6.8.5-2009582.24.04/amd/display/amdgpu_dm/amdgpu_dm_helpers.c.orig	2024-09-15 02:14:04.832572558 +0200
+++ amdgpu-6.8.5-2009582.24.04/amd/display/amdgpu_dm/amdgpu_dm_helpers.c	2024-09-15 02:15:20.000526238 +0200
@@ -560,7 +560,7 @@
 #endif
 
 #if defined(HAVE_DRM_DP_MST_TOPOLOGY_STATE_PAYLOADS)
-	ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, new_payload);
+	ret = drm_dp_add_payload_part2(mst_mgr, new_payload);
 #else
 	ret = drm_dp_update_payload_part2(mst_mgr);
 #endif

I did this, it compiles and upgrade, but i have no idea of the consequences (and how long it will last with future upgrades)

Only started yesterday with me.

I already had kernel 6.8.0-40 in 22.04 before I made the upgrade on August 30.

But the first serious batch of system updates yesterday (including big kernel ones) showed up the issue.

My spool of rubbish:

`$ ./update

apt updates …

Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:4 https://debian.neo4j.com stable InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:6 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Ign:7 https://releases.warp.dev/linux/deb stable InRelease
Hit:3 https://packages.microsoft.com/repos/edge stable InRelease
Hit:8 https://releases.warp.dev/linux/deb stable Release
Get:9 https://repo.charm.sh/apt * InRelease
Fetched 6,639 B in 2s (3,813 B/s) Reading package lists… Done Building dependency tree… Done Reading state information… Done 5 packages can be upgraded. Run ‘apt list --upgradable’ to see them. Reading package lists… Done Building dependency tree… Done Reading state information… Done Calculating upgrade… Done Get more security updates through Ubuntu Pro with ‘esm-apps’ enabled: libavcodec-extra libcjson1 libavdevice60 ffmpeg libpostproc57 libavcodec-extra60 libavutil58 libswscale7 libswresample4 libavformat60 libavfilter9 Learn more about Ubuntu Pro at https://ubuntu.com/pro The following upgrades have been deferred due to phasing: fwupd libfwupd2 python3-distupgrade ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 4 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up linux-headers-6.8.0-44-generic (6.8.0-44.44) … /etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 6.8.0-44-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Running the pre_build script: checking for a BSD-compatible install… /usr/bin/install -c checking for gcc… gcc checking whether the C compiler works… yes checking for C compiler default output file name… a.out checking for suffix of executables… checking whether we are cross compiling… no checking for suffix of object files… o checking whether the compiler supports GNU C… yes checking whether gcc accepts -g… yes checking for gcc option to enable C11 features… none needed checking how to run the C preprocessor… gcc -E checking kernel source directory… /usr/src/linux-headers-6.8.0-44-generic checking kernel build directory… /usr/src/linux-headers-6.8.0-44-generic checking kernel source version… 6.8.0-44-generic checking kernel file name for module symbols… Module.symvers checking for linux/bits.h… yes checking for linux/io-64-nonatomic-lo-hi.h… yes checking for asm/set_memory.h… yes checking for asm/fpu/api.h… yes checking for linux/compiler_attributes.h… yes checking for linux/fence-array.h… no checking for linux/dma-resv.h… yes checking for linux/mmap_lock.h… yes checking for linux/pci-p2pdma.h… yes checking for linux/dma-attrs.h… no checking for linux/dma-buf-map.h… no checking for linux/iosys-map.h… yes checking for linux/stdarg.h… yes checking for linux/dma-fence-chain.h… yes checking for linux/xarray.h… yes checking for linux/container_of.h… yes checking for linux/cc_platform.h… yes checking for linux/processor.h… yes checking for linux/dma-map-ops.h… yes checking for linux/apple-gmux.h… yes checking for linux/device/class.h… yes checking for linux/build_bug.h… yes checking for linux/acpi_amd_wbrf.h… yes checking for linux/units.h… yes checking for drm/drm_backport.h… no checking for drm/amdgpu_pciid.h… no checking for drm/drm_probe_helper.h… yes checking for drm/drmP.h… no checking for drm/task_barrier.h… yes checking for drm/drm_managed.h… yes checking for drm/amd_asic_type.h… yes checking for drm/drm_aperture.h… yes checking for drm/dp/drm_dp_helper.h… no checking for drm/dp/drm_dp_mst_helper.h… no checking for drm/drm_gem_atomic_helper.h… yes checking for drm/display/drm_dp_helper.h… yes checking for drm/display/drm_dp_mst_helper.h… yes checking for drm/display/drm_dsc.h… yes checking for drm/display/drm_dsc_helper.h… yes checking for drm/display/drm_hdmi_helper.h… yes checking for drm/display/drm_hdcp_helper.h… yes checking for drm/display/drm_hdcp.h… yes checking for drm/display/drm_dp.h… yes checking for linux/pgtable.h… yes checking for drm/drm_fbdev_generic.h… yes checking for drm/drm_suballoc.h… yes checking for drm/drm_exec.h… yes checking for drm/drm_eld.h… yes checking for nproc… yes checking for supported chips… done checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for module configuration… done configure: creating ./config.status config.status: creating config/config.h

Building module: Cleaning build area…(bad exit status: 2) . /tmp/amd.f1Tr7ZPd/.env && make -j4 KERNELRELEASE=6.8.0-44-generic TTM_NAME=amd ttm SCHED_NAME=amd-sched -C /lib/modules/6.8.0-44-generic/build M=/tmp/amd.f1Tr7 ZPd… …(bad exit status: 2) ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/amdgpu-dkms.0.c rash’ Error! Bad return status for module build on kernel: 6.8.0-44-generic (x86_64) Consult /var/lib/dkms/amdgpu/6.7.0-1787201.22.04/build/make.log for more informa tion. dkms autoinstall on 6.8.0-44-generic/x86_64 failed for amdgpu(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information.

  • dkms: autoinstall for kernel 6.8.0-44-generic …fail! run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11 dpkg: error processing package linux-headers-6.8.0-44-generic (–configure): installed linux-headers-6.8.0-44-generic package post-installation script subpr ocess returned error exit status 11 Setting up linux-image-6.8.0-44-generic (6.8.0-44.44) … dpkg: dependency problems prevent configuration of linux-headers-generic: linux-headers-generic depends on linux-headers-6.8.0-44-generic; however: Package linux-headers-6.8.0-44-generic is not configured yet.

dpkg: error processing package linux-headers-generic (–configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-headers-generic (= 6.8.0-44.44); however: Package linux-headers-generic is not configured yet.

dpkg: error processing package linux-generic (–configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup erro r from a previous failure. No apport report written because the error message ind icates its a followup error from a previous failure. Processing triggers for linu x-image-6.8.0-44-generic (6.8.0-44.44) … /etc/kernel/postinst.d/dkms:

  • dkms: running auto installation service for kernel 6.8.0-44-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Running the pre_build script: checking for a BSD-compatible install… /usr/bin/install -c checking for gcc… gcc checking whether the C compiler works… yes checking for C compiler default output file name… a.out checking for suffix of executables… checking whether we are cross compiling… no checking for suffix of object files… o checking whether the compiler supports GNU C… yes checking whether gcc accepts -g… yes checking for gcc option to enable C11 features… none needed checking how to run the C preprocessor… gcc -E checking kernel source directory… /usr/src/linux-headers-6.8.0-44-generic checking kernel build directory… /usr/src/linux-headers-6.8.0-44-generic checking kernel source version… 6.8.0-44-generic checking kernel file name for module symbols… Module.symvers checking for linux/bits.h… yes checking for linux/io-64-nonatomic-lo-hi.h… yes checking for asm/set_memory.h… yes checking for asm/fpu/api.h… yes checking for linux/compiler_attributes.h… yes checking for linux/fence-array.h… no checking for linux/dma-resv.h… yes checking for linux/mmap_lock.h… yes checking for linux/pci-p2pdma.h… yes checking for linux/dma-attrs.h… no checking for linux/dma-buf-map.h… no checking for linux/iosys-map.h… yes checking for linux/stdarg.h… yes checking for linux/dma-fence-chain.h… yes checking for linux/xarray.h… yes checking for linux/container_of.h… yes checking for linux/cc_platform.h… yes checking for linux/processor.h… yes checking for linux/dma-map-ops.h… yes checking for linux/apple-gmux.h… yes checking for linux/device/class.h… yes checking for linux/build_bug.h… yes checking for linux/acpi_amd_wbrf.h… yes checking for linux/units.h… yes checking for drm/drm_backport.h… no checking for drm/amdgpu_pciid.h… no checking for drm/drm_probe_helper.h… yes checking for drm/drmP.h… no checking for drm/task_barrier.h… yes checking for drm/drm_managed.h… yes checking for drm/amd_asic_type.h… yes checking for drm/drm_aperture.h… yes checking for drm/dp/drm_dp_helper.h… no checking for drm/dp/drm_dp_mst_helper.h… no checking for drm/drm_gem_atomic_helper.h… yes checking for drm/display/drm_dp_helper.h… yes checking for drm/display/drm_dp_mst_helper.h… yes checking for drm/display/drm_dsc.h… yes checking for drm/display/drm_dsc_helper.h… yes checking for drm/display/drm_hdmi_helper.h… yes checking for drm/display/drm_hdcp_helper.h… yes checking for drm/display/drm_hdcp.h… yes checking for drm/display/drm_dp.h… yes checking for linux/pgtable.h… yes checking for drm/drm_fbdev_generic.h… yes checking for drm/drm_suballoc.h… yes checking for drm/drm_exec.h… yes checking for drm/drm_eld.h… yes checking for nproc… yes checking for supported chips… done checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for nproc… (cached) yes checking for module configuration… done configure: creating ./config.status config.status: creating config/config.h

Building module: Cleaning build area…(bad exit status: 2) . /tmp/amd.FhxPpAsK/.env && make -j4 KERNELRELEASE=6.8.0-44-generic TTM_NAME=amd ttm SCHED_NAME=amd-sched -C /lib/modules/6.8.0-44-generic/build M=/tmp/amd.FhxPp AsK… …(bad exit status: 2) ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/amdgpu-dkms.0.c rash’ Error! Bad return status for module build on kernel: 6.8.0-44-generic (x86_64) Consult /var/lib/dkms/amdgpu/6.7.0-1787201.22.04/build/make.log for more informa tion. dkms autoinstall on 6.8.0-44-generic/x86_64 failed for amdgpu(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information.

  • dkms: autoinstall for kernel 6.8.0-44-generic …fail! run-parts: /etc/kernel/postinst.d/dkms exited with return code 11 dpkg: error processing package linux-image-6.8.0-44-generic (–configure): installed linux-image-6.8.0-44-generic package post-installation script subproc ess returned error exit status 11 No apport report written because MaxReports is reached already Errors were encoun tered while processing: linux-headers-6.8.0-44-generic linux-headers-generic linux-generic linux-image-6.8.0-44-generic E: Sub-process /usr/bin/dpkg returned an error code (1)`

I am experiencing the same issue Layoric described, from my kernel 6.8.0-44-generic build, amdgpu crash logs: error: passing argument 2 of ‘drm_dp_add_payload_part2’ from incompatible pointer type [-Werror=incompatible-pointer-types]

I too will have to keep booting up on the older kernel (load 6.8.0-41-generic) until the dkms build second argument is resolved. Hope the devs can help with this solution soon…

Hitting same issue and tried fresh install, below are details from crash file containing build error:

   CC [M]  /tmp/amd.H03KThtD/amd/amdgpu/../display/dc/basics/dc_common.o
   CC [M]  /tmp/amd.H03KThtD/amd/amdgpu/../display/dc/basics/dce_calcs.o
 /tmp/amd.H03KThtD/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_helpers_dp_mst_send_payload_allocation’:
 /tmp/amd.H03KThtD/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:563:64: error: passing argument 2 of ‘drm_dp_add_payload_part2’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   563 |         ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, new_payload);
       |                                                 ~~~~~~~~~~~~~~~^~~~~~
       |                                                                |
       |                                                                struct drm_atomic_state *
 In file included from /tmp/amd.H03KThtD/include/kcl/header/drm/display/drm_dp_mst_helper.h:6,
                  from /tmp/amd.H03KThtD/include/kcl/backport/kcl_drm_dp_mst_helper_backport.h:25,
                  from /tmp/amd.H03KThtD/amd/backport/backport.h:57,
                  from <command-line>:
 ./include/drm/display/drm_dp_mst_helper.h:854:64: note: expected ‘struct drm_dp_mst_atomic_payload *’ but argument is of type ‘struct drm_atomic_state *’
   854 |                              struct drm_dp_mst_atomic_payload *payload);
       |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
 /tmp/amd.H03KThtD/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:563:15: error: too many arguments to function ‘drm_dp_add_payload_part2’
   563 |         ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, new_payload);
       |               ^~~~~~~~~~~~~~~~~~~~~~~~
 ./include/drm/display/drm_dp_mst_helper.h:853:5: note: declared here
   853 | int drm_dp_add_payload_part2(struct drm_dp_mst_topology_mgr *mgr,
       |     ^~~~~~~~~~~~~~~~~~~~~~~~
 cc1: some warnings being treated as errors
 make[3]: *** [scripts/Makefile.build:243: /tmp/amd.H03KThtD/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.o] Error 1
 make[3]: *** Waiting for unfinished jobs....
 make[2]: *** [scripts/Makefile.build:481: /tmp/amd.H03KThtD/amd/amdgpu] Error 2
 make[1]: *** [/usr/src/linux-headers-6.8.0-44-generic/Makefile:1925: /tmp/amd.H03KThtD] Error 2
 make: *** [Makefile:240: __sub-make] Error 2
 make: Leaving directory '/usr/src/linux-headers-6.8.0-44-generic'
DKMSKernelVersion: 6.8.0-44-generic
Date: Wed Sep 11 23:30:34 2024
DuplicateSignature: dkms:amdgpu-dkms:1:6.8.5.60200-2009582.24.04:/tmp/amd.H03KThtD/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:563:64: error: passing argument 2 of ‘drm_dp_add_payload_part2’ from incompatible pointer type [-Werror=incompatible-pointer-types]
Package: amdgpu-dkms 1:6.8.5.60200-2009582.24.04
PackageVersion: 1:6.8.5.60200-2009582.24.04
SourcePackage: amdgpu-dkms
Title: amdgpu-dkms 1:6.8.5.60200-2009582.24.04: amdgpu kernel module failed to build

I installed ROCm 6.2.1 - it works fine. But a couple of programs broke (Obsidian, browser…) with the error: “Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)”.

I fixed the error based on the comment from SamuelMarks:

sudo apt remove mesa-va-drivers
# Removes `va-driver-all` also

I did it like this:

sudo apt remove mesa-va-drivers
sudo apt remove mesa-amdgpu-va-drivers:amd64

When running the earlier kernel, e.g., 6.8.0-41, run these commands:

# Ensure you didn't accidentally `autoremove` any of the necessary packages; also run this if you're on the wrong kernel version
$ sudo apt install -y linux-headers-6.8.0-41-generic linux-headers-6.8.0-41 linux-image-6.8.0-41-generic linux-modules-6.8.0-41-generic linux-modules-extra-6.8.0-41-generic linux-tools-6.8.0-41-generic linux-tools-6.8.0-41
# Prevent this older kernel version from being automatically upgraded to 6.8.0-44
$ sudo apt-mark hold linux-*-6.8.0-41
# Remove the installed newer kernel + any configuration / build files
$ sudo apt purge -y linux-*-6.8.0-44

It should automatically update your bootloader (e.g., GRUB), and configure things properly. When AMD fixes this issue, you’ll want to run: sudo apt-mark unhold linux-*-6.8.0-41

PS: Alternatively as I said earlier you can use https://github.com/bkw777/mainline to install non Canonical [pun intended?] versions of the Linux kernel. Not just the latest kernel version, but 100+ different versions. Technically it is Canonical, and you can see the versions here or with the mainline GUI or CLI https://kernel.ubuntu.com/mainline/?C=N;O=D

Just my luck, I had begun a new journey and install of Ubuntu last night! Of course the current Ubuntu 24.04.1 LTS (Noble Numbat) comes with the 6.8.0-44-generic kernel! Every time I tried to build amdgpu-dkms, it had major errors and yep booted to black. I wasted several hours because of this bug but now I know why thank goodness. I even had a bug where if I removed the 6.8.0-44-generic kernel and just attempted to go with 6.8.0-41-generic, I lost all internet and network (icons and connection went missing from Ubuntu!). Fair to say that the start of the journey has been rough… Fingers double-crossed for a resolution.

Hi @Wedge009, thank you for reporting this issue. I was able to reproduce this when trying to build amdgpu-dkms on the 6.8.0-44 kernel and have created an internal ticket to fix this issue.

Could you please share your make.log to confirm the errors are the same.

I think this is a separate issue. You’re pulling in 32-bit packages for Jammy, although they seem to be available at https://repo.radeon.com/amdgpu/6.2.1/ubuntu/pool/main/libd/libdrm-amdgpu/. This particular issue is resolved, I suggest you submit a new issue for your problem if you’re still having trouble.

I’m not pulling anything, I have installed a package as suggested and executed “amdgpu-install”. Why there is 32 bit request I have no idea, system is 64 bit. Faulty kernel is 6.8.0-48, reverted to 6.8.0-44 and GPU works again.

I have found this page more up to date -> https://rocm.docs.amd.com/en/latest/ very well documented

Does anyone know whether the Ubuntu Noble situation has changed yet since EmilPosmyk’s post?

I confirm I was able to upgrade to ROCm 6.2.1 via apt (I was still with kernel 6.8.0-44-generic), then upgrade to kernel 6.8.0-45-generic. Both times dkms modules installed OK.

Hi all, what about Ubuntu 24.04.1 Noble … Is this also fixed or will be in the next release of the amdgpu version ? I get the titled error (I use UM890 Pro - Mini PC where is Ryzen 9 and Radeon 780M - kernel 6.8.0-45).

I see something that there is in distros of amdgpu: https://repo.radeon.com/amdgpu/6.2.1/ubuntu/dists/ And here is deb installer: https://repo.radeon.com/amdgpu-install/latest/ubuntu/ but when I use Ubuntu Noble version I still get the error:

Building module: Cleaning build area…(bad exit status: 2) . /tmp/amd.XkSbMRp1/.env && make -j16 KERNELRELEASE=6.8.0-45-generic TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/6.8.0-45-generic/build M=/tmp/amd.XkSbMRp1…(bad exit status: 2) ERROR: Cannot create report: [Errno 17] File exists: ‘/var/crash/amdgpu-dkms.0.crash’ Error! Bad return status for module build on kernel: 6.8.0-45-generic (x86_64) Consult /var/lib/dkms/amdgpu/6.8.5-2009582.24.04/build/make.log for more information. dkms autoinstall on 6.8.0-45-generic/x86_64 failed for amdgpu(10) Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information.

  • dkms: autoinstall for kernel 6.8.0-45-generic …fail! run-parts: /etc/kernel/postinst.d/dkms exited with return code 11 dpkg: error processing package linux-image-6.8.0-45-generic (–configure): installed linux-image-6.8.0-45-generic package post-installation script subprocess returned error exit status 11 Errors were encountered while processing: linux-image-6.8.0-45-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

Can you please let me know what is the current status of it ?

@nktice Thanks… Are you saying you ran the new install of 24.10 and it comes with 6.8.0-31-generic kernel? Going to give this a shot.

I maintain this guide on using some AI tools with AMD’s cards… https://github.com/nktice/AMD-AI - Using Ubuntu 24.10 ( dev release ) in the last few hours, I have gone so far as to have functioning ComfyUI and Stable Diffusion, but I am still working on textgen webui. As such there’s updates, that I have yet to post there, as I’m not finished. But it seems to work for many of the functions like older versions. I need a break now, as I’ve other things to do - here’s my notes so far : https://github.com/nktice/AMD-AI/blob/main/Ubuntu24.10.md

I am experiencing the same issue Layoric described, from my kernel 6.8.0-44-generic build, amdgpu crash logs: error: passing argument 2 of ‘drm_dp_add_payload_part2’ from incompatible pointer type [-Werror=incompatible-pointer-types]

I too will have to keep booting up on the older kernel (load 6.8.0-41-generic) until the dkms build second argument is resolved. Hope the devs can help with this solution soon…

It seems worth noting this particular function has been in the news : https://github.com/advisories/GHSA-52j9-mgvj-v9gh It had been subject of vulnerability that’s recently ‘fixed’.

Perhaps someone can tell if the issue we have may be related.
Does this ‘fix’ not work? Or are AMD drivers perhaps exploited? Given the issue one might not want to revert to older versions if there is indeed a security issue being exploited.

Following this comment, for ubuntu 22.04 you can download amdgpu-install 6.2.1 (or even newer 6.2.2) in here -> https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/jammy/

wget https://repo.radeon.com/amdgpu-install/6.2.1/ubuntu/jammy/amdgpu-install_6.2.60201-1_all.deb

install the .deb and run amdgpu-install

@EmilPosmyk @Arakade Without the make.log, it’s impossible to say. ROCm 6.2.1 fixes the issue on the newer Ubuntu kernels where drm_dp_add_payload_part2 had the wrong number of parameters. But Emil’s issue could be that he has no compiler installed, without the make.log output it’s impossible to say. But the problems above have been addressed in 6.2.1

Does anyone know whether the Ubuntu Noble situation has changed yet since EmilPosmyk’s post?

I ditched grub for ZFSBootMenu. I am so happy when I need to revert things like broken kernel. It makes testing this stuff so much easier. The old-school install process is always a pain, but so worth it.

https://docs.zfsbootmenu.org/en/v2.3.x/

I used amdgpu-install to install ROCm, HIP, etc., aiming to get HIP working with Blender, and occasionally for Stable Diffusion via ComfyUI. The process installed amdgpu-dkms along with other packages.

Today, I decided to uninstall everything:

amdgpu-install --uninstall
sudo apt autoremove amdgpu-install

After a reboot, I updated to Linux 6.8.0-45, then reinstalled amdgpu-install but only installed HIP without DKMS:

amdgpu-install --usecase=hip --no-dkms

Surprisingly, both HIP in Blender and ComfyUI are working, and I managed to free up 20-30GB of disk space. No clue how. Not sure if its related but I thought it might be helpful to someone.

i believe this is a ubuntu specific problem, as they choose 6.8 kernel (sadly not a LTS one) , picked some patch in -44 and thus break their partner’s code !

I create a bug report on Ubuntu side, as it is their patch that caused the bug

(<rant> Ubuntu picks random patch without testing partner’s software , not even basic compile test = bad QA ! </rant>)

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2080823

Just click to say “affects me too” 😃 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2080823/+affectsmetoo

Yeah I think you’re right; I have a second system (running essentially identical install of Ubuntu 24.04) with an Nvidia GPU and the 6.8.0-44 update broke my Nvidia graphics + CUDA driver packages as well. Must be something with how its handling dkms ?

@nktice

The problem for me and others is that we already have 6.8.0-41 but cannot get 6.8.0-44 installed . . .

Have same issue here … standard apt update lead to black screen at boot time… I can confirm that ROCm 6.1.3 has the same issue.

I encountered the same issue. The failed installation left /etc/modprobe.d/blacklist-amdgpu.conf preventing auto loading amdgpu kernel module from 6.8.0-44. After removing the blacklist file, I’m able to use ROCm 6.2 without installing amdgpu-dkms. amdgpu-dkms is versioned as 6.8.5, so using upstream amdgpu kernel module from upstream linux 6.8 seems working fine on my machine. Hopefully this is useful for people like me who prefer updating kernels.

Thank you @chrisaga and @SamuelMarks, these are the errors I saw on my end as well. I will provide any relevant updates in this thread. In the meantime, please continue to use the 6.8.0-41 kernel.