Take the 2-minute tour ×

Let's say I have a mouse. I plug this mouse into slot 1 out of 4 on a computer. It goes through the new device detected and all of that, which is fine. But if I come back later with the same mouse and plug it into say slot 3, it does the detecting all over again! Why is this?

share|improve this question
And what can we do to fix it? –  Colonel Panic May 22 '13 at 11:02

2 Answers 2

up vote 43 down vote accepted

According to Raymond Chen:


You may have noticed that if you take a USB device and plug it into your computer, Windows recognizes it and configures it. Then if you unplug it and replug it into a different USB port, Windows gets a bout of amnesia and thinks that it's a completely different device instead of using the settings that applied when you plugged it in last time. Why is that?

The USB device people explained that this happens when the device lacks a USB serial number.

Serial numbers are optional on USB devices. If the device has one, then Windows recognizes the device no matter which USB port you plug it into. But if it doesn't have a serial number, then Windows treats each appearance on a different USB port as if it were a new device.

(I remember that one major manufacturer of USB devices didn't quite understand how serial numbers worked. They gave all of their devices serial numbers, that's great, but they all got the same serial number. Exciting things happened if you plugged two of their devices into a computer at the same time.)

But why does Windows treat it as a different device if it lacks a serial number and shows up on a different port? Why can't it just say, "Oh, there you are, over there on another port."

Because that creates random behavior once you plug in two such devices. Depending on the order in which the devices get enumerated by Plug and Play, the two sets of settings would get assigned seemingly randomly at each boot. Today the settings match up one way, but tomorrow when the devices are enumerated in the other order, the settings are swapped. (You get similarly baffling behavior if you plug in the devices in different order.)

In other words: Things suck because (1) things were already in bad shape—this would not have been a problem if the device had a proper serial number—and (2) once you're in this bad state, the alternative sucks more. The USB stack is just trying to make the best of a bad situation without making it any worse.

share|improve this answer
One thing I fail to understand is why it needs to reinstall device drivers all over again. Is it gonna maintain separate copies of drivers for the same device on each port now? –  Agnel Kurian Apr 7 '11 at 6:18
I'll take a wild guess that it's just associating existing drivers with the new port designation. –  Brian White Oct 1 at 17:26

Windows (as you don't state you OS I assume this is what you are using) associates a device with the port it is plugged into, so it considered "USB DISK A in port X" to be different from "USB DISK A in port Y" and it links up the drivers and registry entries accordingly.

If you use the "show unattached devices" option when viewing Device Manager, you will see the device attached to all the ports it has ever been plugged into but greyed out as it isn't currently in them. When you plug the device into one of these ports Windows will just activate that driver instance, when you plug it into another port it will need to define a new driver instance for that port before activating it (which is the process you see as a user displayed as "adding new device".

This allows you to have to identical devices plugged into different ports working at the same time. There are other ways to achieve this, with little or no practical difference to the end user which technique the OS uses, but that is how Windows chooses to arrange it.

share|improve this answer
Close, but not quite. Windows recognizes the same device across different ports, as long as it can track that exact device. To do that, the device has to provide a serial number. –  jasonh Aug 24 '09 at 21:25
Disks tend to actually have a serial number, its on the media itself and put there by format. Even the really cheap keyfob drive thingies are among the best behaved of all USB devices because of this. Mice, keyboards, joysticks, and other cheap devices tend to be the worst offenders. A real annoyance is a USB to RS-232 serial adapter without a serial number. It will get assigned to a new COM port name each time it is accidentally moved to a new port. Not fun. –  RBerteig Aug 25 '09 at 6:00

Your Answer


