Hailort driver Installation issues / Raspberry Pi 5 Ubuntu Desktop 24.04.01 LTS

Hi, I need your help regarding my Hailo 8 M.2 (M-key version).

In short: I am trying to get the hailort-driver working on my Raspberry Pi 5 running Ubuntu Desktop 24.04.01 LTS with kernel: 6.8.0-1018-raspi
, but it won’t work.

I’ve tried to install the following hailort-driver versions:

  • v4.17.0
  • v4.19.0
  • v4.20.0

I’ve installed them like this:

sudo apt install linux-headers-$(uname -r)
sudo apt install build-essential

git clone https://github.com/hailo-ai/hailort-drivers.git --branch v4.17.0

cd hailort-drivers/linux/pcie
make all
sudo make install
cd ../..
./download_firmware.sh
sudo mkdir -p /lib/firmware/hailo
sudo mv hailo8_fw.4.17.0.bin /lib/firmware/hailo/hailo8_fw.bin
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo modprobe hailo_pci
sudo reboot

I also tried to build using this flag without success:

...
cd hailort-drivers/linux/pcie
make all CFLAGS="-DHAILO_RASBERRY_PIE"
sudo make install
...

Description of the issue:

The result is the same: the expected device (a node like /dev/hailo or a folder /dev/hailo*) is not created.

Even though a udev rule (51-hailo-udev.rules) is installed to adjust the permissions for devices under the hailo_chardev subsystem, the driver itself does not create the device node.

When loading the kernel module with sudo modprobe hailo_pci, I get the following messages:

sudo dmesg | grep -i hailo
[  107.632053] hailo_pci: loading out-of-tree module taints kernel.
[  107.632871] hailo: Init module. driver version 4.17.0

It seems that the device is not properly initialized; a lot of the expected initialization information is missing.

Additionally, lsmod shows that the kernel module is loaded but not used (usage count is 0):

lsmod | grep hailo
hailo_pci             110592  0

Expected behaviour would be:

ls /dev/hailo*
/dev/hailo0

sudo dmesg | grep hailo
[    4.980184] hailo_pci: loading out-of-tree module taints kernel.
[    4.980195] hailo_pci: module verification failed: signature and/or required key missing - tainting kernel
[    4.981731] hailo: Init module. driver version 4.17.0
[    4.981844] hailo 0000:01:00.0: Probing on: 1e60:2864...
[    4.981849] hailo 0000:01:00.0: Probing: Allocate memory for device extension, 11600
[    4.981859] hailo 0000:01:00.0: enabling device (0000 -> 0002)
[    4.981865] hailo 0000:01:00.0: Probing: Device enabled
[    4.981880] hailo 0000:01:00.0: Probing: mapped bar 0 - 00000000b70945f0 16384
[    4.981884] hailo 0000:01:00.0: Probing: mapped bar 2 - 00000000d21184c7 4096
[    4.981888] hailo 0000:01:00.0: Probing: mapped bar 4 - 00000000fde02b51 16384
[    4.981893] hailo 0000:01:00.0: Probing: Setting max_desc_page_size to 4096, (page_size=4096)
[    4.981901] hailo 0000:01:00.0: Probing: Enabled 64 bit dma
[    4.981906] hailo 0000:01:00.0: Probing: Using userspace allocated vdma buffers
[    4.981910] hailo 0000:01:00.0: Disabling ASPM L0s 
[    4.981914] hailo 0000:01:00.0: Successfully disabled ASPM L0s 
[    5.030118] UBSAN: array-index-out-of-bounds in /home/jpmeijers/hailort-drivers/linux/pcie/../../common/pcie_common.c:351:53
[    5.030152]  hailo_pcie_write_firmware+0x260/0x280 [hailo_pci]
[    5.030169]  hailo_pcie_probe+0x970/0xd98 [hailo_pci]
[    5.030204]  hailo_pcie_module_init+0x98/0xff8 [hailo_pci]
[    5.161028] hailo 0000:01:00.0: Firmware was loaded successfully
[    5.172591] hailo 0000:01:00.0: Probing: Added board 1e60-2864, /dev/hailo0

I found an information mentioned by omria in in the Hailo forum regarding Linux kernel dependencies for hailort-driver versions ≤ v4.18.0 on Linux Kernel 6.5:

The latest update for Raspberry Pi OS (based on kernel 6.6) states:

stable_20250127: drivers: media: pci: Update Hailo accelerator device driver to v4.20

Now, with Ubuntu Desktop 24.04.01 I can’t downgrade below linux kernel 6.8.0…

According to the changelogs for hailort-driver v4.20.0, there is kernel support for Linux kernel 6.12.0:

HailoRT PCIe Driver for Linux

  • Add support for linux kernel 6.12

This answer from pierrem shows there seems to be work in progress regarding ubuntu 24:

