I recently upgraded to a radeon 7900 xt and was trying to install the drivers using the amdgpu-install.deb package. It gets mostly through the process and throws an error at the end with amdgpu-dkms. This will break apt updates and will require amdgpu-dkms to be temporarily uninstalled. I looked into the crash report for the installer and it seems like an update in a kernel function is breaking the install.
Here is the output for that crash dump
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c: In function ‘amdgpufb_create’:
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c:236:16: error: implicit declaration of function ‘drm_fb_helper_alloc_fbi’; did you mean ‘drm_fb_helper_alloc_info’? [-Werror=implicit-function-declaration]
236 | info = drm_fb_helper_alloc_fbi(helper);
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c:236:14: warning: assignment to ‘struct fb_info *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
236 | info = drm_fb_helper_alloc_fbi(helper);
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c:264:73: error: ‘struct drm_mode_config’ has no member named ‘fb_base’
264 | info->apertures->ranges.base = adev_to_drm(adev)->mode_config.fb_base;
CC [M] /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_bo_list.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_ctx.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_sync.o
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c: In function ‘amdgpu_fbdev_destroy’:
/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c:306:9: error: implicit declaration of function ‘drm_fb_helper_unregister_fbi’; did you mean ‘drm_fb_helper_unregister_info’? [-Werror=implicit-function-declaration]
306 | drm_fb_helper_unregister_fbi(&rfbdev->helper);
cc1: some warnings being treated as errors
make: *** [scripts/Makefile.build:260: /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.o] Error 1
make: *** Waiting for unfinished jobs....
LD [M] /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdkcl/amdkcl.o
make: *** [scripts/Makefile.build:512: /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu] Error 2
make: *** [Makefile:2026: /var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.2.0-25-generic'
Date: Tue Jul 18 16:21:40 2023
DuplicateSignature: dkms:amdgpu-dkms:1:220.127.116.11502-1607507.22.04:/var/lib/dkms/amdgpu/6.0.5-1607507.22.04/build/amd/amdgpu/amdgpu_fb.c:236:16: error: implicit declaration of function ‘drm_fb_helper_alloc_fbi’; did you mean ‘drm_fb_helper_alloc_info’? [-Werror=implicit-function-declaration]
Package: amdgpu-dkms 1:18.104.22.168502-1607507.22.04
Title: amdgpu-dkms 1:22.214.171.124502-1607507.22.04: amdgpu kernel module failed to build
OS: Kubuntu 23.04 x86_64
DE: Plasma 5.27.4
CPU: AMD Ryzen 9 3950X (32) @ 3.500GHz
GPU: AMD ATI Radeon RX 7900 XT/7900 XTX
Any help or workarounds other than reinstalling os appreciated since this is causing some unexpected behavior in plasmashell.
Seems like something that would have been released since 23.04 has been around since April. I had to revertmy system to before installing the amdgpu-install drivers and just use the base Ubuntu 23.04 drivers since it was crashing plasma all the time. I hope there is a patch for the kernel error soon! and a release for 23.04 after that.
KDE + AMD Finally worked (for me) (almost)
After a few weeks away from Plasma because of this problem and a lot of reading, I was finally able to successfully install amdgpu. However, I did not have the expected results, anyway I share my experience.
1. I came back to Plasma with a typical apt get update && apt get upgrade to update the system.
2. I was able to install amdgpu as stated in the official documentation. For my case I used amdgpu-install --opencl=rocr --vulkan=pro (fallow the official documentation for more variables)
3. I verified that the installation was correct and that the driver was detected and working:
lspci -k | grep -EA3 'VGA|3D|Display'
lspci -k | grep -A 2 -i "VGA"
4. I used the benchmarks of a game at my availability, USF4, giving numbers very similar to those measured in my Windows partition (yes, I have windows)
5. After much reading on the subject, measurements from sites like Phoronix and measurements in games viewed on Youtube, I concluded that this driver was not necessary for me, and that in my case, perhaps it was a step back.
6. My last experience was with Intel and Nvidia, and this is my first experience with AMD on Linux since my old laptop with ATI graphics card and Catalyst driver (a lot of time has passed)
7. You should bear in mind that today the driver options for AMD Linux are several, and you will find concepts such as RADV, AMDGPU, AMDGPU-PRO, AMDVLK, ROCR, VULKAN-PRO, etc. Going back to what was said in the point no 5, in most cases, and in mine too, RADV (by default) is the best option.
8. To conclude, as a warning to those who are returning to AMD or who are new to it, VAAPI Encoder sucks (obs-studio), you will have problems with proprietary or Open-Source drivers just the same. I had success installing a plugin for OBS (Flatpak) that modifies VAAPI and now I can stream at 1080p (or higher) and 60fps with no issues, but that's a story for another forum.
DE: Plasma 5.27.7
CPU: Ryzen 7 5800H (Integrated GPU)
Installing the latest version (5.7.0) actually worked, at least they didn't glitched. I'm trying to run AI models.
I installed through the package manager instead of the wrapper: https://rocm.docs.amd.com/en/latest/deploy/linux/install_overview.html
You can try to do this using the specific version for 5.4.2: https://docs.amd.com/en/docs-5.4.2/deploy/linux/install_overview.html
Remember to remove the amdgpu-dkms and the amdgpu installer before, and try to clean your install for packages that may interfeer like rocminfo and others.
I don't know if this will work for you, I had a bad time trying to install this through amdgpu installer.