Script that emulates disconnecting and reconnecting USB devices

kbreed27
Contributor

I'm guessing this is a long shot. Our district just bought a ton of M1 macbook airs with Kensington Thunderbolt docking stations. The problem we are seeing is that if the macbook is restarted, the docking station does not communicate with the computer until either the docking station is power cycled or the usb-c cable is disconnected and reconnected to the macbook.

 

I'm guessing this is no, but is there anyway to script disabling the Thunderbolt ports on the macbook air for like 5 seconds and then re-enable them? Then I guess this script could be dropped into a policy that runs at start-up. 

5 REPLIES 5

jamf-42
Valued Contributor II

does it need the dockworks sw to be installed? 

@jamf-42 It doesn't seem to make a difference if the dockworks sw software is installed or running or not. After the computer has been restarted or powered off and back-on, it won't communicate with the docking station until it's either power cycled or the cable is disconnected/reconnected. It still charges the laptop, but it loses displays and ethernet connectivity. 

AJPinto
Honored Contributor III

I have seen very similar behavior from all kinds of USB-C peripherals (monitors, docks, hubs, etc), Thunderbolt peripherals seem to behave fine though.

 

The best I have gathered its macOS not following USB sleep wake standards. So the docks are not waking up correctly with the Mac. I could be totally wrong, but that is where my sleuthing has lead me.

SCCM
Contributor III

What OS are you running? and is it the same on another OS? You could try creating a config profile in case its related to the new Ventura changes
macOS Ventura 13 Release Notes | Apple Developer Documentation

I do have a configuration profile in place that disables the need to approve USB devices and it does seem to work properly. Any USB devices that plug-in now do just get recognized immediately without the need for approval. It just seems like an issue maybe even with this model of dock. We hooked up an m1 MB air to one of the Dell Docks that we use on our PC laptops and it maintained connections after reboots, going to sleep etc, when the Kensington one did not.

 

I verified this behavior on Monterey as well on an m1 macbook. I tried the dock on an older Macbook air we had. The usb 2.0 port wasn't good enough for the displays, but it the ethernet connection came back after reboot. So it seems specific to Apple Silicon. I Also hooked up a Lenovo Thinkpad to the Kensington dock and rebooted and didn't have any issues.

 

I have an "escalated" ticket in with Kensington to speak with a senior tech support person, but I am not very hopeful based on my level 1 interactions. 

I was just hoping there would be  a launch daemon or script that could run at login that would trick the computer into thinking the docking station has been disconnected and reconnected with out having to physically touch the cabling or power.