Closed Dutch317 closed 1 year ago
Maybe take a look at https://github.com/google-coral/edgetpu/issues/99#issuecomment-719028859
I'd also recommend looking at your BIOS for any USB related options that might be affecting this.
Unfortunately, I don't think there's much we can do as it's something with the host / VM cutting access to the coral.
Also similar to https://github.com/blakeblackshear/frigate/issues/4056
Thanks Nick - I missed that second post. Nothing in the bios as far as USB is concerned or in power settings. I'm thinking you are right, it is something between the host and VM. It seemed to be the same issue by passing the card or just the USB port in Proxmox. For now I'll just switch back to CPU detectors and keep working on the host side to see if there is anything to be done. I have been seeing others running on bare metal with or without Frigate and having the same problems.
Have you been able to fix this? I have docker on ubuntu and my USB TPU keeps stopping after a few mins.
No, I really haven't had the time lately to dig into it more. I sure my problem lies between the hardware/Proxmox and passing the usb through correctly. I think the OS is trying to access the USB at times causing the "lock up" and I think it has to do with blacklisting the TPU/USB drivers in the host OS.
I have the same issue with Home Assistant Yellow
transfer on tag 2 failed. Abort. Deadline exceeded: USB transfer error 2 [LibUsbDataOutCallback]
Fatal Python error: Aborted
Thread 0x0000007f88ad41e0 (most recent call first):
File "/usr/lib/python3.9/threading.py", line 312 in wait
File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
File "/usr/lib/python3.9/threading.py", line 892 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x0000007f950a0010 (most recent call first):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 833 in invoke
File "/opt/frigate/frigate/edgetpu.py", line 83 in detect_raw
File "/opt/frigate/frigate/edgetpu.py", line 159 in run_detector
File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
File "/opt/frigate/frigate/edgetpu.py", line 220 in start_or_restart
File "/opt/frigate/frigate/edgetpu.py", line 189 in __init__
File "/opt/frigate/frigate/app.py", line 217 in start_detectors
File "/opt/frigate/frigate/app.py", line 360 in start
File "/opt/frigate/frigate/__main__.py", line 16 in <module>
File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
With the complete config being:
mqtt:
host: ****
port: ****
topic_prefix: frigate
user: ****
password: ****
detectors:
coral:
type: edgetpu
device: usb
cameras:
tapo_c210:
ffmpeg:
# hwaccel_args: -c:v h264_v4l2m2m
# input_args: -rtsp_transport tcp
inputs:
- path: rtsp://user:pwd@ip/stream1
roles:
- detect
If I change the detector with
cpu1:
type: cpu
num_threads: 3
everything works fine.
@renaiku are you using a powered usb hub? I doubt the HA yellow can supply enough power for the coral on its own
@NickM-27 Yes, the one advised by the documentation. Only the coral is plugged on it.
@NickM-27 Changed official coral usb cable with another one. It works now.
What is weird is that the offical cable works on rpi4, not on my Yellow.
I had a lot of issues with the included cable back when I ran USB coral
I'm facing the same problem on the Yellow. It was running stable on the Blue with the original USB cable and without extra power supply.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@alsFC The Blue can supply more power to USB ports than the HA Yellow can as the HA Yellow is based on the Raspberry Pi CM4 Also, if you have a Yellow using a CM4 with Wifi and Bluetooth capabilities, they seem to interfere with the Coral. The BLue (Odroid) doesn't have WiFi at all. I've seen success by using a long USB cable, connecting to a powered hub significant distance from the Yellow. Someone reported needign 2 metres, but I think that is excessive. I got mine working about 50cm away, which is about 20 inches, give or take. Make sure it connects to a powered USB hub as the Coral needs a bit of juice to work.
Describe the problem you are having
Frigate shuts down after a few minutes with a error of: F driver/usb/usb_driver.cc:1148] HandleQueuedBulkIn transfer in failed. Unknown: USB transfer error 1 [LibUsbDataInCallback] Fatal Python error: Aborted This only started after moving to a Coral USB TPU.
Version
0.11.1-2EADA21
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
Operating system
Proxmox
Install method
HassOS Addon
Coral version
USB
Any other information that may be helpful
I have tried moving from a USB 2 and installing a USB 3 PCIE card along with running it with a powered USB 3 hub. This is running HASSIO (Home Assistant 2022.10.3 - Supervisor 2022.10.0 - Operating System 9.2 - Frontend 20221010.0 - latest) under Proxmox 7.2-7 VM and I have passed though the full PCIE slot and verified that it seems to be working. It is running on an older Dell R710 server and virtualization seems to be working fine and being passed through the VM.