Score:0

Errors with amdgpu-dmks on Ubuntu 22.04

il flag

I have been trying to install AMD GPU drivers (for the RX5500M) and have been facing multiple issues. Now, whenever I run sudo apt-get upgrade (or any install with apt-get), I recieve the following error:

dpkg: error processing package amdgpu-dkms (--configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
amdgpu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

Looking at the crash log, the following can be seen:

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for amdgpu-5.16.9.22.20-1438747~22.04 for kernel 5.15.0-56-generic (x86_64)
 Tuesday 13 December 2022 04:09:28 AM IST
 make: Entering directory '/usr/src/linux-headers-5.15.0-56-generic'
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/Makefile:26: "Local GCC version 110303 does not match kernel compiler GCC version 110300"
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~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-1438747~22.04/build/drm_gem_ttm_helper.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/scheduler/sched_main.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/scheduler/sched_fence.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/scheduler/sched_entity.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_tt.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_bo.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/main.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_bo_util.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/symbols.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_bo_vm.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_common.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_drv.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_kernel_params.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/dma-buf/dma-resv.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_backlight.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_ioctl.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_kthread.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_io.o
   LD [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amddrm_ttm_helper.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_perf_event.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_module.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_execbuf_util.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_range_manager.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_resource.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_seq_file.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_pool.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_suspend.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_pci.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_mm.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_device.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_device.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_sys_manager.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_memory.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_sched.o
   LD [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/scheduler/amd-sched.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_kms.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_fence.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_fence_array.o
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~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-1438747~22.04/build/include/kcl/kcl_kref.h:15,
                  from /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/backport/backport.h:6,
                  from <command-line>:
 ./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-1438747~22.04/build/amd/amdkcl/kcl_reservation.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/ttm_agp_backend.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_atombios.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_cache.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_auth.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_fb.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_print.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_fbmem.o
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~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-1438747~22.04/build/include/kcl/kcl_kref.h:15,
                  from /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/backport/backport.h:6,
                  from <command-line>:
 ./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-1438747~22.04/build/amd/amdkcl/kcl_drm_crtc.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_connector.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/atombios_crtc.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_atomic_helper.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_connectors.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_device_cgroup.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_mn.o
   LD [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/ttm/amdttm.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_modes.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/atom.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_time.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_ftrace.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_acpi_table.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_page_alloc.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_numa.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_fs_read_write.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_aperture.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_drv.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_simple_kms_helper.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_bitmap.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_vmscan.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_dma_fence_chain.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_mce_amd.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_fence.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_drm_hdcp.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_debugfs_inode.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/kcl_sysfs_emit.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_ttm.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_object.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_encoders.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_gart.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_display.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_i2c.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_fb.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_gem.o
   LD [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdkcl/amdkcl.o
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_ring.o
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ssg_init’:
 /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~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-1438747~22.04/build/amd/amdgpu/amdgpu_ttm.o] Error 1
 make[2]: *** Waiting for unfinished jobs....
   CC [M]  /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu/amdgpu_cs.o
 make[1]: *** [scripts/Makefile.build:560: /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build/amd/amdgpu] Error 2
 make: *** [Makefile:1903: /var/lib/dkms/amdgpu/5.16.9.22.20-1438747~22.04/build] Error 2
 make: Leaving directory '/usr/src/linux-headers-5.15.0-56-generic'
DKMSKernelVersion: 5.15.0-56-generic
Date: Tue Dec 13 04:09:34 2022
DuplicateSignature: dkms:amdgpu-dkms-firmware:1:5.16.9.22.20.50200-1438747~22.04:/var/lib/dkms/amdgpu/5.16.9.22.20-1438747~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 *’
Package: amdgpu-dkms-firmware 1:5.16.9.22.20.50200-1438747~22.04
PackageVersion: 1:5.16.9.22.20.50200-1438747~22.04
SourcePackage: amdgpu-dkms
Title: amdgpu-dkms-firmware 1:5.16.9.22.20.50200-1438747~22.04: amdgpu kernel module failed to build

I'm unable to install any packages now, what exactly is going on here and how do I fix it?

ChanganAuto avatar
us flag
AMD graphics drivers are open-source, selected at the time of the Ubuntu installation (if there's compatible hardware) and just run. No user action required. What exactly have you tried to install?
AntPalmer avatar
il flag
I tried running amdgpu-install
ChanganAuto avatar
us flag
That's the proprietary overlay, the same drivers you already have - again, if you have compatible hardware - plus a couple of proprietary stuff that you very likely DON'T need at all. BTW, which AMD graphics do you have? Please always [edit] the question to add information such as what just asked.
AntPalmer avatar
il flag
I edited it to include the GPU name.
ChanganAuto avatar
us flag
Yes, it runs with `amdgpu` which, again, is already installed. Do you have any reason to want to install the drivers from AMD? If not then don't, it's as simple as that. Nothing else to add.
AntPalmer avatar
il flag
Don't I need to upgrade my GPU drivers?
CherryCoke avatar
in flag
Actually, a lot of programs (especially games) require the AMD Specific drivers. So, popping off (looking at you @ChanganAuto) on all of the questions seeking help on this issue is *SO NOT HELPFUL*. Let the question be answered.
Score:0
il flag

I fixed it by undoing the attempt I made at installing the driver.

Score:-1
in flag

Simply removing the amdgpu-dkms package would do the same thing, yet, that's not a fix... but a band-aid to ignore the real problem.

But, here is the command line to do so:

sudo apt remove amdgpu-dkms

Sadly, as I am having this exact same issue, and I have installed / uninstalled the AMD gpu drivers a thousand times today (to the point that I have all of the options memorized), I do not have a real solution to offer other than the ignore it style answer.

If someone comes along with an actual answer - please post it so that it can be resolved. I really need to have this working too.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.