I have a MacBook at home, where I have a webcam connected to.

The problem is I'm not at home and the surveillance software I'm using can't see it.

Is it possible to simulate taking the USB cable out and putting it back in again?

1 Answer 1



sudo kextunload -b "com.apple.driver.usb.AppleUSBEHCIPCI"; sleep 5; sudo kextload -b "com.apple.driver.usb.AppleUSBEHCIPCI"

Works on my system, just tested it. I had to run the command 3 times though because for 2 times my usb camera didn't reconnect correctly, no idea why that happened.

Or similar to this with the full path

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext

Oh well, this work

  • It just says it can open CFBundle for /Users/*** /IOUSBMassStorageClass.kext. Can't create IOUSBMassStorageClass.kext. (kernel) Kext com.apple.driver.ExampleBundle not found for unload request. Failed to unload com.apple.driver.ExampleBundle - (libkern/kext) not found.
    – Ave Katten
    Mar 13, 2017 at 12:42
  • Oh sorry.. of course that needs to be removed. See above. Mar 13, 2017 at 12:56
  • (kernel) Kext IOUSBMassStorageClass.kext not found for unload request. Failed to unload IOUSBMassStorageClass.kext - (libkern/kext) not found. And for the load command IOUSBMassStorageClass.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
    – Ave Katten
    Mar 13, 2017 at 13:03
  • Ok, then with the full path Mar 13, 2017 at 13:07
  • I can see it can find it now. But now it says it cant unload because theres one instances using it
    – Ave Katten
    Mar 13, 2017 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .