Quick installation guide for enabling AMD Ryzen AI NPU on Ubuntu 25.04 with Secure Boot.
- Processor: AMD Ryzen AI processor (Strix/Phoenix series)
- OS: Ubuntu 25.04
- Kernel: 6.14+ (included in Ubuntu 25.04)
- Secure Boot: Can remain enabled (requires MOK enrollment)
git clone https://github.com/amd/xdna-driver.git
cd xdna-driver
git submodule update --init --recursivesudo ./tools/amdxdna_deps.shThis installs required packages: cmake, gcc, boost, OpenCL headers, protobuf, and more.
cd xrt/build
./build.sh -npu -opt
# Install the generated package (adjust version as needed)
sudo apt reinstall ./Release/xrt_202610.2.21.0_25.04-amd64-base.deb
cd ../../cd build
./build.sh -releaseThis creates xrt_plugin.2.21.0_25.04-amd64-amdxdna.deb in build/Release/.
If Secure Boot is enabled, you must enroll the MOK key before installing the plugin:
# Import MOK key (you'll be prompted to set a password)
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
# Reboot to complete enrollment
sudo rebootDuring reboot:
- MOK Manager (blue screen) will appear before GRUB
- Select "Enroll MOK" → "Continue" → "Yes"
- Enter the password you set
- Select "Reboot"
Alternative: Disable Secure Boot in BIOS if you don't want to enroll MOK.
sudo apt install ./build/Release/xrt_plugin.2.21.0_25.04-amd64-amdxdna.debThe DKMS module should load successfully after MOK enrollment.
# Load XRT environment
source /opt/xilinx/xrt/setup.sh
# Check device detection
xrt-smi examine
# Run validation tests
xrt-smi validate --device <BDF>Expected output:
- Device detected: NPU Strix at [0000:c2:00.1] (BDF may vary)
- All validation tests should pass (GEMM, latency, throughput)
# Check driver is loaded
lsmod | grep amdxdna
# Check device node exists
ls -l /dev/accel/accel0
# Check MOK enrollment (if using Secure Boot)
mokutil --list-enrolled | grep "mod Secure Boot"- MOK key not enrolled properly
- Solution: Re-run
sudo mokutil --importand reboot - Or disable Secure Boot in BIOS
- Check driver is loaded:
lsmod | grep amdxdna - Check device exists:
ls /dev/accel/accel0 - Verify you're in render group:
groups - Add user to render group if needed:
sudo usermod -aG render $USER
- Ensure DKMS driver is loaded (not built-in):
modinfo amdxdna | grep updates/dkms - Check firmware version matches:
xrt-smi examineshould show 255.x.x.x - Try removing and reinstalling xrt_plugin package
With successful installation, you should see:
- GEMM test: 50+ TOPS
- Latency: <50 microseconds average
- Throughput: 80,000+ ops/sec
- Ubuntu 25.04 includes amdxdna driver in kernel 6.14, but the DKMS version from this repo provides full functionality
- Firmware is included in the xrt_plugin package
- XRT environment must be sourced in each new shell session
- Add
source /opt/xilinx/xrt/setup.shto~/.bashrcfor automatic setup
- AMD XDNA Driver Repository
- XRT Documentation
- MOK Management:
man mokutil