Skip to main content

Hi,I'm having trouble installing the metis-dkms driver. Can you help me?

The device is a NanoPC-T6 from Friendly Elec, and the operating system is Ubuntu 22.04, also provided by Friendly Elec.

I'm leaving the error message and OS information below. If there is any more information I should provide, please let me know. Thank you.

 

The Error:

$ sudo dpkg -i metis-dkms_0.07.16_all.deb
(Reading database ... 155441 files and directories currently installed.)
Preparing to unpack metis-dkms_0.07.16_all.deb ...
Deleting module metis-0.07.16 completely from the DKMS tree.
Unpacking metis-dkms (0.07.16) over (0.07.16) ...
Setting up metis-dkms (0.07.16) ...
Loading new metis-0.07.16 DKMS files...
Building for 6.1.99
Building for architecture aarch64
Building initial module for 6.1.99
ERROR (dkms apport): kernel package linux-headers-6.1.99 is not supported
Error! Bad return status for module build on kernel: 6.1.99 (aarch64)
Consult /var/lib/dkms/metis/0.07.16/build/make.log for more information.
dpkg: error processing package metis-dkms (--install):
installed metis-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
metis-dkms

$ sudo modprobe metis
modprobe: FATAL: Module metis not found in directory /lib/modules/6.1.99

$ cat /var/lib/dkms/metis/0.07.16/build/make.log
DKMS make.log for metis-0.07.16 for kernel 6.1.99 (aarch64)
Wed May 21 04:06:19 UTC 2025
make: Entering directory '/usr/src/linux-headers-6.1.99'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gcc (ctng-1.25.0-119g-FA) 11.3.0
You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC M] /var/lib/dkms/metis/0.07.16/build/driver/dmabuf-triton-exporter.o
CC M] /var/lib/dkms/metis/0.07.16/build/driver/dmabuf-triton-importer.o
CC M] /var/lib/dkms/metis/0.07.16/build/driver/axl-pcie-reset.o
CC M] /var/lib/dkms/metis/0.07.16/build/driver/metis-core.o
/var/lib/dkms/metis/0.07.16/build/driver/dmabuf-triton-exporter.c: In function ‘dmabuf_mmap’:
/var/lib/dkms/metis/0.07.16/build/driver/dmabuf-triton-exporter.c:236:23: error: assignment of read-only member ‘vm_flags’
236 | vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
| ^~
makeb1]: *** [scripts/Makefile.build:250: /var/lib/dkms/metis/0.07.16/build/driver/dmabuf-triton-exporter.o] Error 1
makeb1]: *** Waiting for unfinished jobs....
make: *** aMakefile:2053: /var/lib/dkms/metis/0.07.16/build/driver] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.99'

 

OS:

$ uname -a
Linux NanoPC-T6-LTS 6.1.99 #32 SMP Mon Jan 20 15:50:32 CST 2025 aarch64 aarch64 aarch64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

 

lspci:
 

$ lspci -v
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) (prog-if 00 (Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 152
Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
I/O behind bridge: idisabled]
Memory behind bridge: idisabled]
Prefetchable memory behind bridge: idisabled]
Expansion ROM at f0200000 avirtual] 0disabled] size=64K]
Capabilities: <access denied>
Kernel driver in use: pcieport

0000:01:00.0 Processing accelerators: Axelera AI Metis AIPU (rev 02)
Subsystem: Axelera AI Metis AIPU (rev 02)
Flags: fast devsel, IRQ 255
Memory at <ignored> (64-bit, non-prefetchable) edisabled]
Memory at <ignored> (32-bit, non-prefetchable) edisabled]
Capabilities: <access denied>

0002:20:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) (prog-if 00 (Normal decode])
Device tree node: /sys/firmware/devicetree/base/pcie@fe170000/pcie@0,0
Flags: bus master, fast devsel, latency 0, IRQ 143
Bus: primary=20, secondary=21, subordinate=21, sec-latency=0
I/O behind bridge: 00000000-00000fff 0size=4K]
Memory behind bridge: f2200000-f22fffff 0size=1M]
Prefetchable memory behind bridge: idisabled]
Expansion ROM at f2300000 avirtual] 0disabled] size=64K]
Capabilities: <access denied>
Kernel driver in use: pcieport

0002:21:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Device tree node: /sys/firmware/devicetree/base/pcie@fe170000/pcie@0,0/pcie@20,0
Flags: bus master, fast devsel, latency 0, IRQ 142
I/O ports at 200000 ssize=256]
Memory at f2200000 (64-bit, non-prefetchable) esize=64K]
Memory at f2210000 (64-bit, non-prefetchable) esize=16K]
Capabilities: <access denied>
Kernel driver in use: r8125
Kernel modules: r8169, r8125