Our team is currently working to support Ubuntu 24. Not only HailoRT, but also the other components of the SW Suite will be available for Ubuntu 24 users in the near future (exact release version to be confirmed).

I wonder why it worked for others on Ubuntu 24.04 and not for me:

As you can see, the situation is a bit diffuse. Therefore, I have a few questions:

Questions:
1.) Does your changelog from hailort-driver v4.20.0 explicitly mean kernel 6.12. or up to kernel 6.12.?

2.) What should I do now?
→ 2.1) Forget Ubuntu 24 and switch to Raspberry Pi OS?
→ 2.2) Wait for your driver support?

3.) Can you please give more information about the actual status regarding Raspberry Pi 5 and Ubuntu 24?

1 Like

Welcome to the Hailo Community!

Likely yes. I use Raspberry Pi OS and I believe most of my colleagues too. The Raspberry Team is integrating and testing HailoRT into their OS. That makes the whole installation and update process very easy.

Ubuntu 24 support will likely come with the next software release which is still a bit away.

We will be validating Ubuntu 24 on x86 not necessarily on Raspberry Pi. Most Raspberry Pi users use the official OS.

1 Like

Thank you for the clear explanation. However, I hope the Hailo team reconsiders this, as I don’t believe the user base for this use case (trying to get the Hailo8 working with an LTS version of Ubuntu on a Raspberry Pi 5) is small.

I’ve made an image backup of my current setup, hoping I can continue developing on Ubuntu. But I will follow your advice and switch to the Raspberry Pi OS route.

Have a good day.

You can still give it a try when we release Ubuntu 24 support — it will likely work. Like most R&D teams, we have a limit on the combinations of hardware and OS we can run validation on.

1 Like

The first thing, dmesg should show many more lines related to the Hailo device. For me (Ubuntu 24.04. - completely patched + some rebuild RaspberryOS packages):

root@ubuntu-2404-pi:~# dmesg | fgrep hailo
[    5.075415] hailo_pci: loading out-of-tree module taints kernel.
[    5.075430] hailo_pci: module verification failed: signature and/or required key missing - tainting kernel
[    5.076979] hailo: Init module. driver version 4.19.0
[    5.077115] hailo 0000:01:00.0: Probing on: 1e60:2864...
[    5.077122] hailo 0000:01:00.0: Probing: Allocate memory for device extension, 11632
[    5.077133] hailo 0000:01:00.0: enabling device (0000 -> 0002)
[    5.077138] hailo 0000:01:00.0: Probing: Device enabled
[    5.077169] hailo 0000:01:00.0: Probing: mapped bar 0 - 00000000f68c5a81 16384
[    5.077178] hailo 0000:01:00.0: Probing: mapped bar 2 - 00000000a8499935 4096
[    5.077184] hailo 0000:01:00.0: Probing: mapped bar 4 - 00000000c6230a10 16384
[    5.077188] hailo 0000:01:00.0: Probing: Force setting max_desc_page_size to 4096 (recommended value is 4096)
[    5.077203] hailo 0000:01:00.0: Probing: Enabled 64 bit dma
[    5.077209] hailo 0000:01:00.0: Probing: Using userspace allocated vdma buffers
[    5.077216] hailo 0000:01:00.0: Disabling ASPM L0s 
[    5.077219] hailo 0000:01:00.0: Successfully disabled ASPM L0s 
[    5.081610] hailo 0000:01:00.0: Writing file hailo/hailo8_fw.4.19.0.bin
[    5.167761] hailo 0000:01:00.0: File hailo/hailo8_fw.4.19.0.bin written successfully
[    5.167772] hailo 0000:01:00.0: Writing file hailo/hailo8_board_cfg.bin
[    5.167834] Failed to write file hailo/hailo8_board_cfg.bin
[    5.167836] hailo 0000:01:00.0: File hailo/hailo8_board_cfg.bin written successfully
[    5.167839] hailo 0000:01:00.0: Writing file hailo/hailo8_fw_cfg.bin
[    5.167876] Failed to write file hailo/hailo8_fw_cfg.bin
[    5.167878] hailo 0000:01:00.0: File hailo/hailo8_fw_cfg.bin written successfully
[    5.304877] hailo 0000:01:00.0: Firmware loaded successfully
[    5.316914] hailo 0000:01:00.0: Probing: Added board 1e60-2864, /dev/hailo0
root@ubuntu-2404-pi:~# uname -a
Linux ubuntu-2404-pi 6.8.0-1018-raspi #20-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 12:35:36 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
root@ubuntu-2404-pi:~# dpkg -l | fgrep -i hailo | fgrep ii
ii  hailo-all                                        4.19.0                                   all          Hailo support (metapackage)
ii  hailo-dkms                                       4.19.0-1                                 all          Hailo PCIe driver
ii  hailo-tappas-core                                3.30.0-1                                 arm64        This package contains the core components of the Hailo Tappas platform.
ii  hailofw                                          4.19.0-2                                 all          Hailo firmware
ii  hailort                                          4.19.0-3                                 arm64        HailoRT
ii  python3-hailort                                  4.19.0-2                                 arm64        HailoRT Python API, which wraps the runtime library
ii  rpicam-apps-hailo-postprocess                    1.5.3-1                                  arm64        rpicam-apps-hailo

