Similar to the issue discussed here, I have trouble with the configuration of amdgpu-dkms. Installation of the optional amdgpu driver hangs on that step. Here is the output of dpkg --configure amdgpu-dkms
Setting up amdgpu-dkms (1:5.4.7.53-1048554) ...
Removing old amdgpu-5.4.7.53-1048554 DKMS files...
Deleting module version: 5.4.7.53-1048554
completely from the DKMS tree.
Done.
Loading new amdgpu-5.4.7.53-1048554 DKMS files...
Building for 5.4.0-96-generic
Building for architecture x86_64
Building initial module for 5.4.0-96-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms-firmware.0.crash'
Error! Bad return status for module build on kernel: 5.4.0-96-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/make.log for more information.
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
The log file referenced contains the following text:
DKMS make.log for amdgpu-5.4.7.53-1048554 for kernel 5.4.0-96-generic (x86_64)
Sat 29 Jan 2022 06:43:23 AM CST
make: Entering directory '/usr/src/linux-headers-5.4.0-96-generic'
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_mn.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_device.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_drm.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_kms.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_fence.o
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_fence.c:29:1: warning: ‘dma_fence_test_signaled_any’ defined but not used [-Wunused-function]
29 | dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_io.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_atombios.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_kthread.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_mm.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/atombios_crtc.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_pci.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_connectors.o
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_pci.c: In function ‘amdkcl_pci_init’:
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_pci.c:102:84: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
102 | _kcl_pcie_link_speed = (const unsigned char *) amdkcl_fp_setup("pcie_link_speed", _kcl_pcie_link_speed_stub);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_pci.c:3:
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_common.h:23:63: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
23 | static inline void *amdkcl_fp_setup(const char *symbol, void *fp_stup)
| ~~~~~~^~~~~~~
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_perf_event.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_reservation.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/atom.o
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_reservation.c: In function ‘amdkcl_reservation_init’:
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_reservation.c:58:10: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
58 | &_kcl_reservation_seqcount_string_stub);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_reservation.c:32:
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_common.h:23:63: note: expected ‘void *’ but argument is of type ‘const char (*)[21]’
23 | static inline void *amdkcl_fp_setup(const char *symbol, void *fp_stup)
| ~~~~~~^~~~~~~
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/dma-resv.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_suspend.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_fence.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_workqueue.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_seq_file.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/kcl_connector.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_ttm.o
LD [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdkcl/amdkcl.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_encoders.o
LD [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/scheduler/amd-sched.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_memory.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_display.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_i2c.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_fb.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_gem.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_ring.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_cs.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_bios.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_execbuf_util.o
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_bios.c: In function ‘amdgpu_read_platform_bios’:
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_bios.c:200:9: error: implicit declaration of function ‘pci_platform_rom’ [-Werror=implicit-function-declaration]
200 | bios = pci_platform_rom(adev->pdev, &size);
| ^~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_bios.c:200:7: warning: assignment to ‘uint8_t *’ {aka ‘unsigned char *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
200 | bios = pci_platform_rom(adev->pdev, &size);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:270: /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu/amdgpu_bios.o] Error 1
make[1]: *** [scripts/Makefile.build:519: /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/amd/amdgpu] Error 2
make[1]: *** Waiting for unfinished jobs....
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_page_alloc.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_bo_manager.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_agp_backend.o
CC [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/ttm_page_alloc_dma.o
LD [M] /var/lib/dkms/amdgpu/5.4.7.53-1048554/build/ttm/amdttm.o
make: *** [Makefile:1762: /var/lib/dkms/amdgpu/5.4.7.53-1048554/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.0-96-generic'
After attempting to install and configure amdgpu, the default driver, Radeon, appears to have broken. It is still installed, but no longer controls my gpu.
Systemctl status gpu-manager.service
yields
Gpu-manager.service - detect the available gpus and deal with any system changes
Loaded: loaded (/lib/system/gpu-manager.service; enabled; vender preset: enabled)
Active: inactive (dead)
Based on this post and other research (just google the issue) it seems that amdgpu is only compatible with some kernels. I have already attempted purging the packages using apt purge amdgpu
. I do not know how to fix 'radeon,' the default driver.
Should I just give up trying to use this newer driver and focus on reverting to the default?
Ideally, I would like to have both drivers available as options so that I can revert to the default if/when amdgpu breaks.
Here are my hardware specs. I will edit to add additional information as necessary.
Processor : Intel(R) Pentium(R) CPU G3258 @ 3.20GHz
Memory : 8041MB (1523MB used)
Graphics : Radeon R7 240 (2GB)
Machine Type : Desktop
Operating System : Ubuntu 20.04.3 LTS
-SCSI Disks-
ATA KINGSTON SA400S3 (SSD, boot drive)
ATA Samsung SSD 860 (SSD)
WDC WD25 00BEVT-60A23T0 (HDD)