Coral USB keeps on crashing

Rob8

Member
Dec 14, 2022
5
0
6
The Netherlands
I did a clean installation of Proxmox VE 9.1.1, and are trying to run frigate on a LXC container and utilizing the coral USB TPU. Unfortunately, the Debian 13 keeps on crashing, it is the same with USB2 or USB3 port.

Plugin to the USB2 port

root@homelab:~# lsusb
Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 0bda:c821 Realtek Semiconductor Corp. Bluetooth Radio

Bus 001 Device 003: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)

Bus 001 Device 004: ID 1a6e:089a Global Unichip Corp.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub


nano /etc/pve/lxc/103.conf
Code:
arch: amd64
cores: 2
dev0: /dev/dri/renderD128
features: nesting=1
hostname: frigate
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.254,hwaddr=BC:24:11:43:7F:9F,ip=192.168.178.190/24,type=v>
onboot: 1
ostype: debian
rootfs: local-lvm:vm-103-disk-0,size=200G
searchdomain: 1.1.1.1
swap: 512
unprivileged: 1
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/004 dev/bus/004 none bind,optional,create=dir 0,0

nano /etc/udev/rules.d/71-edgetpu.rules
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="9302", MODE="0664", TAG+="uaccess", OWNER>
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a6e", ATTRS{idProduct}=="089a", MODE="0664", TAG+="uaccess", OWNER="100000>

Hopefully someone can help out fixing this?
 
Last edited:
Hi,

IT can fails in your LXC setup because the Coral USB driver (apex/gasket) requires direct kernel-level USB access, but your container is unprivileged and only bind-mounts /dev/bus/usb, which causes driver conflicts and crashes on Debian 13.
The TPU works reliably only with privileged VM passthrough where the USB device is exposed directly to the guest OS.
 
i run a fedora LXC also unpriv with usb bind mounts and i have no issues. I load the firmware of the coral stick in proxmox, so it is directly recognized as google inc device and don't need to switch usb ID after the first frigate start.

https://stijn.tintel.eu/blog/2025/01/22/load-google-coral-usb-firmware-udev/

Code:
arch: amd64
dev0: /dev/dri/card0,gid=104,mode=0666
dev1: /dev/bus/usb/002/004,mode=0666
dev2: /dev/dri/renderD128,gid=104,mode=0666
features: nesting=1
hostname: opalauge
memory: 6144
mp0: ssd:subvol-105-disk-1,mp=/mnt/data,backup=1,size=1000G
net0: XXXX
onboot: 1
ostype: fedora
parent: before_43
rootfs: ssd:subvol-105-disk-0,size=15G
swap: 2048
unprivileged: 1
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 235:* rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.idmap: u 0 100000 165536
lxc.idmap: g 0 100000 165536