That setup works ok for the examples with streams and a PiCam v3w;-)

1 Like

Running the basic_pipelines/pose_estimation.py

:wink:

3 Likes

Upgrade to 4.20.0 works as well;-) The only thing is, TAPPAS needs Python3.11, put the is a PPA out there for Ubuntu 24.04;-)

ubuntu@ubuntu-2404-pi:~$ dpkg -l | fgrep -i hailo
ii  hailo-all                                        4.20.0                                   all          Hailo support (metapackage)
ii  hailo-dkms                                       4.20.0-1                                 all          Hailo PCIe driver
ii  hailo-tappas-core                                3.31.0+1-1                               arm64        This package contains the core components of the Hailo Tappas platform.
rc  hailo-tappas-core-3.28.2                         3.28.2                                   arm64        This package contains the core components of the Hailo Tappas platform.
ii  hailofw                                          4.20.0-1                                 all          Hailo firmware
ii  hailort                                          4.20.0-1                                 arm64        HailoRT
ii  python3-hailort                                  4.20.0-1                                 arm64        HailoRT Python API, which wraps the runtime library
ii  rpicam-apps-hailo-postprocess                    1.6.0-2                                  arm64        rpicam-apps-hailo

1 Like

Can you write how you did the installation steps or which documents you followed?

are you talking to me? i’ve switched to development on the raspberry pi os as recommended on another pi5 and it worked fine.

hmm, no I need the installation for ubuntu 24.04. @marco said that the installation works for Ubuntu 24.04. @marco, can you write which pages you followed as a document?

This is the way:

OK, once launchpad is done with the last publish, I hope, my PPA is ready for first tests:

has packages for Ubuntu 24.04 with the newer libcamera from the RaspiOS as well as the Hailo packages natively built for Ubuntu/Python 3.12 … :wink:

Tests with my setup (Pi5 + Arducam PiCam v3-w-AF + AI-Hat+) worked as expected. But I don’t make any claims. The source packages are also all there. Feel free to fix issues, you find, and send patches. I do this as a hobby and I don’t have a big test farm, so I can probably not reproduce very specific issues.

One comment: Make sure, the user, which is using libcamera/rpicam-* and friends has to be a member of the video group! That’s one group, not added by default!

I hope, this helps somebody :wink: Have fun exploring
– Marco

3 Likes

Hello marco, I’m trying to implement my hailo module running on raspberry pi5 ubuntu 24.04 with your ppa, ive successfully downloaded all requirements and all are visible, however when i try to run some yolo with examples, i get errors, what am i doing wrong? Is it because im not using raspberry pi cam? i’m using intel d435i depthcamera as input source.

I can see all required software and drivers are installed and visible but still getting error, i tried two envs, one with python 3.12 and one with 3.11, both gives same error. without venv i get error with gi not installed even though its installed.

Is there any way I can fix this somehow? We cant change our ubuntu version , or change default python version like the other article ‘hackers guide says’ as it breaks everything.

We need this to work in order to link it to ROS2 and initiate communication with other logic nodes. But i tried everything, searched all possible forums and documentation and still getting errors, how would I solve this?

Any insights would be helpful as I am very new to all this and i’m 1 weeks into this and we dont have enough time left, only 4 weeks until competition and this is delaying everything, since without it computation is too slow, more than 600ms processing time with just pi using yolov8. thank you.

