WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: AMD XDNA device driver is missing  (Read 140 times)

Offline xLeaves

  • Newbie
  • *
  • Posts: 3
AMD XDNA device driver is missing
« on: February 12, 2026, 02:19:06 AM »
dmesg:
pci 0000:c7:00.0: [1022:14ec] type 00 class 0x130000 PCIe Endpoint

It appears the kernel driver for AMD XDNA series NPUs was removed during compilation, with an incorrect value for the CONFIG_AMD_XDNA configuration option.

NPUs will play an increasingly vital role in the future. We hope the next version update will restore support for AMD NPUs.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15477
Re: AMD XDNA device driver is missing
« Reply #1 on: February 12, 2026, 06:26:52 AM »
You don't mention which architecture you're speaking of, but xdna doesn't appear at all in http://tinycorelinux.net/17.x/x86_64/release/src/kernel/config-6.18.2-tinycore64.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12570
Re: AMD XDNA device driver is missing
« Reply #2 on: February 12, 2026, 10:12:57 AM »
Hi xLeaves
I plugged  CONFIG_AMD_XDNA  into Google and got back exactly
one result, your original post.

Maybe you are looking for this out of tree driver:
https://github.com/amd/xdna-driver

As referenced here:
https://docs.kernel.org/accel/amdxdna/amdnpu.html#usermode-driver-umd

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15477
Re: AMD XDNA device driver is missing
« Reply #3 on: February 12, 2026, 10:24:06 AM »
There's also this, which explains why the xdna does not appear in the kernel config:
Code: [Select]
  x Symbol: DRM_ACCEL_AMDXDNA [=n]                                                                                      x 
  x Type  : tristate                                                                                                    x 
  x Defined at drivers/accel/amdxdna/Kconfig:3                                                                          x 
  x   Prompt: AMD AI Engine                                                                                             x 
  x   Depends on: DRM [=m] && AMD_IOMMU [=n] && DRM_ACCEL [=n] && PCI [=y] && HAS_IOMEM [=y] && X86_64                  x 
  x   Location:                                                                                                         x 
  x     -> Device Drivers                                                                                               x 
  x (1)   -> Compute Acceleration Framework (DRM_ACCEL [=n])                                                            x 
  x         -> AMD AI Engine (DRM_ACCEL_AMDXDNA [=n])                                                                   x 
  x Selects: DRM_SCHED [=m] && DRM_GEM_SHMEM_HELPER [=m] && FW_LOADER [=y] && HMM_MIRROR [=n] 

..so xdna could be enabled, but you'd have to re-build the kernel
« Last Edit: February 12, 2026, 10:47:03 AM by Juanito »

Offline xLeaves

  • Newbie
  • *
  • Posts: 3
Re: AMD XDNA device driver is missing
« Reply #4 on: February 12, 2026, 09:53:45 PM »
I am using the AMD64 architecture (x86_64).

Yes, I'm attempting to compile the kernel myself, but I only have a Debian 12 virtual machine with two virtual CPU cores, and the compilation process is extremely slow.

In fact, support for the AMD XDNA NPU driver wasn't introduced until Linux 6.14 and later versions. TinyCore 17 is the first distribution to include this capability, likely because the driver was stripped down. As a result, it only detects the PCIe device but cannot utilize it.

I made the following modifications to .config and hope to successfully enable the XDNA NPU:

# Enable the base acceleration framework (NPU driver dependency)
sed -i 's/# CONFIG_ACCEL is not set/CONFIG_ACCEL=y/' .config

# Remove any existing AMD_XDNA configuration entries to avoid redundant definitions
sed -i '/CONFIG_AMD_XDNA/d' .config

# Compile the NPU driver as a kernel module (m indicates compiling as a .ko module, not built-in)
echo "CONFIG_AMD_XDNA=m" >> .config

# Disable NPU debug mode (unnecessary in production, reduces compilation overhead)
echo "CONFIG_AMD_XDNA_DEBUG=n" >> .config

# Fallback to ensure PCI/cryptography dependencies are enabled (already included in official config, prevents accidental omission)
sed -i 's/# CONFIG_PCI is not set/CONFIG_PCI=y/' .config
sed -i 's/# CONFIG_CRYPTO is not set/CONFIG_CRYPTO=y/' .config

The compilation has been running for 12 hours and has failed once. I'm trying to obtain amdxdna.ko, though I'd much prefer to get vmlinuz64, which directly includes the required drivers  :P

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12570
Re: AMD XDNA device driver is missing
« Reply #5 on: February 12, 2026, 11:03:18 PM »
Hi xLeaves
Editing the  .config  manually is discouraged:
1. Some options interact with other options.
2. Saying Y to some options may require some other options to be set to Y.
3. Saying M to some options may require some other options to be set to M.
4. Some  CONFIG_  options only become visible when options they depend on are enabled.

These interactions and dependencies get resolved by the many Kconfig files
in the kernel tree.

Use the correct tools for your project:
Code: [Select]
tce-load -i compiletc perl5 bash bc ncursesw-dev elfutils-dev

# Change these (and others) to match the version and architecture you are compiling for:
wget http://tinycorelinux.net/16.x/x86/release/src/kernel/linux-6.12.11-patched.tar.xz
wget http://tinycorelinux.net/16.x/x86/release/src/kernel/config-6.12.11-tinycore

tar xf linux-6.12.11-patched.tar.xz

cd linux-6.12.11

make mrproper

cp ../config-6.12.11-tinycore ./.config
make oldconfig

# This next step presents you with a menu driven way to make your changes correctly.

make menuconfig

# It also has a search function.
# Once the  menuconfig  menu is up, press  /  to call up the (case insensitive) search dialog.

# When you are done, select  Save  using the  right arrow  key and hit enter enter enter
# select  Exit  using the  right arrow  key and hit enter enter

# Then start you compilation.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15477
Re: AMD XDNA device driver is missing
« Reply #6 on: Today at 10:08:52 AM »
I built amdxdna - it took 3h15m on my ancient laptop - see http://tinycorelinux.net/17.x/x86_64/release/src/kernel/amdxdna/

Boot bzImage instead of vmlinuz64 and then:

Copy the module to /usr/local/lib/modules/6.18.2-tinycore64/kernel/drivers/accel or similar
"sudo depmod -a"
Load graphics-KERNEL if not already loaded
"sudo modprobe amdxdna"