In my previous post I built a garden CCTV system using Frigate NVR on the Pi 5. It worked well — but the AI object detection was running on the CPU, consuming about 35% of a core just sitting there waiting for motion. I installed a Hailo-8L AI HAT to move that workload to a dedicated NPU, and the results were exactly what I hoped for.

This post documents the migration: what the Hailo AI HAT is, how to install the driver (with the version pitfalls that will catch you), and how to wire it into Frigate.

What Is the Hailo-8L?

The Hailo-8L is a 13 TOPS neural processing unit in an M.2 form factor. Raspberry Pi sell it as an “AI HAT+” — a board that snaps onto the Pi 5’s 40-pin header and connects via PCIe. It accelerates inference workloads (object detection, classification, segmentation) without touching your CPU cores.

For a Frigate NVR setup, this means the frigate.detector process migrates off CPU entirely onto the NPU, freeing your Pi 5 to handle camera streams, recording, and everything else.

Cost: around £55 for the HAT. Worth it if you’re running Frigate 24/7.

Hardware Setup

Cooling — order this at the same time as the HAT

Before you fit the HAT, sort out cooling. The HAT sits directly on top of the Pi 5 and takes up the full height above the board — the standard small heatsink that comes with (or clips onto) the Pi CPU no longer fits underneath it.

I found this out the hard way: ordered the HAT, got it delivered, then had to order active cooling separately and wait another few days. Save yourself the delay — order both together.

I went with an active cooling kit (fan + large aluminium heatsink). A couple of things to know before you fit it:

  • Remove the stock CPU heatsink first. The large aluminium block from the active cooling kit won’t sit flat if the small stock heatsink is still on the CPU. Peel it off.
  • The kit comes with thermal paste. More than enough — apply a small amount to the CPU die, seat the heatsink, done. Don’t use your own unless you want to.

With active cooling sorted, fitting the HAT itself takes about 2 minutes — it clips onto the Pi’s GPIO header and connects via the PCIe ribbon cable. Power comes from the header. No soldering, no USB, no separate supply.

After fitting it, the Pi’s PCIe bus immediately detects the device:

$ lspci
0001:01:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)

But there’s no kernel driver loaded yet, so no /dev/hailo0. That comes next.

The Version Problem

Before you do anything, check your chip’s firmware version. This is the most important step and the one that will bite you if you skip it.

There are three version numbers that all need to match:

  1. Chip firmware — baked onto the Hailo chip itself
  2. Host PCIe driver — the kernel module you install on the Pi
  3. HailoRT library — bundled inside the Frigate Docker image

All three must be the same version. A mismatch at any layer gives you HAILO_INVALID_DRIVER_VERSION and Frigate won’t start.

When I set this up:

  • My chip’s firmware was 4.21.0
  • The official ghcr.io/blakeblackshear/frigate:stable-h8l image has 4.19.0 (it’s stale — still on Frigate 0.15.2 as of May 2026)
  • The Frigate stable image (0.17.1, March 2026) has 4.21.0

So the correct combination is: hailort 4.21.0 host driver + frigate:stable image. Ignore the stable-h8l tag — it hasn’t been updated in nearly a year.

Installing the Host Driver

The PCIe driver isn’t available as a pre-built package that matches the right version, so you build it from source. It takes about 5 minutes.

# Install build dependencies
sudo apt-get update
sudo apt-get install -y build-essential cmake git wget \
    linux-headers-$(uname -r) dkms

# Clone the driver at the version matching your chip firmware
git clone --depth 1 --branch v4.21.0 \
    https://github.com/hailo-ai/hailort-drivers.git
cd hailort-drivers/linux/pcie

# Build and install
sudo make all
sudo make install

Then install the firmware and udev rules:

cd /path/to/hailort-drivers

# Download firmware
./download_firmware.sh
sudo mkdir -p /lib/firmware/hailo
sudo mv hailo8_fw.*.bin /lib/firmware/hailo/hailo8_fw.bin

# Udev rules (creates /dev/hailo0 with correct permissions)
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger

Apply the Pi 5-specific PCIe descriptor fix (without this, the module may fail to load):

echo 'options hailo_pci force_desc_page_size=4096' | \
    sudo tee /etc/modprobe.d/hailo_pci.conf

Load the module and verify:

sudo modprobe hailo_pci
ls /dev/hailo0   # should exist

Make it load on every boot:

echo 'hailo_pci' | sudo tee /etc/modules-load.d/hailo.conf

For a small performance boost, enable PCIe Gen 3 (add to /boot/firmware/config.txt):

# Hailo AI HAT - PCIe Gen 3
dtoverlay=pciex1-compat-pi5,no-mip

Then reboot to activate it.

Updating Frigate

Two changes: the Docker Compose file and config.yml.

docker-compose.yml — add the device mapping to the Frigate service:

frigate:
  image: ghcr.io/blakeblackshear/frigate:stable
  # ... existing config ...
  devices:
    - /dev/hailo0:/dev/hailo0

config/config.yml — replace the CPU detector with the Hailo one:

# Before:
detectors:
  cpu:
    type: cpu
    num_threads: 4

# After:
detectors:
  hailo:
    type: hailo8l
    device: PCIe

That’s it — no model path needed. Frigate auto-detects the hardware and downloads an appropriate YOLOv6n .hef model on first start.

Also: if you’re coming from an older Frigate config, the record.continuous and record.motion sub-keys under cameras were removed in 0.17. Remove them or Frigate won’t start.

Results

Before (CPU detector):

frigate.detector:cpu   CPU: 34.8%   RAM: 160MB

After (Hailo NPU):

frigate.detector:hailo   CPU: 0.3%   RAM: 220MB
Hailo inference: ~12ms

The detector process went from ~35% CPU usage to essentially zero. The Pi is now running comfortably with headroom to spare, detection is faster (12ms inference vs ~25ms on CPU), and the camera stream is still smooth at 5fps detect.

Summary

StepNotes
Check chip firmware versionhailortcli fw-control identify (run inside container with device passthrough)
Build host driver from sourceMust match chip firmware version exactly
Use frigate:stable not stable-h8lstable-h8l tag is stale (0.15.2 / hailort 4.19.0 as of May 2026)
Add devices: [/dev/hailo0:/dev/hailo0] to composePassthrough the PCIe device
Set type: hailo8l, device: PCIe in configNo model path needed — auto-download

The Hailo AI HAT is a clean upgrade. If you’re running Frigate on a Pi 5 and the CPU detector is eating into your headroom, this is a straightforward swap that frees up a significant chunk of CPU for no ongoing cost.