# \[GUIDE\] Use NPU (XDNA2) with Arch Linux and FastFlowLM!

**URL:** <https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879>\
**Category:** Framework Laptop 13\
**Tags:** ai, amd-ai-300\
**Created:** [February 25, 2026, 10:10am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879 "2026-02-25T10:10:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![GreyXor](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/greyxor/32/19357_2.png) [@GreyXor](https://community.frame.work/u/GreyXor)\
**Post date:** [February 25, 2026, 10:10am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/1 "2026-02-25T10:10:08Z")

</div>

Good News, Everyone!  
We can now use the NPU for LLM inference with FastFlowLM. Here’s my little guide for you to achieve it

 ![image](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/8/4/84669ad457e6e9f63ceeb12a55d370984e296759.png)

To use the NPU on Arch Linux you need some patches that will soon be merged into linux, xrt-plugin-amdxdna, and xrt.

You need to :

1. Build linux-git kernel package with patches  
~~2. Build xrt and xrt-plugin-amdxdna with patches~~  
~~3. Compile FastFlowLM or [use my aur package](https://aur.archlinux.org/packages/fastflowlm-git)~~

**1. Build linux-git with patches**  
Usin this AUR package [AUR (en) - linux-git](https://aur.archlinux.org/packages/linux-git) you have to change the URL:

> $\_srcname::git+https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux

become

> $\_srcname::git+https://gitlab.freedesktop.org/drm/misc/kernel/#branch=drm-misc-fixes

Then `makepkg -si`

~~**2. Build xrt and xrt-plugin-amdxdna with patches**~~

~~[https://gitlab.archlinux.org/superm1/xrt/-/tree/update-version~~](https://gitlab.archlinux.org/superm1/xrt/-/tree/update-version~~)  
~~[https://gitlab.archlinux.org/superm1/xrt-plugin-amdxdna/-/tree/update-version~~](https://gitlab.archlinux.org/superm1/xrt-plugin-amdxdna/-/tree/update-version~~)

~~On each repo you have to execute `makepkg -si`~~

~~**3. Compile FastFlowLM**~~  
~~Follow this link to build FastFlowLM~~  
~~

> **[GitHub - FastFlowLM/FastFlowLM: Run LLMs on AMD Ryzen™ AI NPUs in minutes. Just...](https://github.com/FastFlowLM/FastFlowLM?tab=readme-ov-file#%EF%B8%8F-building-from-source)**
>
> Run LLMs on AMD Ryzen™ AI NPUs in minutes. Just like Ollama - but purpose-built and deeply optimized for the AMD NPUs.

You can also use my aur package [https://aur.archlinux.org/packages/fastflowlm-git~~](https://aur.archlinux.org/packages/fastflowlm-git~~)

You may also need to edit `/etc/systemd/system.conf` and change #DefaultLimitMEMLOCK to DefaultLimitMEMLOCK=infinity

Happy inference!

Special thanks to @Mario_Limonciello

---

<div class="post-metadata">

**Author:** ![SneakyPM](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@SneakyPM](https://community.frame.work/u/SneakyPM)\
**Post date:** [February 25, 2026, 1:06pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/2 "2026-02-25T13:06:27Z")

</div>

Very interesting. Can any GGUF model from HuggingFace be used ?

How does it compare to iGPU performance wise tg and pp ?

Can we run iGPU+NPU with NPU for prompt processing and iGPU for text generation ?

---

<div class="post-metadata">

**Author:** ![GreyXor](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/greyxor/32/19357_2.png) [@GreyXor](https://community.frame.work/u/GreyXor)\
**Post date:** [February 25, 2026, 1:12pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/3 "2026-02-25T13:12:56Z")

</div>

1. No, they need to adept model to make them work with NPU. List of available model’s here: [Models · FastFlowLM](https://fastflowlm.com/docs/models/) they also making tools to automate conversion of GGUF to NPU-compatible
2. There’s some benchmarks here: [Benchmarks · FastFlowLM](https://fastflowlm.com/docs/benchmarks/)
3. Not with FastFlowLM which is NPU-only, at least for now.

---

<div class="post-metadata">

**Author:** ![Shiroudan](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/shiroudan/32/15620_2.png) [@Shiroudan](https://community.frame.work/u/Shiroudan)\
**Post date:** [February 28, 2026, 6:17pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/4 "2026-02-28T18:17:48Z")

</div>

I suppose this will not work on the AMD 7040 mainboards considering the repo seems to require XDNA2?

Thank you for the detailed guide however!

---

<div class="post-metadata">

**Author:** ![George\_Sofianos](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/george_sofianos/32/46332_2.png) [@George\_Sofianos](https://community.frame.work/u/George_Sofianos)\
**Post date:** [February 28, 2026, 6:50pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/5 "2026-02-28T18:50:33Z")

</div>

For people that don’t want to build the Linux kernel, I’ve pushed a [dkms package](https://aur.archlinux.org/packages/amdxdna-dkms) that should work with kernel 6.18+. Here is me testing the NPU in Lemonade

 ![Screenshot From 2026-02-28 20-35-40](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/3/f/3f4a6877663da52b8a9b50c9e7e665959758e0f6.png)

---

<div class="post-metadata">

**Author:** ![John\_Scott1](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/john_scott1/32/36262_2.png) [@John\_Scott1](https://community.frame.work/u/John_Scott1)\
**Post date:** [March 1, 2026, 7:08am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/6 "2026-03-01T07:08:04Z")

</div>

This is awesome stuff guys, thanks for sharing. For Ubuntu, AMD now have a PPA for the xdna2 DKMS package. There is some more info at [FastFlowLM/docs/linux-getting-started.md at main · FastFlowLM/FastFlowLM · GitHub](https://github.com/FastFlowLM/FastFlowLM/blob/main/docs/linux-getting-started.md) - that doc refers to a .deb package for fastflowlm which doesn’t exist yet but I’m sure it’s only a matter of time.

I was able to build FastFlowLM from source and after a small amount of fiddling around (had to make a symlink from my build directory to src/xclbins) now have gpt-oss-20b running at 18 tok/s via the NPU, even with my CPU in power-saving mode. Very cool.

---

<div class="post-metadata">

**Author:** ![Guest383](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Guest383](https://community.frame.work/u/Guest383)\
**Post date:** [March 10, 2026, 4:08am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/7 "2026-03-10T04:08:37Z")

</div>

Thank you. I had to install your _amdxdna-dkms_ package to get it to work on CachyOS because Cachy’s firmware was newer than the driver’s version or something. PSA: Do not set `amd_iommu=off` as a kernel boot parameter if you want the NPU to work.

---

<div class="post-metadata">

**Author:** ![Caleb\_Maclennan](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/caleb_maclennan/32/39290_2.png) [@Caleb\_Maclennan](https://community.frame.work/u/Caleb_Maclennan)\
**Post date:** [March 22, 2026, 7:28am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/8 "2026-03-22T07:28:28Z")

</div>

I think you can scratch off step 3 from the list too, this seems to work out of the box with the fastflowlm version packaged in stable Arch repos now: 0.9.35. I got it to work without -git package.

For reference I also didn’t use the linux-git kernel, I use the linux-mainline AUR package that is 7.0.0-rc4.

---

<div class="post-metadata">

**Author:** ![GreyXor](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/greyxor/32/19357_2.png) [@GreyXor](https://community.frame.work/u/GreyXor)\
**Post date:** [March 22, 2026, 10:02am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/9 "2026-03-22T10:02:58Z")

</div>

Sure thing, thanks!  
I will also update it completely when Linux 7.0 will be released(~2026-04-19)

---

<div class="post-metadata">

**Author:** ![J\_Dog](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@J\_Dog](https://community.frame.work/u/J_Dog)\
**Post date:** [April 24, 2026, 7:10am UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/10 "2026-04-24T07:10:39Z")

</div>

I just upgraded to Ubuntu 26.04 on my HX 370. All the drivers are preinstalled and the NPU just works after installing flm! Easiest way to get started is to install the lemonade server and flm. [Instruction here.](https://lemonade-server.ai/install_options.html#linux) The instructions basically say:

- Install the Ubuntu 26.04 FLM deb from [GitHub](https://github.com/FastFlowLM/FastFlowLM/releases).
- Install the Lemonade server with

```auto
sudo add-apt-repository ppa:lemonade-team/stable
sudo apt install lemonade-server

```

After that, the [lemonade webapp](http://localhost:13305/) should show a bunch of models under FastFlowLM NPU that you can download and use.

---

<div class="post-metadata">

**Author:** ![adb-sh](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@adb-sh](https://community.frame.work/u/adb-sh)\
**Post date:** [April 24, 2026, 12:38pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/11 "2026-04-24T12:38:06Z")

</div>

for the nix folks among us. i found these two flakes:

- [GitHub - robcohen/nix-amd-npu: Nix flake for AMD Ryzen AI NPU (XRT + XDNA driver) · GitHub](https://github.com/robcohen/nix-amd-npu)
  - builds xrt and the xdna driver
  - there is also a package for fastflowlm
  - worked for me

- [GitHub - noamsto/nix-amd-ai: AMD AI inference stack for NixOS (XRT, XDNA plugin, FastFlowLM, Lemonade) · GitHub](https://github.com/noamsto/nix-amd-ai)
  - seems to be based on the first repo
  - also builds lemonade with die fastflowlm, ROCm and Vulkan backend
  - sadly the included xrt version seems to be incompatible with my hardware (AMD Ryzen AI 9 HX 370) or maybe its just not correctly presented to the userspace - might investigate this further

---

<div class="post-metadata">

**Author:** ![Josh\_Hubert](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@Josh\_Hubert](https://community.frame.work/u/Josh_Hubert)\
**Post date:** [April 27, 2026, 12:25pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/12 "2026-04-27T12:25:19Z")

</div>

If anyone on arch (I’m on cachyos) is using flm with lemonade, lemonade integration is broken for the current pacman version of flm. You have to build the previous version v0.9.38 from source.

Steps:

```auto
# reiteration of fastflowlm deps (LLM on NPU support)
#sudo pacman -S xrt xrt-plugin-amdxdna
# update memlock settings and log out to let it take effect
#echo -e "* soft memlock unlimited\n* hard memlock unlimited\n" | sudo tee -a /etc/security/limits.conf

# remove broken:
sudo pacman -R fastflowlm
# build flm v0.9.38 from src instead
sudo pacman -S cmake ninja boost
cd ~
git clone --recursive https://github.com/FastFlowLM/FastFlowLM.git
git checkout v0.9.38
cd FastFlowLM/src
cmake --preset linux-default
cmake --build build
sudo cmake --install build
flm -v
 

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/1X/64c81a89f963ddb07633887baceb642a4b056046.png) [@system](https://community.frame.work/u/system)\
**Post date:** [October 24, 2026, 12:25pm UTC](https://community.frame.work/t/guide-use-npu-xdna2-with-arch-linux-and-fastflowlm/80879/13 "2026-10-24T12:25:34Z")

</div>

Closed on October 24, 2026, 12:25pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
