我一直在尝试安装 AMD GPU 驱动程序(适用于 RX5500M),但遇到了多个问题。现在,每当我运行sudo apt-get upgrade
(或使用 进行任何安装apt-get
)时,我都会收到以下错误:
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)
查看崩溃日志,可以看到以下内容:
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
我现在无法安装任何软件包,这到底是怎么回事,我该如何解决?
答案1
我通过撤消安装驱动程序的尝试来修复此问题。
答案2
只需删除 amdgpu-dkms 包即可产生同样的效果,但这并不是解决办法……而只是一种忽略真正问题的创可贴。
但是,这是执行此操作的命令行:
sudo apt remove amdgpu-dkms
遗憾的是,由于我遇到了完全相同的问题,并且我今天已经安装/卸载了 AMD gpu 驱动程序一千次(我已经记住了所有选项),除了忽略它风格的答案之外,我没有真正的解决方案。
如果有人能给出真正的答案 - 请发布它以便解决问题。我真的也需要这个功能。