0004:40:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) (prog-if 00 (Normal decode])
Device tree node: /sys/firmware/devicetree/base/pcie@fe190000/pcie@0,0
Flags: bus master, fast devsel, latency 0, IRQ 131
Bus: primary=40, secondary=41, subordinate=41, sec-latency=0
I/O behind bridge: 00000000-00000fff 0size=4K]
Memory behind bridge: f4200000-f42fffff 0size=1M]
Prefetchable memory behind bridge: idisabled]
Expansion ROM at f4300000 avirtual] 0disabled] size=64K]
Capabilities: <access denied>
Kernel driver in use: pcieport

0004:41:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Device tree node: /sys/firmware/devicetree/base/pcie@fe190000/pcie@0,0/pcie@40,0
Flags: bus master, fast devsel, latency 0, IRQ 130
I/O ports at 100000 ssize=256]
Memory at f4200000 (64-bit, non-prefetchable) esize=64K]
Memory at f4210000 (64-bit, non-prefetchable) esize=16K]
Capabilities: <access denied>
Kernel driver in use: r8125
Kernel modules: r8169, r8125

 

Hi ​@ku15921, and thanks again for the detailed info—it’s really helpful! Great to have you here.

We haven’t worked with the NanoPC-T6 or Friendly Elec’s Ubuntu distro before, so this setup is new to us. That said, we’d love to work with you to understand it better and see what we can do to support it going forward.

From the error message in your log:

assignment of read-only member ‘vm_flags’

It’s possible that the issue is with the Linux 6.1.99 kernel in Friendly Elec. There may be some structural changes in newer kernel versions, while the current Metis DKMS driver was built and tested primarily on Ubuntu 22.04 with kernel 5.15.x.

Next step suggestion: If you’re able to install or boot into a 5.15-based kernel on that board, that’d be a good test to see if this is what’s causing the difficulties. If not, we can at least eliminate that and investigate other options together. 👍


Hi ​@Spanner ! Thanks for reply.

Before trying to run it on the NanoPi-T6 board, I decided to practise on a standard desktop computer first.

The driver installation issue mentioned above was successful, but I encountered a problem during the SDK installation. I couldn't use the AI acceleration feature.

Towards the end of the installation, an error occurred during the 'device refresh', so I ran the 'axdevice --refresh' command and received the following error message:

$ axdevice --refresh -v
INFO:axelera.runtime.axdevice:Removing 0000:02:01.0
INFO:axelera.runtime.axdevice:PCIE rescan
0000:03:00.0 : Axelera AI Metis AIPU (rev 02)
INFO:axelera.runtime:Found PCI device: 03:00.0 Processing accelerators: Axelera AI Metis AIPU (rev 02)
INFO:axelera.runtime:Found AIPU driver: metis 90112 0
WARNING:axelera.runtime:4PCI device count mismatch: lspci=1, triton=0
Traceback (most recent call last):
File "/home/bom/.cache/axelera/venvs/93f45ae3/bin/axdevice", line 8, in <module>
sys.exit(entrypoint_main())
File "/home/bom/.cache/axelera/venvs/93f45ae3/lib/python3.10/site-packages/axelera/runtime/axdevice.py", line 625, in entrypoint_main
main(args)
File "/home/bom/.cache/axelera/venvs/93f45ae3/lib/python3.10/site-packages/axelera/runtime/axdevice.py", line 608, in main
devices = _find_devices(found_devices, device_id)
File "/home/bom/.cache/axelera/venvs/93f45ae3/lib/python3.10/site-packages/axelera/runtime/axdevice.py", line 187, in _find_devices
raise RuntimeError("No devices found, use -v for more information")
RuntimeError: No devices found, use -v for more information

Despite trying all the solutions suggested in other post, I couldn't resolve the issue.

I'll provide my hardware and OS information. Let me know if you need anything else. Thanks!
 

$ uname -a
Linux bom 6.8.0-59-generic #61~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:03:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.8.0-59-generic root=UUID=f921be28-cd21-45a0-90c4-b962eb05bed4 ro amd_iommu=off pcie_aspm=off quiet splash vt.handoff=7
CPU: AMD Ryzen 7 5800X 8-Core Processor
GPU: NVIDIA GeForce RTX 3080

 


Just a quick heads up on this one ​@ku15921 - we’re investigating this one, as it’s a bit new to us, but will get back to you ASAP!

How’s it looking at your end? Any progress?


Hello ​@ku15921 ,

For your issue with the NanoPC-T6, please follow the instructions below to build and install the metis.ko kernel module on your system:

  1. Navigate to the driver directory:
    cd /usr/src/metis-0.07.6/driver
  2. Regenerate the Makefile:
    grep metis Makefile | sudo tee Makefile
  3. Compile the kernel module:
    make -C /usr/src/linux-headers-$(uname -r) M=$PWD modules
    This should generate the metis.ko file in the current directory.
  4. Load the module to test:
    sudo insmod ./metis.ko
  5. Create the target directory and copy the module:
    sudo mkdir -p /lib/modules/$(uname -r)/updates/dkms
    sudo cp metis.ko /lib/modules/$(uname -r)/updates/dkms/.
  6. Update module dependencies:
    sudo depmod -a

Let us know how it goes.

Best,

Victor


Reply