cancel
Showing results for 
Search instead for 
Did you mean: 

PC Drivers & Software

donahoed
Journeyman III

Driver install failure on Ubuntu 21.04

I Installed Ubuntu 21.04 today and attempted to remove my old AMD drivers and reinstall them. The problem is that it appears compilation fails within the new linux image for the kernel.

Specifically, the error starts here: (line3)

/var/lib/dkms/amdgpu/5.9.20.104-1247438/build/make.log (line 3)

CC [M] /var/lib/dkms/amdgpu/5.9.20.104-1247438/build/amd/amdkcl/kcl_drm_auth.o
CC [M] /var/lib/dkms/amdgpu/5.9.20.104-1247438/build/amd/amdkcl/kcl_drm_fb.o
/var/lib/dkms/amdgpu/5.9.20.104-1247438/build/amd/amdgpu/amdgpu_drv.c:1686:3: error: ‘struct drm_driver’ has no member named ‘gem_free_object_unlocked’
1686 | .gem_free_object_unlocked = amdgpu_gem_object_free,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.9.20.104-1247438/build/amd/amdgpu/amdgpu_drv.c:1686:30: warning: initialization of ‘int’ from ‘void (*)(struct drm_gem_object *)’ makes integer from pointer without a cast [-Wint-conversion]
1686 | .gem_free_object_unlocked = amdgpu_gem_object_free,
| ^~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.9.20.104-1247438/build/amd/amdgpu/amdgpu_drv.c:1686:30: note: (near initialization for ‘kms_driver.num_ioctls’)

 

AND this is the context of the terminal output while the error occurs and the aftermath.

Loading new amdgpu-5.9.20.104-1247438 DKMS files...
Building for 5.11.0-18-generic
Building for architecture x86_64
Building initial module for 5.11.0-18-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.11.0-18-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.9.20.104-1247438/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
dpkg: dependency problems prevent configuration of amdgpu:
amdgpu depends on amdgpu-dkms (= 1:5.9.20.104-1247438); however:
Package amdgpu-dkms is not configured yet.

dpkg: error processing package amdgpu (--configure):
dependency problems - leaving unconfigured
Setting up xserver-xorg-amdgpu-video-amdgpu (1:19.1.0-1247438) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up mesa-amdgpu-omx-drivers:amd64 (1
:20.3.4-1247438) ...
Setting up libegl1-amdgpu-mesa:amd64 (1:20.3.4-1247438) ...
Setting up libegl1-amdgpu-mesa:i386 (1:20.3.4-1247438) ...
Setting up libgl1-amdgpu-mesa-glx:amd64 (1:20.3.4-1247438) ...
Setting up libgl1-amdgpu-mesa-glx:i386 (1:20.3.4-1247438) ...
Setting up libgles2-amdgpu-mesa:amd64 (1:20.3.4-1247438) ...
Setting up libgles2-amdgpu-mesa:i386 (1:20.3.4-1247438) ...
Setting up libgl1-amdgpu-mesa-dri:amd64 (1:20.3.4-1247438) ...
Setting up libgl1-amdgpu-mesa-dri:i386 (1:20.3.4-1247438) ...
Setting up libegl1-amdgpu-mesa-drivers:amd64 (1:20.3.4-1247438) ...
Setting up libegl1-amdgpu-mesa-drivers:i386 (1:20.3.4-1247438) ...
Setting up amdgpu-lib (21.10-1247438) ...
Setting up amdgpu-lib32 (21.10-1247438) ...
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
amdgpu-dkms
amdgpu
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

 
0 Likes
3 Replies
Roesjka
Adept I

It depends on the actual kernel used by Ubuntu 21.04. AFAIK the linux kernel used by Ubuntu 21.04 is probably to new to work with AMD drivers as it requires specific linux kernels. Install the drivers supplied by Ubuntu 21.04 repositories main contrib non-free (or whatever needed with Ubuntu).

If you need latest OpenCL download the amdgpu driver from amd and install it as follows:

amdgpu-install --opencl=legacy(,rocr) --headless --no-dkms

as that should get you going.

I run Debian testing/bullseye with kernel 5.10.0-7-amd64 and installed the driver from the official repo main contrib non-free and installed the latest OpenCL that way.

 

0 Likes

Thanks for the info! I tried installing as you mentioned but seems like I run into the same compilation error every time. I'm pretty much at the point now where I'm going to wipe my entire machine and start over in case there's something left over in my system that's causing this.

Lesson learned about early adopting I suppose.

0 Likes


@Roesjka wrote:

It depends on the actual kernel used by Ubuntu 21.04. AFAIK the linux kernel used by Ubuntu 21.04 is probably to new to work with AMD drivers as it requires specific linux kernels. Install the drivers supplied by Ubuntu 21.04 repositories main contrib non-free (or whatever needed with Ubuntu).

If you need latest OpenCL download the amdgpu driver from amd and install it as follows:

amdgpu-install --opencl=legacy(,rocr) --headless --no-dkms

as that should get you going.

I run Debian testing/bullseye with kernel 5.10.0-7-amd64 and installed the driver from the official repo main contrib non-free and installed the latest OpenCL that way.

 


That dont work on Ubuntu 20.04.3

When in try to install the amdgpu-pro-21.30-1290604-ubuntu-20.04 (and i tried many older vesions before without success...) installation fails. The --no-dkms flag prevents installing the rocr and I dont want only legacy version since it is not working well with modern hardware like rx 5700 xt. Is rocr-support actually working on your system?

0 Likes