No NPU device found on ubuntu
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 152
- Avg merge
- 4h 14m
- Merged PRs (30d)
- 11
Description
I found this happening on my machine and doing the below fixed it; flm validate reports "No NPU device found" when the real issue is insufficient permissions.
Summary
flm validate prints [ERROR] No NPU device found when the NPU device (/dev/accel/accel0) does exist but the current user lacks permission to open it. This is misleading — the device is present and the amdxdna driver is loaded; the user simply isn't in the render group (or hasn't re-logged after joining it).
Environment
- OS: Ubuntu, kernel 6.17.0-14-generic (Ubuntu 24.04.4 LTS)
- NPU: AMD Device 17F0 (XDNA2) [Strix Halo]
- Driver:
amdxdna0.6.0 (DKMS, out-of-tree) - FLM version: installed via
.deb- fastflowlm_0.9.35_ubuntu24.04_amd64.deb
Steps to Reproduce
- Install
amdxdna-dkmsandflmper the Linux guide - Do not add your user to the
rendergroup (or add them but don't log out/in) - Run
flm validate
Expected Behavior
A clear error indicating the device exists but access is denied, e.g.:
[Linux] Kernel: 6.17.0-14-generic
[ERROR] NPU device found at /dev/accel/accel0 but permission denied.
Add your user to the 'render' group: sudo usermod -aG render $USER
Then log out and log back in.
[Linux] Memlock Limit: 15992 MB
Actual Behavior
[Linux] Kernel: 6.17.0-14-generic
[ERROR] No NPU device found.
[Linux] Memlock Limit: 15992 MB
flm validate --json similarly reports "amd_device_found": false and "devices": [].
Root Cause
/dev/accel/accel0 is owned by root:render with mode crw-rw----. The sanity_check_npu_stack() function in src/src/main.cpp appears to open the device and, when the open fails with EACCES (permission denied), treats it identically to ENOENT (device not found).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/src/main.cpp at sanity_check_npu_stack() and reproduce with /dev/accel/accel0 present but inaccessible to the current user. Distinguish permission denial from a missing device in flm validate, including its --json output, and verify that the resulting message gives the render-group guidance shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, ubuntu
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100