operating-system
operating-system copied to clipboard
rpi5-64 (Raspberry Pi 5 64-bit OS) image and Pineboard Coral Edge TPU
Describe the issue you are experiencing
I am not sure if this is a home-assistant operating-system issue, Frigate or a Google Coral issue, so I also posted this here.
Basically, when installing a Raspberry mPCIe Coral Edge TPU or a Dual Edge Coral TPU with the corresponding Google Coral (Dual) Edge TPU on a Pi5 it is my opinion that this should work in Frigate when changing the detector from cpu to edgetpu in the frigate config file.
I got the famous Permission checking failed error for the apex device in the dmesg, so I tried to add a /etc/udev/rules.d/65-apex.rules file to set mode to 0660 for root:root. That error is now gone.
What operating system image do you use?
rpi5-64 (Raspberry Pi 5 64-bit OS)
What version of Home Assistant Operating System is installed?
Home Assistant OS 12.3
Did you upgrade the Operating System.
Yes
Steps to reproduce the issue
- Have a working Frigate Add installation running a CPU detector.
- Connect a Pineboards Hat AI! Dual Edge Coral TPU Bundle for Raspberry Pi 5
- Boot the Home Assistant Pi
- Check the Frigate addon is working using the CPU type detector.
- Change the config in Frigate.yaml from CPU to edgetpu:
...
Anything in the Supervisor logs that might be useful for us?
Using HassOS SSH port 22222 Configurator and PuTTy:
# ls /dev/apex_0
/dev/apex_0
# dmesg | grep apex
[ 1.898889] apex 0000:03:00.0: enabling device (0000 -> 0002)
[ 1.899761] apex 0000:03:00.0: Couldn't initialize interrupts: -28
[ 7.132396] apex 0000:03:00.0: Apex performance not throttled due to temperature
# lspci
03:00.0 Class 0880: 1ac1:089a
02:07.0 Class 0604: 1b21:1182
00:00.0 Class 0604: 14e4:2712
02:03.0 Class 0604: 1b21:1182
01:00.0 Class 0604: 1b21:1182
00:00.0 Class 0604: 14e4:2712
04:00.0 Class 0108: 1987:5013
01:00.0 Class 0200: 1de4:0001
# modinfo apex
filename: /lib/modules/6.6.28-haos-raspi/updates/apex.ko
author: John Joseph <[email protected]>
license: GPL v2
version: 1.2
description: Google Apex driver
srcversion: 700E8BBBE9CC23C6EC17712
alias: pci:v00001AC1d0000089Asv*sd*bc*sc*i*
depends: gasket
name: apex
vermagic: 6.6.28-haos-raspi SMP preempt mod_unload modversions aarch64
parm: allow_power_save:int
parm: allow_sw_clock_gating:int
parm: allow_hw_clock_gating:int
parm: bypass_top_level:int
parm: trip_point0_temp:int
parm: trip_point1_temp:int
parm: trip_point2_temp:int
parm: hw_temp_warn1:int
parm: hw_temp_warn2:int
parm: hw_temp_warn1_en:bool
parm: hw_temp_warn2_en:bool
parm: temp_poll_interval:int
### Anything in the Host logs that might be useful for us?
```txt
Process detector:coral1:
[2024-06-03 11:27:45] frigate.detectors.plugins.edgetpu_tfl ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
object_detector = LocalObjectDetector(detector_config=detector_config)
File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
self.detect_api = create_detector(detector_config)
File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
return api(detector_config)
File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 41, in __init__
edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
System information
System Information
| version | core-2024.6.1 |
|---|---|
| installation_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| user | root |
| virtualenv | false |
| python_version | 3.12.2 |
| os_name | Linux |
| os_version | 6.6.28-haos-raspi |
| arch | aarch64 |
| timezone | Europe/Amsterdam |
| config_dir | /config |
Home Assistant Community Store
| GitHub API | ok |
|---|---|
| GitHub Content | ok |
| GitHub Web | ok |
| GitHub API Calls Remaining | 5000 |
| Installed Version | 1.34.0 |
| Stage | running |
| Available Repositories | 1387 |
| Downloaded Repositories | 22 |
Home Assistant Cloud
| logged_in | true |
|---|---|
| subscription_expiration | 15 april 2025 om 02:00 |
| relayer_connected | true |
| relayer_region | eu-central-1 |
| remote_enabled | true |
| remote_connected | true |
| alexa_enabled | false |
| google_enabled | true |
| remote_server | eu-central-1-10.ui.nabu.casa |
| certificate_status | ready |
| instance_id | bc6c685200cb4e3dba25cc25f82aef2d |
| can_reach_cert_server | ok |
| can_reach_cloud_auth | ok |
| can_reach_cloud | ok |
Home Assistant Supervisor
| host_os | Home Assistant OS 12.3 |
|---|---|
| update_channel | stable |
| supervisor_version | supervisor-2024.06.0 |
| agent_version | 1.6.0 |
| docker_version | 25.0.5 |
| disk_total | 228.5 GB |
| disk_used | 123.8 GB |
| healthy | true |
| supported | true |
| host_connectivity | true |
| supervisor_connectivity | true |
| ntp_synchronized | true |
| virtualization | |
| board | rpi5-64 |
| supervisor_api | ok |
| version_api | ok |
| installed_addons | Studio Code Server (5.15.0), Terminal & SSH (9.14.0), Samba share (12.3.1), Home Assistant Google Drive Backup (0.112.1), eufy-security-ws (1.8.0-2), Mosquitto broker (6.4.1), ESPHome (2024.5.5), HassOS SSH port 22222 Configurator (0.9.3), Whisper (2.1.0), Piper (1.5.0), Music Assistant (2.0.4), Frigate (Full Access) (0.13.2), openWakeWord (1.10.0) |
Dashboards
| dashboards | 4 |
|---|---|
| resources | 11 |
| views | 8 |
| mode | storage |
Recorder
| oldest_recorder_run | 31 mei 2024 om 10:23 |
|---|---|
| current_recorder_run | 9 juni 2024 om 11:27 |
| estimated_db_size | 1455.27 MiB |
| database_engine | sqlite |
| database_version | 3.44.2 |
Additional information
When I search the internet, I find things about device tree sets up and the PCIe bus to not have enough MSI-X interrupts? This is a bit too in depth for how much I know about Linux at this point. Advice is welcome.