pw@pwRPi:~/hailo-rpi5-examples$ lsmod | grep hailo
hailo_pci             118784  0
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ dpkg -l | fgrep -i hailo | fgrep ii
ii  hailo-dkms                                       4.20.1-1ubuntu1~marco3                    all          Hailo PCIe driver
ii  hailo-tappas-core                                3.31.0+2-1ubuntu1~marco5                  arm64        This package contains the core components of the Hailo Tappas platform.
ii  hailofw                                          4.20.1-1ubuntu1~marco1                    all          Hailo firmware
ii  hailort                                          4.20.1.1-1ubuntu1~marco1                  arm64        Hailo RT is a lightweight, production-grade runtime library
ii  python3-hailort                                  4.20.1-1ubuntu1~marco1                    arm64        HailoRT Python API, which wraps the runtime library
ii  rpicam-apps-hailo-postprocess                    1.7.0-1ubuntu1~marco1                     arm64        rpicam-apps-hailo
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ uname -a
Linux pwRPi 6.8.0-1031-raspi #35-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul  3 15:00:20 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ hailortcli fw-control identify
Executing on device: 0000:03:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.1 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8
Serial Number: <N/A>
Part Number: <N/A>
Product Name: <N/A>
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ ls /dev/hailo*
/dev/hailo0
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ sudo dmesg | grep hailo
[sudo] password for pw:
[60186.061254] hailo_pci: loading out-of-tree module taints kernel.
[60186.062847] hailo: Init module. driver version 4.20.1
[60186.063002] hailo 0000:03:00.0: Probing on: 1e60:2864...
[60186.063012] hailo 0000:03:00.0: Probing: Allocate memory for device extension, 13184
[60186.063031] hailo 0000:03:00.0: enabling device (0000 -> 0002)
[60186.063047] hailo 0000:03:00.0: Probing: Device enabled
[60186.063073] hailo 0000:03:00.0: Probing: mapped bar 0 - 00000000677b8582 16384
[60186.063080] hailo 0000:03:00.0: Probing: mapped bar 2 - 000000006bc8e98b 4096
[60186.063085] hailo 0000:03:00.0: Probing: mapped bar 4 - 00000000111ea7ad 16384
[60186.063119] hailo 0000:03:00.0: Probing: Force setting max_desc_page_size to 4096 (recommended value is 4096)
[60186.063133] hailo 0000:03:00.0: Probing: Enabled 64 bit dma
[60186.063139] hailo 0000:03:00.0: Probing: Using userspace allocated vdma buffers
[60186.063150] hailo 0000:03:00.0: Disabling ASPM L0s
[60186.063158] hailo 0000:03:00.0: Successfully disabled ASPM L0s
[60186.063294] hailo 0000:03:00.0: Writing file hailo/hailo8_fw.4.20.1.bin
[60186.128421] hailo 0000:03:00.0: File hailo/hailo8_fw.4.20.1.bin written successfully
[60186.128429] hailo 0000:03:00.0: Writing file hailo/hailo8_board_cfg.bin
[60186.128502] Failed to write file hailo/hailo8_board_cfg.bin
[60186.128504] hailo 0000:03:00.0: File hailo/hailo8_board_cfg.bin written successfully
[60186.128506] hailo 0000:03:00.0: Writing file hailo/hailo8_fw_cfg.bin
[60186.128546] Failed to write file hailo/hailo8_fw_cfg.bin
[60186.128548] hailo 0000:03:00.0: File hailo/hailo8_fw_cfg.bin written successfully
[60186.165935] hailo 0000:03:00.0: NNC Firmware loaded successfully
[60186.165940] hailo 0000:03:00.0: FW loaded, took 102 ms
[60186.178162] hailo 0000:03:00.0: Probing: Added board 1e60-2864, /dev/hailo0
[61267.355881] ptrace attach of "gst-launch-1.0 v4l2src device=/dev/video4 ! videoconvert ! videoscale ! video/x-raw,format=RGB,width=640,height=640 ! hailonet hef-path=/home/pw/yolov8m.hef ! hailofilter ! fakesink"[118029] was attempted by "gdb gst-launch-1.0 118029"[118047]
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python basic_pipelines/detection_simple.py
Traceback (most recent call last):
  File "/home/pw/hailo-rpi5-examples/basic_pipelines/detection_simple.py", line 6, in <module>
    import hailo
ModuleNotFoundError: No module named 'hailo'
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python --version
Python 3.11.13
(venv_hailo_rpi_examples) pw@pwRPi:~/hailo-rpi5-examples$ python basic_pipelines/detection_simple.py
Traceback (most recent call last):
  File "/home/pw/hailo-rpi5-examples/basic_pipelines/detection_simple.py", line 6, in <module>
    import hailo
ModuleNotFoundError: No module named 'hailo'

My packages need the standard Ubuntu Python 3.12!

(venv_hailo_rpi5_examples) ubuntu@ubuntu-2404-pi5b:~/hailo-rpi5-examples$ dpkg -L hailo-tappas-core | fgrep 'hailo.'
/usr/lib/python3/dist-packages/hailo.cpython-312-aarch64-linux-gnu.so
(venv_hailo_rpi5_examples) ubuntu@ubuntu-2404-pi5b:~/hailo-rpi5-examples$ python --versionPython 3.12.3
(venv_hailo_rpi5_examples) ubuntu@ubuntu-2404-pi5b:~/hailo-rpi5-examples$ python basic_pipelines/detection_simple.py TAPPAS_POST_PROC_DIR environment variable is not set. Please set it to by sourcing setup_env.sh

Sorry, the Copy&Paste lost a newline:-( And it looks like I can’t edit my previous reply.