Hi,
I come from NVidia... So I'm not super familiar with the "ATI" way of doing things.
I'm trying to get the graphics DKMS version of the driver to work on my Kubuntu 23.04.
I've downloaded the deb package, but then when running amdgpu-install I get an error which generates a amdgpu-dkms-firmware.0.crash file (See attached).
ProblemType: Package
DKMSBuildLog:
DKMS make.log for amdgpu-5.18.13-1577590.22.04 for kernel 6.2.0-20-generic (x86_64)
tor 30 maj 2023 18:52:19 CEST
make: Entering directory '/usr/src/linux-headers-6.2.0-20-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
You are using: gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/ttm_execbuf_util.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/drm_gem_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/kcl_common.o
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/x86/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:247,
from ./include/linux/export.h:33,
from ./include/linux/linkage.h:7,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:56,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/backport/backport.h:6,
from <command-line>:
./include/linux/stddef.h:8:14: error: expected declaration specifiers or ‘...’ before ‘(’ token
8 | #define NULL ((void *)0)
| ^
./include/drm/drm_print.h:410:23: note: in expansion of macro ‘NULL’
410 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~~
/var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/include/kcl/kcl_drm_print.h:195:6: note: in expansion of macro ‘drm_dev_dbg’
195 | void drm_dev_dbg(const struct device *dev, int category, const char *format, ...);
| ^~~~~~~~~~~
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/x86/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:247,
from ./include/linux/export.h:33,
from ./include/linux/linkage.h:7,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:56,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/backport/backport.h:6,
from <command-line>:
./include/linux/stddef.h:8:14: error: expected declaration specifiers or ‘...’ before ‘(’ token
8 | #define NULL ((void *)0)
| ^
./include/drm/drm_print.h:410:23: note: in expansion of macro ‘NULL’
410 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__)
| ^~~~
/var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/include/kcl/kcl_drm_print.h:195:6: note: in expansion of macro ‘drm_dev_dbg’
195 | void drm_dev_dbg(const struct device *dev, int category, const char *format, ...);
| ^~~~~~~~~~~
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/x86/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:247,
from ./include/linux/export.h:33,
from ./include/linux/linkage.h:7,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:56,
from ./include/linux/kref.h:16,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/include/kcl/kcl_kref.h:15,
from /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/ttm/backport/backport.h:6,
from <command-line>:
./include/linux/stddef.h:8:14: error: expected declaration specifiers or ‘...’ before ‘(’ token
8 | #define NULL ((void *)0)
...
...
...
./include/linux/export.h:150:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
150 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/kcl_drm_print.c:175:1: note: in expansion of macro ‘EXPORT_SYMBOL’
175 | EXPORT_SYMBOL(drm_dev_dbg);
| ^~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/kcl_drm_print.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CC [M] /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl/kcl_drm_modes.o
make[1]: *** [scripts/Makefile.build:512: /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build/amd/amdkcl] Error 2
make: *** [Makefile:2026: /var/lib/dkms/amdgpu/5.18.13-1577590.22.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.2.0-20-generic'
DKMSKernelVersion: 6.2.0-20-generic
Date: Tue May 30 18:52:23 2023
DuplicateSignature: dkms:amdgpu-dkms-firmware:1:5.18.13.50405-1577590.22.04:./include/linux/stddef.h:8:14: error: expected declaration specifiers or ‘...’ before ‘(’ token
Package: amdgpu-dkms-firmware 1:5.18.13.50405-1577590.22.04
PackageVersion: 1:5.18.13.50405-1577590.22.04
SourcePackage: amdgpu-dkms
Title: amdgpu-dkms-firmware 1:5.18.13.50405-1577590.22.04: amdgpu kernel module failed to build
Any idea of what I might be doing wrong please?
Thank you!
Sorry to piggyback on your thread. I wanted to let you know you are not alone. I also get this after having updated kernel to 6.2.0-20-generic on ubuntu 23.04
I really hope there will be a quick solution to this.
Yup - thanks Benishor.
In the end, I ended up downgrading to Kubuntu 22.04.2... Kernel is 5.19.0-43-generic.
Not many distros are supported - not even mainstream ones such as Neon. Shame. Anyhoo - let's keep each other posted if we ever find a solution to this
Even KDE Neon isn't supported. Shame.
OK so here's what happened to me:
I went to install the latest drivers, downloaded from AMD website.
Installation failed, and the amdgpu kernel module was hence broken
While it booted, for me it was an issue as without any form of a working amdgpu module my second monitor would not work with linux
Here's how I managed to get back to the standard amdgpu module and fixing the system:
Ran amdgpu-uninstall
Created a live usb of the same ubuntu version I had installed, and created a small partition on my ssd to install it (chose minimal install)
Check the kernel versions between both ubuntu installs are the same
Once installed, go back to the ubuntu version with the broken kernel module
Copy the broken drivers from the /lib/modules/<kernel-version>/kernel/drivers/gpu/drm/amd just in case something goes wrong
Remove the faulty kernel module sudo rmmod <faulty-module>
Replace the faulty module files located in this directory /lib/modules/<kernel-version>/kernel/drivers/gpu/drm/amd with the ones from the fresh ubuntu install
Load the kernel module as so sudo modprobe <working-module> to check it's working.
The amdgpu module was blacklisted from loading on my system, so I commented out the line in this file
sudo nano /etc/modprobe.d/blacklist-amdgpu.conf
Reboot the system. If the module still doesn't load on boot, set it to do so. There are numerous ways of doing it - I edited
sudo nano /etc/modules
and added the line "amdgpu"
My solution may not be the best, or the most practical, but after many hours of trying, for me this was the only thing that worked.