Unable to initialize Google Coral USB Accelerator in LXC container (used to work)

elpigeondindo

New Member
Jul 27, 2023
7
0
1
Hi everyone,


I'm encountering an issue with my Google Coral USB Accelerator on my Proxmox host. It used to work perfectly with my Frigate LXC container, but it suddenly stopped working — I'm not sure what caused it. Possibly a Proxmox update or something else under the hood.


Here’s what I’ve done so far:


  • I updated everything on my Proxmox host (kernel, firmware, etc.).
  • I tried different USB ports.
  • I added a powered USB hub.
  • I even bought a second Coral USB Accelerator — same issue.
  • I searched and used AI-based tools to try and fix it, but I’m reaching the limit of what they can help with.
  • Updated the Coral Edge TPU library using:

Code:
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-get update
apt-get install libedgetpu1-std  # or libedgetpu1-max


The Coral is still detected in lsusb:


lsusb
Code:
root@proxmox:~/edgetpu/scripts/windows# lsusb | grep -i Global
Bus 003 Device 008: ID 1a6e:089a Global Unichip Corp.

Full lsusb output:

Code:
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 008: ID 1a6e:089a Global Unichip Corp.
Bus 003 Device 004: ID 05e3:0626 Genesys Logic, Inc. Hub
Bus 003 Device 002: ID 05e3:0626 Genesys Logic, Inc. Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 1a86:55d4 QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2
Bus 002 Device 004: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 002 Device 003: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And here's the relevant dmesg log when I plug in the Coral:

Code:
[ 9814.626260] usb 3-3.4.2: new SuperSpeed USB device number 8 using xhci_hcd
[ 9814.639208] usb 3-3.4.2: New USB device found, idVendor=1a6e, idProduct=089a, bcdDevice= 1.00
[ 9814.639216] usb 3-3.4.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0

It seems to be detected, but inside the LXC container it's no longer usable by Frigate. It’s like something is preventing proper communication or initialization.


Has anyone experienced something similar after a Proxmox update? Any idea how I could troubleshoot further or force reinitialization? I'm open to any advice — even the wild ones


Thanks in advance!
 
I know you said you had it working prior. However, if it's an unprivileged CT, do you still have the necessary device mapping and permissions in the lxc.conf?
For instance, I have

Code:
unprivileged: 1

lxc.cgroup2.devices.allow: c 189:* rwm

lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir

Which is more permissive than I'd like, but it was a workaround to the device ID changing following initialisation of the tpu.
Incidentally, I don't believe you need those tpu related libraries installed on the host.
 
this is my conf

Code:
arch: amd64
cores: 4
features: nesting=1
hostname: frigate
memory: 4096
mp0: /srv/ssd/frigate,mp=/media/frigate,size=0T
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:CA:0A:42,ip=dhcp,type=veth
onboot: 0
ostype: debian
rootfs: Datastore:vm-105-disk-0,size=20G
swap: 2048
tags: 192.168.1.5
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/003/011 dev/bus/usb/003/011 none bind,optional,create=dir
 
Does that USB device path hold true for both the uninitialised and initialised tpu?
IIRC that would not work for me, which was why I resorted to the more permissive config I posted.
However, you say it was working for you before...
Also, with your config, you would have needed to change it when trying the coral in different ports.
 
Last edited:
Try, temporarily, changing the lxc mount to:
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir