RADXA Zero 3 error: failed to open rknpu module, need to insmod rknpu dirver!

If you get a type error when running tests
failed to open rknpu module, need to insmod rknpudriver! and failed to open run device!

  1. Check if there is an NPU in DMESG
    sudo dmesg | grep rknpu
    You should get something like:
    [ 11.732651] OF: reserved mem: initialized node rknpu, compatible id shared-dma-pool [ 14.747633] RKNPU fde40000.npu: RKNPU: rknpu iommu is enabled, using iommu mode [ 14.747732] RKNPU fde40000.npu: Looking up rknpu-supply from device tree [ 14.749181] [drm] Initialized rknpu 0.8.8 20230428 for fde40000.npu on minor 1 [ 14.749492] RKNPU fde40000.npu: Looking up rknpu-supply from device tree
    If the NPU is present or nothing if it is not.
  2. To activate NPU, do the following:
    2.1. sudo apt update
    2.2. sudo apt full-upgrade
    2.3. sudo reboot
    2.4. Then run rsetup
    2.5. Select Overlays -> Yes -> Manage overlays -> Enable NPU -> Ok - Exit the program
    2.6. sudo reboot
    2.7. After the reboot, check if the NPU - sudo dmesg | grep rknpu has appeared

If the NPU has appeared, good luck - everything should work.
Don’t forget to install the libraries themselves:

apt update
wget https://github.com/radxa-pkg/rknn2/releases/download/2.2.0-1/python3-rknnlite2-example_2.2.0-1_all.deb
wget https://github.com/radxa-pkg/rknn2/releases/download/2.2.0-1/python3-rknnlite2_2.2.0-1_arm64.deb
wget https://github.com/radxa-pkg/rknn2/releases/download/2.2.0-1/rknpu2-rk356x_2.2.0-1_arm64.deb
wget https://github.com/radxa-pkg/rknn2/releases/download/2.2.0-1/rknpu2-rk3588_2.2.0-1_arm64.deb
For rk356x -> apt install ./rknpu2-rk356x_2.2.0-1_amd64.deb ./python3-rknnlite2_2.2.0-1_amd64.deb ./python3-rknnlite2-example_2.2.0-1_all.deb

For rk3588 -> apt install ./rknpu2-rk3588_2.2.0-1_amd64.deb ./python3-rknnlite2_2.2.0-1_amd64.deb ./python3-rknnlite2-example_2.2.0-1_all.deb

The examples are now in /usr/share/python3-rknnlite2
If the examples don’t run
According to the documentation https://docs.radxa.com/en/zero/zero3/app-development/rknn_install

  1. Make a git clone https://github.com/airockchip/rknn-toolkit2.git
  2. python -V
  3. Install pip install rknn-toolkit2/packages/rknn_toolkit2-…- cp3x-cp3x-linux_x86_64.whl for your python version
    Then everything should work

Be happy!

1 Like