You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google Coral PCIe TPU on HAOS Pi 5 — What Actually Works
NOTE: Please don't ask me any questions about this. I barely understand what is going on. Claude.ai helped with most of the debugging, gemini got me over the finish line with the pci:0001:01:00.0 thing. I had Claude summarize what all happend below. Hopefully this saves someone alot of time.
The Problem
Every guide says use device: pci or device: pci:0 in your Frigate detector config.
On HAOS with a Pi 5, this fails silently with:
No EdgeTPU was detected.
ValueError: Failed to load delegate from libedgetpu.so.1.0
The device node (/dev/apex_0) exists, the drivers load, everything looks fine —
but libedgetpu can't initialize the TPU. Hours of debugging ensue.
The Fix
Use the full PCI bus address instead of the generic device string.
dtparam=pciex1=on — enables the external PCIe connector
dtoverlay=pcie-32bit-dma-pi5 — enables 32-bit DMA for PCIe
pcie_aspm=off — disables PCIe power management that interferes with Coral
We also tried dtoverlay=pciex1-compat-pi5,no-mip to fix the MSI-X interrupt
error (Couldn't initialize interrupts: -28) but it did not resolve it.
The interrupt error persists in dmesg even after the working fix — suggesting
the full PCI address workaround bypasses whatever the interrupt issue was
causing at the generic device enumeration level.
Recommendation: Apply all the config.txt changes anyway. They are documented
best practice for Pi 5 Coral and harmless to have in place.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Google Coral PCIe TPU on HAOS Pi 5 — What Actually Works
NOTE: Please don't ask me any questions about this. I barely understand what is going on. Claude.ai helped with most of the debugging, gemini got me over the finish line with the pci:0001:01:00.0 thing. I had Claude summarize what all happend below. Hopefully this saves someone alot of time.
The Problem
Every guide says use
device: pciordevice: pci:0in your Frigate detector config.On HAOS with a Pi 5, this fails silently with:
The device node (
/dev/apex_0) exists, the drivers load, everything looks fine —but libedgetpu can't initialize the TPU. Hours of debugging ensue.
The Fix
Use the full PCI bus address instead of the generic device string.
The address
0001:01:00.0is specific to this hardware combination (Pi 5 +GeeekPi P33 HAT). Yours may differ — see below for how to find it.
How to Find Your PCI Address
From the HAOS SSH terminal (Advanced SSH addon, port 22):
Look for the entry with vendor
0x1ac1and device0x089a— that's the Coral.The directory name gives you the address. Example output:
Strip the
/sys/bus/pci/devices/prefix and trailing slash — you get0001:01:00.0.Note:
lspciis not available in the HAOS Alpine shell, hence the sysfs approach.Editing config.txt on HAOS
No special setup or port 22222 access needed. From the regular Advanced SSH addon
(port 22), the boot partition can be mounted directly using
-t vfat:The
-t vfatflag is required — omitting it causes a permission denied erroreven as root. Use
/mnt/bootas the mount point;/tmp/bootdoes not work.config.txt Changes
Add these to
/mnt/boot/config.txt:And add this to
/mnt/boot/cmdline.txt(space-separated, on the existing line):What each does:
kernel=kernel8.img— switches to 4K page kernel (Coral requires 4K pages)dtparam=pciex1=on— enables the external PCIe connectordtoverlay=pcie-32bit-dma-pi5— enables 32-bit DMA for PCIepcie_aspm=off— disables PCIe power management that interferes with CoralWe also tried
dtoverlay=pciex1-compat-pi5,no-mipto fix the MSI-X interrupterror (
Couldn't initialize interrupts: -28) but it did not resolve it.The interrupt error persists in dmesg even after the working fix — suggesting
the full PCI address workaround bypasses whatever the interrupt issue was
causing at the generic device enumeration level.
Recommendation: Apply all the config.txt changes anyway. They are documented
best practice for Pi 5 Coral and harmless to have in place.
Environment
ccab4aaf_frigate-fa)Monitoring
Enable these two entities in the Frigate integration (disabled by default):
sensor.frigate_apex_0_temperature— TPU die temperaturesensor.frigate_coral_inference_speed— inference time in msNormal values:
Beta Was this translation helpful? Give feedback.
All reactions