magic-blue-smoke / Dual-Edge-TPU-Adapter

Dual Edge TPU Adapter to use it on a system with single PCIe port on m.2 A/B/E/M slot
271 stars 3 forks source link

Proxmox passthrough of dual Coral TPU seems to have stopped working #57

Open captainkev76 opened 2 months ago

captainkev76 commented 2 months ago

Hi,

I'm running Proxmox VE 8, and had been using one of your adapter cards to pass through a dual TPU to an Ubuntu VM for Frigate.

I'm pretty sure it was working for a few months but Frigate now won't start because it says it can't detect the TPU. I can see the TPUs there in the VM, but no matter what I do the drivers just won't run. I never end up with anything under "ls /dev/apex*". I've tried recompiling the drivers from scratch, but to no effect.

When checking the IOMMU groups in Proxmox, I noticed that the TPUs were not in exclusive IOMMU groups. On further digging, it seems that Proxmox is putting the adapter card into the same IOMMU groups, which kinda makes sense. But I'm now wondering if I actually need to do PCIe passthrough of the adapter card rather than just the Coral TPUs?

Does that make any sense? I think I might be overthinking this but I'm at my wits end trying to work out how to get this working.

root@pve:~# find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/17/devices/0000:03:00.0
/sys/kernel/iommu_groups/7/devices/0000:00:15.1
/sys/kernel/iommu_groups/7/devices/0000:00:15.2
/sys/kernel/iommu_groups/7/devices/0000:00:15.0
/sys/kernel/iommu_groups/15/devices/0000:01:00.0
/sys/kernel/iommu_groups/5/devices/0000:00:0e.0
/sys/kernel/iommu_groups/13/devices/0000:00:1c.4
/sys/kernel/iommu_groups/3/devices/0000:00:06.0
**/sys/kernel/iommu_groups/21/devices/0000:09:00.0
/sys/kernel/iommu_groups/21/devices/0000:07:07.0**
/sys/kernel/iommu_groups/11/devices/0000:00:1c.0
/sys/kernel/iommu_groups/1/devices/0000:00:00.0
/sys/kernel/iommu_groups/18/devices/0000:05:00.0
/sys/kernel/iommu_groups/8/devices/0000:00:16.0
/sys/kernel/iommu_groups/16/devices/0000:02:00.0
/sys/kernel/iommu_groups/6/devices/0000:00:14.2
/sys/kernel/iommu_groups/6/devices/0000:00:14.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.5
/sys/kernel/iommu_groups/14/devices/0000:00:1f.3
/sys/kernel/iommu_groups/14/devices/0000:00:1f.4
/sys/kernel/iommu_groups/4/devices/0000:00:0a.0
/sys/kernel/iommu_groups/12/devices/0000:00:1c.2
/sys/kernel/iommu_groups/2/devices/0000:00:01.0
**/sys/kernel/iommu_groups/20/devices/0000:08:00.0
/sys/kernel/iommu_groups/20/devices/0000:07:03.0**
/sys/kernel/iommu_groups/10/devices/0000:00:1a.0
/sys/kernel/iommu_groups/0/devices/0000:00:02.0
/sys/kernel/iommu_groups/19/devices/0000:06:00.0
/sys/kernel/iommu_groups/9/devices/0000:00:17.0
root@pve:~# pvesh get /nodes/pve/hardware/pci --pci-class-blacklist ""
┌──────────┬────────┬──────────────┬────────────┬────────┬───────────────────────────────────────────────────────┬──────┬──────────────────┬────────────────────────────────────────────┬──────────────────┬──────────────────────────────────┬──────────────────────────────────┐
│ class    │ device │ id           │ iommugroup │ vendor │ device_name                                           │ mdev │ subsystem_device │ subsystem_device_name                      │ subsystem_vendor │ subsystem_vendor_name            │ vendor_name                      │
╞══════════╪════════╪══════════════╪════════════╪════════╪═══════════════════════════════════════════════════════╪══════╪══════════════════╪════════════════════════════════════════════╪══════════════════╪══════════════════════════════════╪══════════════════════════════════╡
│ 0x010400 │ 0x467f │ 0000:00:0e.0 │          5 │ 0x8086 │ Volume Management Device NVMe RAID Controller         │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x010601 │ 0x7ae2 │ 0000:00:17.0 │          9 │ 0x8086 │ Alder Lake-S PCH SATA Controller [AHCI Mode]          │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x010700 │ 0x0072 │ 0000:01:00.0 │         15 │ 0x1000 │ SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]         │      │ 0x1f1c           │ 6Gbps SAS HBA Adapter                      │ 0x1028           │ Dell                             │ Broadcom / LSI                   │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x010802 │ 0x5041 │ 0000:02:00.0 │         16 │ 0x15b7 │                                                       │      │ 0x5041           │                                            │ 0x15b7           │ Sandisk Corp                     │ Sandisk Corp                     │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x010802 │ 0x1602 │ 0000:03:00.0 │         17 │ 0x1e4b │                                                       │      │ 0x1602           │                                            │ 0x1e4b           │ MAXIO Technology (Hangzhou) Ltd. │ MAXIO Technology (Hangzhou) Ltd. │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x020000 │ 0x15f3 │ 0000:05:00.0 │         18 │ 0x8086 │ Ethernet Controller I225-V                            │      │ 0x87d2           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x030000 │ 0x4680 │ 0000:00:02.0 │          0 │ 0x8086 │ AlderLake-S GT1                                       │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x040300 │ 0x7ad0 │ 0000:00:1f.3 │         14 │ 0x8086 │ Alder Lake-S HD Audio Controller                      │      │ 0x8841           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x050000 │ 0x7aa7 │ 0000:00:14.2 │          6 │ 0x8086 │ Alder Lake-S PCH Shared SRAM                          │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060000 │ 0x4668 │ 0000:00:00.0 │          1 │ 0x8086 │ 12th Gen Core Processor Host Bridge/DRAM Registers    │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060100 │ 0x7a86 │ 0000:00:1f.0 │         14 │ 0x8086 │                                                       │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x460d │ 0000:00:01.0 │          2 │ 0x8086 │ 12th Gen Core Processor PCI Express x16 Controller #1 │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x464d │ 0000:00:06.0 │          3 │ 0x8086 │ 12th Gen Core Processor PCI Express x4 Controller #0  │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x7ac8 │ 0000:00:1a.0 │         10 │ 0x8086 │ Alder Lake-S PCH PCI Express Root Port #25            │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x7ab8 │ 0000:00:1c.0 │         11 │ 0x8086 │ Alder Lake-S PCH PCI Express Root Port #1             │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x7aba │ 0000:00:1c.2 │         12 │ 0x8086 │                                                       │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x7abc │ 0000:00:1c.4 │         13 │ 0x8086 │ Alder Lake-S PCH PCI Express Root Port #5             │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x1182 │ 0000:06:00.0 │         19 │ 0x1b21 │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch            │      │ 0x118f           │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch │ 0x1b21           │ ASMedia Technology Inc.          │ ASMedia Technology Inc.          │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x1182 │ 0000:07:03.0 │         20 │ 0x1b21 │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch            │      │ 0x118f           │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch │ 0x1b21           │ ASMedia Technology Inc.          │ ASMedia Technology Inc.          │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x060400 │ 0x1182 │ 0000:07:07.0 │         21 │ 0x1b21 │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch            │      │ 0x118f           │ ASM1182e 2-Port PCIe x1 Gen2 Packet Switch │ 0x1b21           │ ASMedia Technology Inc.          │ ASMedia Technology Inc.          │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x078000 │ 0x7ae8 │ 0000:00:16.0 │          8 │ 0x8086 │ Alder Lake-S PCH HECI Controller #1                   │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0880ff │ 0x089a │ 0000:08:00.0 │         20 │ 0x1ac1 │ Coral Edge TPU                                        │      │ 0x089a           │                                            │ 0x1ac1           │ Global Unichip Corp.             │ Global Unichip Corp.             │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0880ff │ 0x089a │ 0000:09:00.0 │         21 │ 0x1ac1 │ Coral Edge TPU                                        │      │ 0x089a           │                                            │ 0x1ac1           │ Global Unichip Corp.             │ Global Unichip Corp.             │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c0330 │ 0x7ae0 │ 0000:00:14.0 │          6 │ 0x8086 │ Alder Lake-S PCH USB 3.2 Gen 2x2 XHCI Controller      │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c0500 │ 0x7aa3 │ 0000:00:1f.4 │         14 │ 0x8086 │ Alder Lake-S PCH SMBus Controller                     │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c8000 │ 0x7acc │ 0000:00:15.0 │          7 │ 0x8086 │ Alder Lake-S PCH Serial IO I2C Controller #0          │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c8000 │ 0x7acd │ 0000:00:15.1 │          7 │ 0x8086 │ Alder Lake-S PCH Serial IO I2C Controller #1          │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c8000 │ 0x7ace │ 0000:00:15.2 │          7 │ 0x8086 │ Alder Lake-S PCH Serial IO I2C Controller #2          │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x0c8000 │ 0x7aa4 │ 0000:00:1f.5 │         14 │ 0x8086 │ Alder Lake-S PCH SPI Controller                       │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
├──────────┼────────┼──────────────┼────────────┼────────┼───────────────────────────────────────────────────────┼──────┼──────────────────┼────────────────────────────────────────────┼──────────────────┼──────────────────────────────────┼──────────────────────────────────┤
│ 0x118000 │ 0x467d │ 0000:00:0a.0 │          4 │ 0x8086 │ Platform Monitoring Technology                        │      │ 0x8694           │                                            │ 0x1043           │ ASUSTeK Computer Inc.            │ Intel Corporation                │
└──────────┴────────┴──────────────┴────────────┴────────┴───────────────────────────────────────────────────────┴──────┴──────────────────┴────────────────────────────────────────────┴──────────────────┴──────────────────────────────────┴──────────────────────────────────┘
magic-blue-smoke commented 2 months ago

@captainkev76 sorry for late reply. Could you please tell if you've updated OS or something else recently?