Turn off power to usb port mac

So my office is constantly lit up, it would be nice if I could write a script that would disable that specific USB port. Have you seen this thread and the code here?

How to keep usb ports powered during windows 10 sleep

Maybe shell could be used to "manually" rename the device ID or port to something odd that won't work, upon a specified event, then renames it to what it's supposed to be later. Another way of attacking the problem could be to add a USB hub to the system and connect the ambient lighting to that. That way you can control the lighting from a script. You will need to select a supported USB hub though. I used this method for controlling power under Linux - but the same method could also be used on Mac OS X.

What to do if Mac USB devices are not working

The USB hub was very cheap. This is something controlled by the hardware layer of the OS and involves far more work than it's worth. While similar scripts exist for Linux, you must keep in mind that even though OS X and Linux are distant cousins, OS X wasn't built for such fine-grained control over its components like Linux was.

How to Reset MacBook Pro USB Ports

Sadly, the only options you have in this case is to unplug the device or completely disable the USB interface. That last one, of course, isn't feasible for you, so unfortunately, there's no solution to this problem. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. How to disable individual USB ports by script? Ask Question.

Asked 7 years ago. Active 2 years, 8 months ago.

Your Answer

Viewed 9k times. JamiePatt 3, 2 2 gold badges 14 14 silver badges 33 33 bronze badges. Elliott Elliott 1 1 gold badge 1 1 silver badge 13 13 bronze badges. Hey I have looked at the recommended thread but the code specified is no longer available on the apple site. Unplug connected USB devices if the ports are still not working.

Restart Applications and Computer

Restart your computer again, and then reconnect the USB devices. Shut down the computer if you don't see one of your USB devices in the device list. Turn the computer back on. Hold the "Command-Option-P-R" keys together before the gray screen appears until you hear the startup sound for the second time. Release the keys. Click the Apple menu and click "Sleep.

How to switch off power to USB ports when… - Apple Community

Restart your computer. Click the Apple menu and click "Shutdown" to turn it off completely.

If it isn't shutting down, hold the power button for at least 10 seconds to force it to shut down. Unplug the power cord, wait 15 seconds, and then reattach the cord. Wait at least five seconds, and then press the power button to turn on the Mac. Kefa Olang has been writing articles online since April