Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some USB device no longer detected #3839

Open
GraemeDBlue opened this issue Jan 28, 2025 · 9 comments
Open

Some USB device no longer detected #3839

GraemeDBlue opened this issue Jan 28, 2025 · 9 comments
Labels
board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) bug

Comments

@GraemeDBlue
Copy link

GraemeDBlue commented Jan 28, 2025

Describe the issue you are experiencing

On Upgrading, my USB Coral device for Frigate running on same Generic x86-64 hardware, as an add on is no longer detected and I see this in the Frigate logs on attempted start of the add on

2025-01-28 09:16:34.345188064  [2025-01-28 09:16:34] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2025-01-28 09:16:34.359369421  [2025-01-28 09:16:34] frigate.app                    INFO    : Output process started: 389
2025-01-28 09:16:34.359388537  [2025-01-28 09:16:34] frigate.detectors.plugins.edgetpu_tfl ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
2025-01-28 09:16:34.359395088  Process detector:coral:
2025-01-28 09:16:34.363232986  Traceback (most recent call last):
2025-01-28 09:16:34.363244607    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
2025-01-28 09:16:34.363249051      delegate = Delegate(library, options)
2025-01-28 09:16:34.363254083    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
2025-01-28 09:16:34.363258256      raise ValueError(capture.message)
2025-01-28 09:16:34.367372468  ValueError
2025-01-28 09:16:34.367381385  
2025-01-28 09:16:34.367385517  During handling of the above exception, another exception occurred:
2025-01-28 09:16:34.367388177  
2025-01-28 09:16:34.367391201  Traceback (most recent call last):
2025-01-28 09:16:34.367394730    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2025-01-28 09:16:34.367397407      self.run()
2025-01-28 09:16:34.367400772    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2025-01-28 09:16:34.367405651      self._target(*self._args, **self._kwargs)
2025-01-28 09:16:34.367446094    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2025-01-28 09:16:34.367450590      object_detector = LocalObjectDetector(detector_config=detector_config)
2025-01-28 09:16:34.367454253    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2025-01-28 09:16:34.367457664      self.detect_api = create_detector(detector_config)
2025-01-28 09:16:34.367516888    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2025-01-28 09:16:34.367520742      return api(detector_config)
2025-01-28 09:16:34.367552065    File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 41, in __init__
2025-01-28 09:16:34.367556626      edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
2025-01-28 09:16:34.367560593    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
2025-01-28 09:16:34.367563978      raise ValueError('Failed to load delegate from {}\n{}'.format(
2025-01-28 09:16:34.367567510  ValueError: Failed to load delegate from libedgetpu.so.1.0

Unplugging the Coral lets the add on boot again , so my guess is driver for Coral on latest OS update?

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

6.6.73-haos

Did the problem occur after upgrading the Operating System?

Yes

Hardware details

  • AMD Quad Core, 8GB DDR4, 32GB SSD, USB3
  • SONOFF Zigbee 3.0 USB Dongle Plus Stick Zigbee TI CC2652P+CP2102 (N) Coordinator
  • Google Coral USB Edge TPU ML Accelerator
  • USB bluetooth device

Steps to reproduce the issue

  1. Reboot HAOS
  2. Start the Frigate add on
  3. Frigate Add on crashes
    ...

Anything in the Supervisor logs that might be useful for us?

2025-01-28 09:17:52.639 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-14299' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:1506> exception=AddonsJobError('Rate limit exceeded, more than 10 calls in 0:30:00')>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/addon.py", line 1520, in watchdog_container
    await self._restart_after_problem(event.state)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 291, in wrapper
    raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more than 10 calls in 0:30:00
2025-01-28 09:18:55.126 WARNING (MainThread) [supervisor.docker.addon] Frigate (Full Access) running with disabled protected mode!

Anything in the Host logs that might be useful for us?

2025-01-28 09:13:39.852 homeassistant kernel: usb 1-3: reset full-speed USB device number 2 using xhci_hcd
2025-01-28 09:13:41.951 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:41.955 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:41.955 homeassistant kernel: usb 1-3: reset full-speed USB device number 2 using xhci_hcd
2025-01-28 09:13:41.956 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:41.959 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:41.960 homeassistant kernel: usb 1-3: reset full-speed USB device number 2 using xhci_hcd
2025-01-28 09:13:41.960 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:41.960 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:41.961 homeassistant kernel: usb 1-3: device not accepting address 2, error -71
2025-01-28 09:13:41.961 homeassistant kernel: usb 1-3: reset full-speed USB device number 2 using xhci_hcd
2025-01-28 09:13:41.962 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:41.962 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:41.963 homeassistant kernel: usb 1-3: device not accepting address 2, error -71
2025-01-28 09:13:41.963 homeassistant kernel: usb 1-3: USB disconnect, device number 2
2025-01-28 09:13:42.071 homeassistant kernel: usb 1-3: new full-speed USB device number 3 using xhci_hcd
2025-01-28 09:13:42.194 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:42.429 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:42.650 homeassistant kernel: usb 1-3: new full-speed USB device number 4 using xhci_hcd
2025-01-28 09:13:42.773 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:43.002 homeassistant kernel: usb 1-3: device descriptor read/64, error -71
2025-01-28 09:13:43.112 homeassistant kernel: usb usb1-port3: attempt power cycle
2025-01-28 09:13:43.499 homeassistant kernel: usb 1-3: new full-speed USB device number 5 using xhci_hcd
2025-01-28 09:13:43.499 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:43.705 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:43.912 homeassistant kernel: usb 1-3: device not accepting address 5, error -71
2025-01-28 09:13:44.025 homeassistant kernel: usb 1-3: new full-speed USB device number 6 using xhci_hcd
2025-01-28 09:13:44.025 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:44.231 homeassistant kernel: usb 1-3: Device not responding to setup address.
2025-01-28 09:13:44.439 homeassistant kernel: usb 1-3: device not accepting address 6, error -71
2025-01-28 09:13:44.439 homeassistant kernel: usb usb1-port3: unable to enumerate USB device
2025-01-28 09:13:52.682 homeassistant kernel: amdgpu: pp_dpm_get_mclk_od was not implemented.
2025-01-28 09:13:52.682 homeassistant kernel: amdgpu: pp_dpm_get_sclk_od was not implemented.

System information

System Information

version core-2025.1.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.1
os_name Linux
os_version 6.6.73-haos
arch x86_64
timezone Europe/London
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 1506
Downloaded Repositories 25
Home Assistant Cloud
logged_in true
subscription_expiration 25 February 2025 at 00:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled false
cloud_ice_servers_enabled true
remote_server eu-central-1-5.ui.nabu.casa
certificate_status ready
instance_id 6deb8fab8f0e4b4e98c0c1cece41beba
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.2
update_channel stable
supervisor_version supervisor-2024.12.3
agent_version 1.6.0
docker_version 27.2.0
disk_total 28.6 GB
disk_used 25.7 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.16.0), Mosquitto broker (6.5.0), Home Assistant Google Drive Backup (0.112.1), Zigbee2MQTT Edge (edge), SQLite Web (4.3.0), ESPHome Device Builder (2024.12.4), File editor (5.8.0), Glances (0.21.1), MQTT Explorer (browser-1.0.3), Samba NAS (12.3.2-nas), Uptime Kuma (0.12.4), Music Assistant Server (2.3.6), LocalDeck Configurator (0.6), TasmoAdmin (0.31.3), Frigate (Full Access) (0.14.1), Matter Server (7.0.0), Samba share (12.4.0), InfluxDB (5.0.1), Grafana (10.2.2)
Dashboards
dashboards 18
resources 10
views 5
mode storage
Recorder
oldest_recorder_run 17 January 2025 at 07:58
current_recorder_run 28 January 2025 at 10:01
estimated_db_size 750.12 MiB
database_engine sqlite
database_version 3.47.1
Sonoff
version 3.8.2 (c4b6fda)
cloud_online 0 / 1
local_online 1 / 1
Spotify
api_endpoint_reachable ok

Additional information

Frigate Logs: Frigate has not been updated and this worked before OS update

2025-01-28 10:30:05.130005282  [2025-01-28 10:30:05] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2025-01-28 10:30:05.130019751  [2025-01-28 10:30:05] frigate.detectors.plugins.edgetpu_tfl ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
2025-01-28 10:30:05.130025298  Process detector:coral:
2025-01-28 10:30:05.133539040  Traceback (most recent call last):
2025-01-28 10:30:05.133702574    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
2025-01-28 10:30:05.133707111      delegate = Delegate(library, options)
2025-01-28 10:30:05.133711204    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
2025-01-28 10:30:05.133714547      raise ValueError(capture.message)
2025-01-28 10:30:05.133717647  ValueError
2025-01-28 10:30:05.134388977  
2025-01-28 10:30:05.134400173  During handling of the above exception, another exception occurred:
2025-01-28 10:30:05.134403394  
2025-01-28 10:30:05.134683633  Traceback (most recent call last):
2025-01-28 10:30:05.135683163    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2025-01-28 10:30:05.135692237      self.run()
2025-01-28 10:30:05.135696249    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2025-01-28 10:30:05.135700172      self._target(*self._args, **self._kwargs)
2025-01-28 10:30:05.135704080    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2025-01-28 10:30:05.135707979      object_detector = LocalObjectDetector(detector_config=detector_config)
2025-01-28 10:30:05.135714182    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2025-01-28 10:30:05.135770608      self.detect_api = create_detector(detector_config)
2025-01-28 10:30:05.135775178    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2025-01-28 10:30:05.135778643      return api(detector_config)
2025-01-28 10:30:05.135782454    File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 41, in __init__
2025-01-28 10:30:05.135845729      edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
2025-01-28 10:30:05.135850266    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
2025-01-28 10:30:05.135880420      raise ValueError('Failed to load delegate from {}\n{}'.format(
2025-01-28 10:30:05.135884468  ValueError: Failed to load delegate from libedgetpu.so.1.0
```

I have tried multiple USB ports on my device, USB2 and USB3 and none of them seem to work for the Coral anymore
@jacknife71
Copy link

Same issue here.

Using ODROID M1.

2 of 4 USB-Ports are not working anymore.
Actually 3 USB-Ports used
Switching Sticks to working ports is a temporary workaround.

@sairon
Copy link
Member

sairon commented Jan 28, 2025

@jacknife71 Unfortunately, I can confirm that. It's probably unrelated to the original issue, because there is no kernel message at all when a device is plugged into the USB 3 (blue) ports. It seems to be a stable kernel regression because otherwise nothing much have changed between the version. I have created another issue to track it and will have a closer look. Thanks for reporting the issue and sorry for the inconvenience. The best workaround would be to downgrade to 14.1 (ha os boot-slot other if it was the previous running version before upgrade or ha os update --version 14.1), you won't be missing on too much.

@sairon
Copy link
Member

sairon commented Jan 28, 2025

@GraemeDBlue Does reverting to 14.1 (using the commands from the previous comment) fix the issue? Have you tried whether a cold boot (unplugging the PC for a while) doesn't fix it? If not, could you please post the complete host logs when it doesn't work?

@sairon sairon added the board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) label Jan 28, 2025
@jacknife71
Copy link

Downgrade to 14.1 works.
All USB Ports are online now.
Thanks for Support.
Regards
Jacknife

@GraemeDBlue
Copy link
Author

@sairon unfortunately reverting to 14.1 does not seem to solve the issue for me . Coral is just no longer detected

@GraemeDBlue
Copy link
Author

@sairon actually I lie, it does now work again on 14.1, but against all suggestions "Protection mode" needs to be ON for it to work, which previously it was set to OFF

@GraemeDBlue
Copy link
Author

@sairon bumped to 14.2 with above change and it still works, so unsure how that flag can have been changed to now be opposite to suggested setting for using a Coral

@sairon
Copy link
Member

sairon commented Jan 29, 2025

Not sure what's going on there with Frigate, but for the device not appearing in the system, that seems to be a different problem - the device wasn't enumerated by the kernel (returning error 71 = protocol error), something that wouldn't be fixed by toggling the protection mode. Possible reasons are a bad USB cable or interference, bit less likely general problem with the hardware or a kernel regression.

@GraemeDBlue
Copy link
Author

@sairon yep makes no sense, but its still working with the protection mode turned on, really makes no sense at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) bug
Projects
None yet
Development

No branches or pull requests

3 participants