I unplugged my 27" i5 iMac during a thunderstorm the other day. When I plugged it back in, my USB hub no longer charged our iPhones. It was dead.
This annoyed me, but the iMac is a few years old and that port has been well used. Perhaps I was just unlucky. Gradually though, I remembered that unplugging an intel iMac resets the System Management Controller (SMC). That's normally done as a fix for problems, but perhaps it can also cause them.
So I repeated the reset and my USB port works again. For the moment anyway, I wouldn't be surprised if it fails later.
USB ports aren't listed as SMC controlled in Apple's knowledge base article, but SMC reset (and, with less evidence, NVRAM reset) is a common folk therapy for bad ports. This article listed other things that may (or may not) benefit from an SMC reset:
- Erratic sleep mode performance, including not waking from or not entering sleep.
- Mac portables (MacBook, MacBook Pro, MacBook Air) not responding to lid opening or closing.
- Failure to respond to the power button being pressed.
- MagSafe power indicator not displaying or displaying incorrectly.
- Sluggish performance, even though Activity Monitor shows little CPU usage.
- Target Display Mode not working correctly.
- Battery not charging or taking excessive time to charge.
- USB ports not working.
- Bluetooth not working.
- Fans running fast.
- Display backlight not responding to ambient light level changes.