11 ms·
Why doesn't Windows recognize a USB device plugged into another port? (2004)
- tripzilch 11y agoSo it's because some USB devices might report the same ID and Windows doesn't want to accidentally confuse one for the other, right? What would actually need to happen for this to go wrong? You'd need two different USB devices, that are not only cheap/bad (using a non-unique ID), but they'd have to just happen to actually share the ID as well. Isn't that a rather unlikely thing to happen? Unless many devices report a very common ID such as 0, or something. Then, I'd have to unplug one device, and plug in the other into a different port, and what would happen is the OS would try and "talk" to the device using the wrong driver, yes? But, given that Windows doesn't go through the whole "installing new device" spiel if you plug the same device again into the same port ... what if I would unplug that device, and then plug the other device (that reports the same ID as the first) into that same USB port. Then Windows would still get confused right? So the problem isn't even really solved, at all. It just makes it slightly less likely to happen (by a factor of your number of free USB ports). Okay so that is one thing. But then, from what I read in this thread, I get the idea that Linux in fact does consider devices with the same ID to be the same device, regardless of port (correct?). So, in Linux you'd run into this problem? Has anyone ever actually experienced it? Because I certainly haven't. And then there's the part that, if the problem occurs, you'll figure it out real quick, because it only happens right after you plug in this new USB toy that you recently bought, on the cheap. That's not too bad, is it? I bought a €1.50 USB-hub a while back, noticed my keyboard and mouse started acting glitchy, didn't take a second to figure out it was probably that cheap thing, and threw it out.
- agumonkey 11y agoSometimes linux usb stack is stateful too. I have some ghost /dev/sd* nodes hanging. Also some embedded devices usb chipset is bogus, causing duplicate descriptors and duplicate devices (one being DOA).
- SG- 11y agoSmall things like this is what starts bothering me about Windows (they add up). The 'Found New Hardware' wizard will also come up each time you plug it in a different USB port (along with the annoyances that comes with).
- LoSboccacc 11y agoand (until recentest version of windows) you will get a copy of the same printer according to each usb port, with all the others showing up as disconnected.
- SG- 11y agoYes along with USB network adapters (you lose whatever settings you set). Just a pain and not what anyone would actually want.
- Jgrubb 11y agoHa, I forgot about that. It was a hundred (thousand?) little things like that that ran me into Mac's loving arms seven years ago.
- edoloughlin 11y agoI'm sure these little niggles accumulate easily when your devs never have the equivalent of the "Steve's gonna kill/fire/humiliate me if my code ever inconveniences him" thought at the back of their minds.
- Jgrubb 11y agoAnd god bless him for that.
- lucb1e 11y agoIt's not a hardware thing though. Linux systems work with USB devices instantly, as soon as you plug them in, without any installation phase. That makes it a software thing Microsoft did wrong.
- TazeTSchnitzel 11y agoLinux systems work instantly because they only have to support one (usually sorely lacking) driver for any device ID, and if this is a problem, don't need to prevent a friendly user interface to fix it. They don't have to deal with the real world.
- lucb1e 11y ago> They don't have to deal with the real world. Uh, I'm not sure what you mean here. Care to explain how Linux does not have to deal with the 'real world'?
- lorenzhs 11y agoLinux distinguishes devices by their manufacturer and device ID and loads the driver that matches most specifically. There are plenty of drivers for specific mice, and the correct kernel module is loaded automatically (via udev). The generic driver (hid-generic) matches all HID devices (mice and keyboard) and provides basic functionality for all such devices. Inserting a kernel module is fast. What else would you need?
- Dylan16807 11y agoOf course this isn't the only way it could have been done. Settings could have optimistically traveled from port to port until the system saw two at once of the same device with either no serial number or the same serial number.
- chinathrow 11y agoWow, I wonder if that still is a thing?
- Joona 11y agoSure is. Just plugged in my USB sound card again yesterday, different port I suppose, and the settings reset.
- chrisan 11y agoI had the unfortunate experience where my Win7 would not recognize ANY new usb device. I had my keyboard, mouse, and n52 from years of use. I could freely swap them to all of my usb ports and they would still work. However the moment I tried any NEW usb device (like a new mouse or game pad) it would never recognize it. The devices worked on other Win7 computers and my Mac. I have never been more stumped and ended up reformatting (which I had been wanting to do anyways to move to a 1TB ssd)
- mdip 11y agoI've seen this behavior from time to time. The fix for it was pretty awful, as well. Under "System Devices", I'd locate the parts of the chipset associated with USB and PCI, find the driver the OS was referencing and remove the files associated with that driver from wherever in the OS they were being grabbed[1]. Then I'd download the chipset drivers from the chipset (not motherboard) manufacturer and install those. The problem always went away after that step, but often took several reboots to get everything exactly right for the new drivers. It seemed to happen most commonly in Windows XP with motherboards that were Intel based and had USB 2 controllers with third-party (I want to say Realtek[2]) USB 3 controllers. At the time, Intel had no chipset that included a USB 3 controller so motherboard manufacturers would use a non-Intel controller for the USB 3 ports and the Intel controller for the USB 2 ports. It's possible my problems were simply an artifact of working with USB 3 devices that were bleeding edge and not implemented exactly right, but in all cases replacing the chipset drivers with the ones provided by the chipset folks did the trick. Doing the same with the ones provided by the motherboard manufacturer (often ASUS for me) would result in the same behavior. [1] The best way to do this, I've found, is to remove the files associated with the broken drivers and reboot. Once they came up as "Unknown Devices", I'd proceed with the installation of the drivers I grabbed from Intel/Whomever. If the device was detected properly -- in the case of this specific problem -- the new driver would be skipped in favor of the one provided by the motherboard or the Windows installation. [2] I may not have this right. I tend to jump to Realtek when I think about devices I've had terrible experiences with. Their network adapters that seem to be included on a lot of lower quality motherboards have given me so many problems that I no longer purchase boards with them installed and if I have no other choice, I'll buy an Ethernet adapter from someone else and use up one of my PCIx slots just to avoid their drivers.
- gbl08ma 11y agoThat, and Windows also seems to create a different network connection profile for the same wireless adapter, every time I plug it into a different USB port. I always end up with something like "Local Area Connection 4" just because that's the fourth different port I've connected it to. Other operating systems do not seem to suffer from these problems as badly, and this MSDN post is from 2004 (three major Windows versions, soon four, will have been released since then), so does anyone know what are the current roadblocks to getting this behavior changed? As someone else said, these kinds of annoyances add up (you really notice them better if you frequently use other OS).
- TazeTSchnitzel 11y agoWhy would you want the behaviour changed? If the device has no serial number, acting differently depending on the port is quite important.
- gbl08ma 11y agoUnfortunately I don't have two devices with the same ID and no serial number to test, but assuming Linux et al deal with them correctly, there sure must be some way? I guess Windows could resort to using the bus/device number information only when there is no other way of distinguishing between two devices (serial number, USB PID/VID...). The impression I get is that when Windows executes the "Found new hardware" thing, it installs (usually from Windows Update, if the setting is enabled) the drivers, but it's as if the drivers were installed for that USB port only... it appears to install the driver again and again as I move the device to other ports. This is not the way Linux deals with device drivers (once a driver exists in the kernel or is available as a kernel module, it works irregardless of the port), and as far as I know on OS X and BSD kernels it's similar.
- joesmo 11y agoYes. The post might explain why the device is popping up as new, but it doesn't explain the reinstallation of an already existing, installed driver that's identical because it was just installed a minute ago when the USB device was on a different port.
- kristopolous 11y agoThis is an MS site? Honestly, I'm liking this no-bullshit thing MS has been doing lately.
- krig 11y agoThe post is from 2004. This no-bullshit thing isn't exactly new. :)
- LoSboccacc 11y agoyou could always find non bulshitting ms people around: http://blogs.msdn.com/b/oldnewthing/ http://blogs.msdn.com/b/oldnewthing/ http://sortingitoutv2.wordpress.com/ http://sortingitoutv2.wordpress.com/ < this was on MSDN and moved here, most old content disappeared and is available trough archive.org MS is so big, hard to judge by a handful of individuals either ways
- danielsamuels 11y ago..and by lately, you mean 11 years ago.
- sveiss 11y agoRaymond Chen's blog in particular has been well worth reading for insight into why MS has made some of the crazy-seeming technical decisions it has for well over a decade now. A lot of them boil down to "incredible contortions to support applications written years ago to which the source code, and probably the original developers, are no longer available."
- krig 11y agoI have not only this issue with windows, but on my gaming machine, unless I unplug my Microsoft-made keyboard when booting, the OS blue screens [1]. Of course if I then don't plug it back into the same USB port as before, it will reinstall the drivers... (I also find it amusing that this happens with devices made by Microsoft themselves; you'd think they would make sure it worked, wouldn't you) [1]: http://www.hanselman.com/blog/FIXEDBlueScreenOfDeathBSOD7EInHIDCLASSSYSWhileInstallingWindows7.aspx http://www.hanselman.com/blog/FIXEDBlueScreenOfDeathBSOD7EIn...
- stinos 11y agoNever had that problem here; maybe it's some of the intermediate hardware, or the ocmbination thereof with the keyaboard, which is the actual culprit?
- krig 11y agoThe same computer and hardware runs both Linux and Mac OS without issues, so if it's some other piece of hardware, Windows is the only one choking on it. And it only manifests when the Microsoft keyboard is plugged in. So yeah. Sure, possibly it is some other piece of hardware in combination that is exposing brokenness in the MS USB drivers. But that doesn't change the fact that the software is the problem here.
- pmelendez 11y agoWell the problem is the driver and likely Linux and MacOS are treating the keyboard as a generic device. Have you tried forcing windows to use a generic drive for the keyboard?
- UnoriginalGuy 11y agoYou may wish to enable kernel dumps, reproduce the BSoD, then install Debugging Tools for Windows. Now spin up WinDbg and inspect the kernel dump to see what is really causing this. Looks like a corrupt Windows install to me, but you'll know more after WinDbg. Scandisk (with fix bad sectors) and the Windows memory checker might also reveal how the OS became damaged.
- pmontra 11y agoThe thread is from 2004, it should go into the title. I've been using Windows XP until January 2009, then I reformatted my laptop with Ubuntu. One of the first things I noticed was that it instantaneously recognized pen drives without going through all that found new device dance. OS X is also fast at mounting USB drives. I just can't understand the technical reasons that make Windows annoy people with that. Is it still the same with Windows 8?
- mavroprovato 11y agoTo be fair, newer versions of Windows are much better in autodetecting devices when compared to XP.
- jebblue 11y agoI consult a lot which means I often have to use a Windows desktop because the IT staff needs it to run Office for people who only know one email client. I mostly work in Linux usually in a VM in these case. To you point, on a new machine designed to run Windows 7, 3 times in the past few months I plug in my external keyboard and it fails. The only resolution is to reboot the windows machine. At least once I've had my USB headset fail, had to reboot Windows. In the past year on a different machine also designed to run Windows I could not get it to detect my Android phone while my Ubuntu desktop has never failed on 3 different machines running Ubuntu. When people say in any thread that Windows driver support is superior to Linux; the answer from my experience on a number of machines is still no.
- sudioStudio64 11y agoXP came out at the same time that Redhat 6.2 was out. I wonder how it recognized usb drives?
- pmontra 11y agoI've got a Redhat 6.2 CD. I wonder if it installs on some old laptop of mine but don't wait for news anytime soon :-)
- mclemme 11y agoOn a related note, I got weird behaviour once I switched to an SSD on my Win7 gaming machine, now it boots so fast into the logon screen that the keyboard doesn't work until 2-5 seconds after the logon screen appears. I'm wondering if it has something to do with the OS not recognizing my keyboard, although I always have it plugged into the same USB port.
- vetinari 11y agoI'm using laptop with external keyboard and mouse, connected via hub. After waking up the laptop from the sleep, the keyboard does not work for a few seconds (so no entering password at the lock screen). The mouse does work, though.
- joosters 11y agoInteresting comment in the discussion after the article: Chips with unique serial numbers cost $0.76 per 1000: http://www.maximintegrated.com/en/products/digital/memory-products/DS2401.html/tb_tab0 http://www.maximintegrated.com/en/products/digital/memory-pr... I never realised they could be so cheap (and in bulk, much cheaper). At those kind of prices, every device could have a unique ID.
- yitchelle 11y agoLooking from the OEM's perspective, if they didn't need to add the Maxim part to BOM, it gives them a better profit margin. If the OEM manufactures 1,000,000 USB devices, that could result in a extra profit of $760, (Based on the back of envelope calculations). Edit: Corrected the maths, thanks Syi.
- Syi 11y agoYou've added a few too many 0's to that, the savings for 1,000,000 USB devices would only be $760 which would definitely be worth it for customer satisfaction.
- yitchelle 11y agoYou are right! I think I will blame it on Friday-itis.
- cnvogel 11y agoOne should make it clear that the quoted price on the Maxim product page is $0,76 @ 1000, so if you order 1000, you pay 76cent per chip. But you can easily find offers going down to about 50 cent. https://octopart.com/search?q=DS2401%2B https://octopart.com/search?q=DS2401%2B As the DS2401 uses the 1wire bus, which requires a relatively complicated logic inside the chip handling device isolation and power recovery from the data line, it's not the cheapest option. Maxim, for example, has a SPI connected digital serialnumber chip going down to 35 cents. https://octopart.com/search?q=25AA02UID https://octopart.com/search?q=25AA02UID These chips all come in small SOT sized packages, if you really want to shave off the last cent the companies will be happy to sell you the bare dice you glue on your PCB, bond with wires directly to the board and protect with a glob of epoxy. Also: if you are going to build 1 million devices you'll not pay the standard list-prices but your procurement department will negotiate with high-volume sellers or the chip manufacturers directly. So, you'd probably pay around half. But then.... if you are going to build 1 million devices you really want to have individually numbered, you might not use the off-the-shelf USB controller without serial number plus a 20cent serial-number chip, no, you'll redesign to use a 5cent more expensive usb-controller with unique serial number, and leave out the external serial-number chip completely.
- linker3000 11y ago...closely followed by "why after 3 days of on/off trying can't I get my bluetooth headset working under Windows 8.1" /Got it working once, for an afternoon.
- mdip 11y agoI noticed this behavior in early versions of the Windows 20xx family, but I found a consistency to it that wasn't mentioned in the article and now I'm left wondering if I was completely wrong in my assumption. In my case any USB version 2 device would be detected as "new" if it was plugged into any port other than the one it was first plugged into, however, all of my version 1 devices would work without Windows "forgetting about them" when they were plugged into another port. Does anyone have any insight on this? Did manufacturers supply a serial number more consistently with early version devices or was it just my (somewhat massive) collection of those devices that was at fault?
- noja 11y agoWhy does Linux?
- andmarios 11y agoFun story. Once I helped a friend with his Arduino code. I program the Arduino on his Windows PC and remove it. There were still issues, so we had to program it once more. “Great” he says, “now we have to reboot”. “Why” I ask and he replies “these are windows man, they aren't like your linux machine”. In disbelief I connect the Arduino to the USB port but indeed, Windows fail to detect it. Trying to be smart, I pull out his usb mouse receiver and swap USB ports with the Arduino. The PC recognizes it and I feel triumphant. “Now you've done it” he says, “we have to reboot if we ever expect Windows to recognize this mouse again, you don't just move things between USB ports in Windows”. He still uses Windows to this day, I guess we value different things as important in our OSes. :)
- pmelendez 11y agoWell that's an odd problem and not usual at all (at least not for me and my 4 Windows machines). However, my main computer in my last job was an Ubuntu machine (A Dell with hardware linux-friendly components) and the amount of oddities weren't even funny. (Like having to uninstall your video driver before update to avoid losing a morning making boot again) I guess we value different things as important in our OSes.
- andmarios 11y agoWell, the problem you describe is an odd problem and not usual at all (at least not for me and my 4 Linux machines). ;)
- pmelendez 11y agoIt is not that unusual: http://askubuntu.com/questions/477370/ubuntu-14-04-boots-to-black-screen-after-upgrade-from-13-10-no-display-proble http://askubuntu.com/questions/477370/ubuntu-14-04-boots-to-... http://ubuntuforums.org/showthread.php?t=2080918 http://ubuntuforums.org/showthread.php?t=2080918 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/399821 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/399821 We have that problem at the office very frequently, somebody got it first then lose a morning figuring out a workaround and then that person tells everyone else. My point is... this weird things with drivers happens in every OS (OSX included). After been working with Windows, OSX and Linux at work in different stages of my life, my conclusion is that at least for me, any choice of an OS is about personal taste.
- raverbashing 11y ago". They gave all of their devices serial numbers, that's great, but they all got the same serial number" Yes, there are functioning adults that work in technology that don't understand the concept of a serial number Source: was very glad of not making 'serial number' of a certain product in a database the primary key, when repeated serial numbers started to arrive (it was not our responsibility to generate those numbers)
- jessaustin 11y agoISTM that primary keys should be completely internal to the DB. You can always add another column with a unique index, if someone lies to you that any particular datum is unique. Then when dupes roll in like they usually do, you can just drop the index. A great frustration of mine in a previous job was that a predecessor had informed the accounting department of internal keys used for a many-to-many relation in the configuration of a process that journalled transactions from the billing system to the accounting system. That meant I could never reconfigure the janky-ass, inefficient way that journaling was set up, because the accountants knew how it should be.
- Aardwolf 11y agoGive it any explanation you want, in Linux I can plug in 3 mice in 3 different USB ports and they all work immediately without any "recognising and configuring", so it should be technically possible for Windows to also have it work immediately.
- smilekzs 11y agoHave you actually tried plugging them when running Windows? They might actually do okay.
- deleted 11y ago[deleted]
- cabirum 11y agoYes, but then you realize you cannot make mouse back-forward buttons to work.
- hackmiester 11y agoI'm a little confused on this - my G500 "requires Windows drivers" but this functionality worked out of the box on Linux.
- cabirum 11y agoDepends on the distro, I guess. The last time I checked these buttons were not enabled by default on Fedora. Ubuntu probably has more sane defaults.
- anon4 11y agoMicrosoft really picked the wrong abstraction here. They wanted it so that each device can be separately configured and known, implementing a system that can support if you plug ten devices that are exactly the same, but want them configured differently. Whereas on linux, it's more like "if I plug in a logitech xyz mouse, I want it working like so". Ultimately, I think not even power users have much use for this behaviour being the default, but it's too late to change it on Windows. Maybe if they let you define a set of devices for which you WANT settings to be keyed by port+device, whereas the rest you want keyed only by device type.
- zx2c4 11y agoNugget of wisdom from the comments: "Device manager hides devices that are no longer connected, even when "Show hidden devices" is on. The workaround is to set an environment variable DEVMGR_SHOW_NONPRESENT_DEVICES but this is one of those tips thats not widely know and it can get frustrating trying to fix problems."
- stephengillie 11y agoWin7/8 actually stop installing a device driver when the device is removed. This is especially frustrating when you've got an intermittent connection on a USB device; Windows begins device discovery, then aborts, begins again, aborts.
- Learn2win 11y agoNot just windows; it acts that way on my Mac as well
- rootuser 11y agoBecause Microsoft does not know how to write code.
- valisystem 11y agoI don't see why this could not have been done in a invisible fashion for the user.
- kabdib 11y agoMany USB devices over time also starts to fill the registry with . . . stuff, leading to more slowness and instability as the system ages. WTF. I found out that for a few years I sat next to the guy largely responsible for this behavior. I had no idea. Not that I wanted to slug him, but, but . . . argh :-)