There is also an internal cable that connects the case-mounted socket to the motherboard. I once solved an intermittent USB port problem after discovering the cable was not seated properly.
This ^^^^^
Another thing that can cause it is hidden device references causing conflicts with currently active drivers.
To find out if you have a load of those interfering with your current (software) driivers, do this:
Open a Command Prompt window. Copy and paste this text into it.
set DEVMGR_SHOW_NONPRESENT_DEVICES=1
start devmgmt.msc
Press Return.
Then from the View Menu in the resultant Device Manager select Show Hidden Devices.
Check for any 'greyed out' devices under USB controllers 'right click' on any of those and select uninstall for each greyed out entry. Do the same for hidden devices under 'Human Interface Devices', 'Keyboards' and 'Mice and other pointing devices'.
Also check 'Sound video and game controllers' but don't uninstall any of the greyed devices in there unless you know they relate specifically to any old audio interfaces you no longer use or they are just duplicated old TonePort drivers. Leave any Microsoft entries alone.
Reboot afterwards and check again to see if everything is working OK.