Today I was asked to take a look at a computer, where the USB ports stopped working some time ago. The computer is quite old and still runs on Windows XP and as it is not connected to a network or the internet the loss of the USB ports is very annoying.
I took a look on the hardware manager, but all drivers seemed to be ok. USB drives did not work in all ports, but one port at least allowed to connect and use a printer.
As I had no better idea, I decided to use a old Xubuntu live CD to check whether it was a hardware or a software issue. Surprisingly USB drives automounted without problems. I looked at the dmesg output, and noticed a few error messages, looked them up on the web and found this blogpost. It mentioned defective hardware as a source of the problem, in particular the overcurrent protection.
I was not expecting it to make a big difference, but nevertheless I used a vacuum cleaner to remove dust from the motherboard. My hope was, that the problems were caused by creep currents or a short caused by conductive dirt or dust. Surprisingly that really helped, the problems were gone, all ports were working again.
So if you encounter random hardware behaviour, try cleaning up a bit.