Table of Contents
Ubuntu - dkms - Check dkms status
dkms status
returns:
amdgpu/5.18.13-1580598.22.04, 5.19.0-45-generic, x86_64: installed
NOTE: This shows there is a amdgpu dkms module.
- This is located in /var/lib/dkms.
If an error is seen
dkms status
returns:
Error! Could not locate dkms.conf file. File: /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/source/dkms.conf does not exist.
NOTE: dkms relies upon the source/dmks.conf file.
- If this file is not found then dkms reports an error.
Find the offending module
for i in /var/lib/dkms/*/[^k]*/source; do [ -e "$i" ] || echo "$i";done
returns:
/var/lib/dkms/amdgpu/5.18.13-1577590.22.04/source/
NOTE: This confirms the offending module.
To fix the dkms error
Go to the /var/lib/dkms directory for the specific module reporting the error.
cd /var/lib/dkms/amdgpu
NOTE: In this example, the amdgpu module having the issue
Check what is installed in that directory
ls -al /var/lib/dkms/amdgpu/
returns:
total 8.0K drwxr-xr-x 3 root root 4.0K Jun 2 15:19 5.18.13-1577590.22.04/ drwxr-xr-x 3 root root 4.0K Jun 16 02:06 5.18.13-1580598.22.04/ lrwxrwxrwx 1 root root 46 Jun 16 02:06 kernel-5.19.0-45-generic-x86_64 -> 5.18.13-1580598.22.04/5.19.0-45-generic/x86_64/
NOTE: This shows 2 directories; and a link.
- with the top one being reported as causing the error, when dkms status command is run.
- The link and the associated directory it points to, are okay!
Remove the offending directory
sudo mv 5.18.13-1577590.22.04/ /home/peter/dkms_amd/
NOTE: For safety, the directory is just moved away to a backup directory, just in case it might be needed to be restored back.
WARNING: Do not remove the directory that is associated with the link, or all the sub-directories!
- This WILL result in Ubuntu not being able to boot properly!
Check again what is installed in that directory
ls -al /var/lib/dkms/amdgpu/
returns:
total 8.0K drwxr-xr-x 3 root root 4.0K Jun 16 02:06 5.18.13-1580598.22.04/ lrwxrwxrwx 1 root root 46 Jun 16 02:06 kernel-5.19.0-45-generic-x86_64 -> 5.18.13-1580598.22.04/5.19.0-45-generic/x86_64/
NOTE: This shows only 1 directory.
- with the link also pointing to this directory too.
Check that the module source does exist
The source of the actual module is found in /usr/src.
The link, in /var/lib/dkms/amdgpu should be pointing to the actual source.
ls /usr/src/amdgpu-5.18.13-1580598.22.04/
returns:
amd dkms.conf drm_gem_ttm_helper.c firmware include Makefile scheduler ttm
NOTE: Good!
- This shows that the dkms link does point to actual source.
Rebuild dkms modules
Rebuild all modules for the currently running kernel:
dkms autoinstall
NOTE: If this does not return errors then it has worked!
Retry to check dkms status
To see if the above changes have corrected the error.
dkms status
returns:
amdgpu/5.18.13-1580598.22.04, 5.19.0-45-generic, x86_64: installed
NOTE: This shows there is a amdgpu dkms module.
- The error has been corrected.
Update Kernel Modules
sudo update-initramfs -u
returns:
[sudo] password for peter: update-initramfs: Generating /boot/initrd.img-5.19.0-45-generic W: Possible missing firmware /lib/firmware/amdgpu/ip_discovery.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/vega10_cap.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/navi12_cap.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/psp_13_0_10_sos.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/aldebaran_cap.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_imu.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_rlc.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_mec.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_me.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_pfp.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_0_toc.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/sdma_6_0_3.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes1.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_mes1.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/gc_11_0_3_mes.bin for module amdgpu W: Possible missing firmware /lib/firmware/amdgpu/smu_13_0_10.bin for module amdgpu
NOTE: The warnings indicate that some firmware files are not found.
- It is suggested to download the latest firmware and add the missing files into the specific directories being shown here.