Does anyone know how to reset a USB port on MacOS?

Hello Everyone! Does anyone know how to reset a USB port on MacOS?
29 Replies
Marvee Amasi
Marvee Amasi2mo ago
I dont use mac os, I ve seen this work for similar problems Just shut down your Mac, then press shift plus control plus option plus power for like 10 seconds, release them, and turn your Mac back on
melta101
melta1012mo ago
would prefer if i dont need to restart the Mac in linux it is easy simply bind and unbind the port but sadly does not follow the case for MacOS
Marvee Amasi
Marvee Amasi2mo ago
OH then it wont be as simple as it is on linux
Marvee Amasi
Marvee Amasi2mo ago
you know about this : sudo kextunload /System/Library/Extensions/AppleUSBHostPlatformProperties.kext sudo kextload /System/Library/Extensions/AppleUSBHostPlatformProperties.kext @melta101
Ming
Ming2mo ago
Have you tried unloading and re-loading the USB Kernel extensions? In 'System Settings goto General --> About. At the bottom of the page, there is the 'System Report'. Open that. Under 'Hardware' Select 'USB' , and select your USB Bus. This will tell you what type of Controller you have. e.g., mine is: Host Controller Driver: AppleUSBEHCIPI7C9X440SL that tells me that I am using EHCI controller. Then, in a terminal, find the kernel extension with kextstat -l | grep USB Find the extension for your controller. Mine is com.apple.driver.usb.AppleUSBEHCI Then try unloading it and reloading it sudo kextunload com.apple.driver.usb.AppleUSBEHCI Find the location of the extension find /System/Library/Extensions -name "*AppleUSBEHCI*" Then re-load it sudo kextload /System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBEHCI.kext
ZacckOsiemo
ZacckOsiemo2mo ago
@melta101 as above and consider using a script since this could disable your keyboard and mouse
ZacckOsiemo
ZacckOsiemo2mo ago
also this ‘sudo launchctl start com.apple.usbd’
Ming
Ming2mo ago
That's the advantage of using a Bluetooth Keyboard 😄
melta101
melta1012mo ago
i have a iphone and MacOs connected via USB for screen capture of iphone sometimes the packets just stop in between, stopping the stream This however works after a unpluging and repluging Now as this goes to a server stack with multitude of Iphone, i wouldnt want to unplug and replug or reset the whole bus as that would destroy the experience with other iphones
Ming
Ming2mo ago
Does the stream stop for the entire bus or just one phone in particular?
melta101
melta1012mo ago
1 particular
ZacckOsiemo
ZacckOsiemo2mo ago
what sort of social media armageddon are you running streaming multiple screens to a device
Ming
Ming2mo ago
Have you looked at a hardware solution such as: https://eu.mouser.com/new/crowd-supply/crowd-supply-programmable-usb-hub/?srsltid=AfmBOorGCgzdFA_AcePSALT8Sv77iL8I4VDqCEBtov1mohmWbH0JJYpq We use something like that in our test lab to remotely turn on and off a USB device
melta101
melta1012mo ago
😂 i work for app testing platform and we need to support Iphones Apps
Ming
Ming2mo ago
I'm not sure the exact one used - as the lab is in the USA and they are all asleep, so I can't ask them
ZacckOsiemo
ZacckOsiemo2mo ago
Lol makes perfect sense, so app on different iphone software and hardware
melta101
melta1012mo ago
let me go through this i was also thinking of going HW, Just wanted to save expenses incase Sw soln is possible Thanks for this
melta101
melta1012mo ago
yep manual automation record and replay
melta101
melta1012mo ago
all sort
melta101
melta1012mo ago
and not only limited to apps
ZacckOsiemo
ZacckOsiemo2mo ago
what! you are doing kernels on iphone?
melta101
melta1012mo ago
not kernel level, atleast not now as there are no customer for those i mean websites, external services, apple ecosystem integration
ZacckOsiemo
ZacckOsiemo2mo ago
AH normal dev shop, that's cool to know! Interesting that you also do embedded stuff
melta101
melta1012mo ago
this seems feasible Maybe a i could create a USB passthrough, but the question is how do control the reset as i would rather not connect a GPIO wire to reset.
melta101
melta1012mo ago
actually embedded is my main
melta101
melta1012mo ago
exactly as my need
melta101
melta1012mo ago
but a license for controlling hmmm..
melta101
melta1012mo ago
Maybe could start a side R&D to find ways to interact with the USB Hub, the way these people did

Did you find this page helpful?