|Try each external drive connected directly to a port built into the laptop. |
If that doesn't work check the physical condition of it's cord and that of the USB port it plugs into.
E.g. if the cord is damaged (common), wiggling the cord near the connector on an end may make it work / not work.
- check for bent contacts or pins in the USB port or plugs.
- check for a missing plastic blocking plug in the port and in the USB plugs if applicable (a small usb plug or port may not have one) - if that's missing the male USB plugs can be plugged in upside down, and doing so may fry the USB circuits for that port..
If the USB cords for the two drives are identical, try swapping a cord.
If nothing seems to be wrong with the cord or the ports, then you may have one of the rare laptops/notebooks that can't supply the standard max 500ma from it's built in USB ports (in that case it may work fine connected to a different computer, if the USB port plugged into can supply 500ma) , or the external enclosure's circuits plus the hard drive within it's current requirements totals more than 500ma, and you must use a USB Y cable or two cables, or if the external encolsure has a (usually) 1/8" jack, you could use an external power adapter plugged into that jack and one USB cable.
I found when researching external drives / empty external enclosures not long ago that more recent 2.5" IDE or SATA hard drives of any capacity draw 500ma or less (the external enclosures circuits draw very little) , but not long ago, some drew more current than that, if they had a greater capacity (empty enclosures info may say they're not for drives larger than xxx gb) - if the external drives with installed drives are more than a year or two old, or if the hard drive in the enclosure is more than a year or two old if it has been replaced or has been installed in a newer enclosure, the only way to get those to work properly if the hard drive draws more than 500ma is one of those solutions.
"Is there any software to test whether my USB ports are functioning properly?"
If there is I am not aware of it - but you should be able to figure that out by logically analyzing what you've already observed, and by the following.
"My computer seems to detect the USB 2.0 external hard drive for a few seconds but then it stops working and is not detected anymore."
That indicates the USB port is working and has either a poor connection or it can't get enough current.
""Windows keeps displaying an error message saying “Your device can perform faster”.
That indicates the USB port is working but only in USB 1.1 mode. You may get that message or similar for any device that is designed to work better with USB 2.0 support - e.g. flash drives, card readers - most mice and keyboards don't work any better with USB 2.0 support and you don't get such a message.
If you're still getting that message the USB 2.0 support has not been properly loaded. You probably need to load the main chipset drivers for your model in that case, and after that the USB 2.0 support should be loaded automatically, and you won't get that or similar messages from then on.
Even if the USB 2.0 support is not properly loaded, the external drive should be recognized fine, if the drive can get enough current - but it will have a slower max data transfer speed.
If anything works in directly connected USB ports, their controllers are working and are enabled in the bios whether you see a setting for that in the Setup or not (laptops often have minimal settings in them) - e.g. a mouse, keyboard, or flash drive require very little current; cameras, USB hubs or card readers, scanners, printers, and all in ones require more current; external hard drives require the max current. At least the ones that are not external hard drives should work fine in directly connected ports.
USB ports in USB hubs and in PCMCIA and ExpressCard USB 2.0 cards are another matter - it's well known not everything works correctly in ports for those.
If there is a problem with a USB connection not working properly
- in Device Manager - USB controllers the whole category will be opened up and one or more things will be flagged with an X or a yellow ! or similar
- if USB 2.0 support has been properly loaded, there will be an entry for an "enhanced" USB controller or similar there in the USB controllers list - if that has NOT been installed, the entry won't be there, and you MAY see an entry for an Unknown USB device there.
(RIGHT click on My Computer - Properties - Device Manager)