我猜 lspci 将是执行此操作的工具,但我似乎找不到任何识别输出。有没有办法从命令行知道机器上是否存在 Thunderbolt 端口?
我知道我有一台计算机有 Thunderbolt 端口,lspci 显示如下:
00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Device a379 (rev 10)
00:14.0 USB controller: Intel Corporation Device a36d (rev 10)
00:14.2 RAM memory: Intel Corporation Device a36f (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device a368 (rev 10)
00:16.0 Communication controller: Intel Corporation Device a360 (rev 10)
00:17.0 SATA controller: Intel Corporation Device a352 (rev 10)
00:1d.0 PCI bridge: Intel Corporation Device a330 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a306 (rev 10)
00:1f.3 Audio device: Intel Corporation Device a348 (rev 10)
00:1f.4 SMBus: Intel Corporation Device a323 (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device a324 (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)
01:00.0 Multimedia video controller: Blackmagic Design DeckLink Mini Recorder
02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
我已经远程登录到另一台机器,想知道它是否有 Thunderbolt 端口,lspci 显示以下内容:
00:00.0 Host bridge: Intel Corporation Device 191f (rev 07)
00:01.0 PCI bridge: Intel Corporation Device 1901 (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 1912 (rev 06)
00:14.0 USB controller: Intel Corporation Device a12f (rev 31)
00:14.2 Signal processing controller: Intel Corporation Device a131 (rev 31)
00:16.0 Communication controller: Intel Corporation Device a13a (rev 31)
00:16.3 Serial controller: Intel Corporation Device a13d (rev 31)
00:17.0 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 31)
00:1d.0 PCI bridge: Intel Corporation Device a118 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device a146 (rev 31)
00:1f.2 Memory controller: Intel Corporation Device a121 (rev 31)
00:1f.3 Audio device: Intel Corporation Device a170 (rev 31)
00:1f.4 SMBus: Intel Corporation Device a123 (rev 31)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)
01:00.0 Multimedia video controller: Blackmagic Design DeckLink Mini Recorder
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express
答案1
至少在我的系统上,对于 Thunderbolt 3,如果没有插入任何东西,则 lshw 和 lsusb 是看不到它的(我确实看到了 USB3 端口)。我有一台 Clevo N131WU 笔记本电脑,您可以从 System76 和 Tuxedo 等供应商处购买。
也就是说,模块已加载:
[tara@tuxmonster ~]$ lsmod | grep 雷声 英特尔_wmi_thunderbolt 16384 0 wmi 28672 1 intel_wmi_thunderbolt [塔拉@tuxmonster ~]$
我仔细检查了我的台式计算机,它没有 Thunderbolt,但运行相同的发行版和内核(Arch,4.18),并且 Thunderbolt 驱动程序未加载在桌面上。
答案2
在 Mac 硬件上,Thunderbolt 热插拔主要由操作系统管理,因此 Thunderbolt 控制器始终可见。
但在 x86 PC 硬件上,Thunderbolt(至少是 Thunderbolt 1)往往由 ACPI 固件管理,并且热插拔的处理方式与标准 PCIe 热插拔事件类似。因此,如果未连接任何设备,Thunderbolt 总线对于操作系统来说是完全不可见的。但是,当您将某些东西连接到它时,从 Linux 的角度来看,许多桥接设备就会突然出现:您将看到大量输出,dmesg
因为资源被分配给 Thunderbolt 总线和其中的设备。
Thunderbolt 3 可能会被检测到,因为它与 USB Type-C 连接器共存,因此可能在 Type-C 配置数据中可见。但是,我目前无法访问任何具有 Thunderbolt 3 的系统,因此我现在无法验证这一点。
答案3
Thunderbolt 控制器可能并未完全隐藏。lspci
未列出 Thunderbolt 控制器,因为其供应商和设备 ID 为FFFF:FFFF
。我的叉子pciutils
通过检查其他寄存器来检测此类隐藏的 PCI 设备。
要确定该设备是 Thunderbolt 控制器,请查找 ID=1234 的供应商特定 PCIe 扩展功能。我不确定非 Intel Thunderbolt 或 USB4 控制器的 ID 是否为 1234。
sudo lspci -nnvvv | perl -0777 -nE 'while (/^([^\t\n].*\n)(\t.*\n)*?(\tCapabilities.* Express .*\n)(\t.*\n)*?(\t.*ID=1234.*\n)/mg) { print $1 . $3 }'
03:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Upstream Port, MSI 00
04:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
04:01.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
04:02.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
04:04.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
05:00.0 System peripheral [0880]: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] [8086:15eb] (rev 06) Capabilities: [c0] Express (v2) Endpoint, MSI 00
07:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [8086:15ec] (rev 06) (prog-if 30 [XHCI]) Capabilities: [c0] Express (v2) Endpoint, MSI 00
09:00.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Maple Ridge 4C 2020] [8086:1136] (rev 02) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Upstream Port, MSI 00
0a:00.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Maple Ridge 4C 2020] [8086:1136] (rev 02) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
0a:01.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Maple Ridge 4C 2020] [8086:1136] (rev 02) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
0a:02.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Maple Ridge 4C 2020] [8086:1136] (rev 02) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
0a:03.0 PCI bridge [0604]: Intel Corporation Thunderbolt 4 Bridge [Maple Ridge 4C 2020] [8086:1136] (rev 02) (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Downstream Port (Slot+), MSI 00
0b:00.0 USB controller [0c03]: Intel Corporation Thunderbolt 4 NHI [Maple Ridge 4C 2020] [8086:1137] (prog-if 40 [USB4 Host Interface]) Capabilities: [c0] Express (v2) Endpoint, MSI 00
10:00.0 PCI bridge [0604]: Illegal Vendor ID Device [ffff:ffff] (prog-if 00 [Normal decode]) Capabilities: [c0] Express (v2) Upstream Port, MSI 00
您可以更改命令以删除下游和端点设备。上面结果中列出的最后一个设备来自隐藏的 GC-ALPINE RIDGE。对于固件中不支持 Thunderbolt 的 PC 中基于 Alpine Ridge 的 Thunderbolt 3 附加卡,UEFI Shell 中的以下命令可以取消隐藏 Thunderbolt 控制器的 USB 控制器。这些命令假定 Thunderbolt 控制器具有 PCI 总线 0x10。
mm 0010000054C 00 -w 1 -PCIE -n
mm 0010000054C 0D -w 1 -PCIE -n
mm 00100000548 -w 1 -PCIE -n
当然,操作系统需要重新枚举 PCI 设备,因为 UEFI 没有枚举隐藏设备。对于基于 Titan Ridge 的 Thunderbolt 3 附加卡,默认情况下不隐藏 USB 控制器。通常,如果连接了 USB-C 设备,Thunderbolt 控制器应自行取消隐藏。