我原来用 intel MBP 16 ,连这个拓展坞从 Monterey 用到 Sonoma 一直没问题。
买了个 M1 MAX MBP ,发现只要开启 BetterTouchTool ,系统会时不时不执行触控板的点击操作。( Monterey 12.7-12.7.1 )
检查到最后,发现原因是大功率充电器(大于 65W )插在 satechi 这个 9 合 1 扩展坞上连接 M1 MAX 的 MacBook 时,拓展坞只有 USB2.0 的速度、并且反复高频断开然后重新连接。
但是在之前的 intel MBP 上相同的连接方式不会有任何问题。我怀疑是这个拓展坞和 M1 的 Mac 不兼容?
这个逻辑链条太跳脱了,我检查了五六个小时才终于搞清楚……😅
这下我只能再买个贝尔金的拓展坞了。
使用 Hammerspoon 加载这段代码,然后进 Hammerspoon 的 console 看实时 log ,就能看到 USB 设备连接断开的情况:
usbConnectsTimer = hs.timer.new(3, function()
usbConnectsTimer:stop()
print("> usb connect for devices: " .. usbConnectsDevs)
usbConnects = 0
usbConnectsDevs = nil
end)
usbDisconnectsTimer = hs.timer.new(3, function()
usbDisconnectsTimer:stop()
print("> usb disconnect for devices: " .. usbDisconnectsDevs)
usbDisconnects = 0
usbDisconnectsDevs = nil
end)
usbConnects = 0
usbDisconnects = 0
usbDCWatcher = {}
usbMonitor = hs.usb.watcher.new(function(info)
-- iNotify(log,"USB Monitor: " .. info['eventType'] .. " " .. info['vendorName'] .. " " .. info['productName'])
local event = info['eventType']
local vendor = info['vendorName']
local product = info['productName']
print("USB Monitor: " .. event .. " " .. vendor .. " " .. product)
if event == "added" then
if usbDebugAllConns then
usbConnectsTimer:setNextTrigger(3)
usbConnects = usbConnects + 1
if usbConnectsDevs ~= nil then usbConnectsDevs = usbConnectsDevs .. ", " .. vendor .. " " .. product else usbConnectsDevs = vendor .. " " .. product end
end
if usbDebugReconns then
currTime = hs.timer.secondsSinceEpoch()
for i, v in pairs(usbDCWatcher) do
if currTime-v>30 then usbDCWatcher[i] = nil end
end
if usbDCWatcher[vendor .. " " .. product] ~= nil then
print("USB Device reconnect occured: " .. vendor .. " " .. product)
end
end
elseif event == "removed" then
if usbDebugAllConns then
usbDisconnectsTimer:setNextTrigger(3)
usbDisconnects = usbDisconnects + 1
if usbDisconnectsDevs ~= nil then usbDisconnectsDevs = usbDisconnectsDevs .. ", " .. vendor .. " " .. product else usbDisconnectsDevs = vendor .. " " .. product end
end
if usbDebugReconns then usbDCWatcher[vendor .. " " ..product]=hs.timer.secondsSinceEpoch() end
else print("Unknown USB event in usb watcher") end
end):start()
function getUsbDevices()
local devs = hs.usb.attachedDevices()
local cnt = 0
local res = {}
local vendor
for i,v in pairs(devs) do
cnt = cnt + 1
if v['vendorName'] ~= nil then vendor = v['vendorName'] else vendor = "(no vendor)" end
if v['productName'] ~= nil then product = v['productName'] else product = "(no productname)" end
table.insert(res,vendor .. " " .. product)
end
table.sort(res)
print("\n" .. table.concat(res,"\n"))
print(cnt .. " devices attached")
end
2023-10-28 21:48:58: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:48:58: USB Monitor: removed VIA Labs, Inc. USB Billboard Device
2023-10-28 21:48:58: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:48:58: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:00: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:00: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:01: USB Monitor: added VIA Labs, Inc. USB Billboard Device
2023-10-28 21:49:01: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:02: USB Monitor: removed VIA Labs, Inc. USB Billboard Device
2023-10-28 21:49:02: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:02: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:02: USB Monitor: added VIA Labs, Inc. USB Billboard Device
2023-10-28 21:49:03: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:03: USB Monitor: added VIA Labs, Inc. USB Billboard Device
2023-10-28 21:49:03: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
2023-10-28 21:49:03: USB Monitor: removed VIA Labs, Inc. USB Billboard Device
2023-10-28 21:49:03: USB Monitor: removed VIA Labs, Inc. USB2.0 Hub
往下无限add
remove
循环。
在 intel Mac 上连这个拓展坞的 log 就这样直接结束:
2023-10-29 14:18:19: USB Monitor: added VIA Labs, Inc. USB3.0 Hub
2023-10-29 14:18:19: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-29 14:18:20: USB Monitor: added VIA Labs, Inc. USB3.0 Hub
2023-10-29 14:18:20: USB Monitor: added VIA Labs, Inc. USB2.0 Hub
2023-10-29 14:18:20: USB Monitor: added Realtek USB 10/100/1000 LAN
2023-10-29 14:18:22: USB Monitor: added VIA Labs, Inc. USB Billboard Device
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.