Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

Journeyman III

Ubuntu/Linux, amdgpu, WARNING: amdgpu dkms failed for running kernel

Attempting to install the amdgpu driver from here using commands:

sudo apt-get install ./amdgpu-install_22.20.50200-1_all.deb
sudo apt-get update
sudo amdgpu-install --usecase=graphics --accept-eula

Getting errors:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-headers-5.15.0-53-generic is already the newest version (5.15.0-53.59).
linux-modules-extra-5.15.0-53-generic is already the newest version (5.15.0-53.59).
amdgpu-dkms is already the newest version (1:
amdgpu-lib is already the newest version (22.20.50200-1438747~22.04).
WARNING: amdgpu dkms failed for running kernel
INFO: Using --accept-eula confirms acceptance of the following license

What can be done? Please, any help appreciated.

2 Replies
Adept I

Although I had to use dpkg -i rather than apt-get to install the installer package, I'm getting similar errors.

Failure for me seems to start at configuring the amdgpu-dkms module for my 5.18 kernel ; 5.10 kernel module builds seemed okay though.

The installer starts to fail at the dkms mentioned step for the 5.18 kernel. The output is:

Building initial module for 5.18.0-4mx-amd64
Error! Bad return status for module build on kernel: 5.18.0-4mx-amd64 (amd64)
Consult /var/lib/dkms/amdgpu/ for more information.

This is a lengthier fail-log that has a few warnings followed by an error that terminates the build:

In file included from /var/lib/dkms/amdgpu/,
from /var/lib/dkms/amdgpu/,
from <command-line>:
/var/lib/dkms/amdgpu/ At top level:
/var/lib/dkms/amdgpu/ fatal error: drm/drm_dp_helper.h: No such file or directory
33 | #include <drm/drm_dp_helper.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [/usr/src/linux-headers-5.18.0-4mx-common/scripts/ /var/lib/dkms/amdgpu/] Error 1



It turned out that for me, on MX linux, if a dkms build failed on any of the installed kernels, it ends up throwing a wrench into the gears of the intall and configuration setup. That is, even when booting into the kernel where amdgpu build went fine the whole amdgpu module fails to load (not visible under 'lsmod' output, and apparently falls back to vesa (another symptom accelerate mode shows as negative when querying with 'glxinfo -B').


I spent an entire day (bit at a time over the span of 3 days) trying this and that. At first the prob seemed it was erroring out after not detecting any screens . Erasing the /etc/X11/xorg.conf and xorg.conf.d helped with that first error. I'm also booting with kernel parameter amdgpu.dc=1, but I'm not sure that matters anymore for the more recent kernels these days.

In any case, weird that it builds for 5.10 but not 5.18.