Why doesn't Windows recognize a USB device plugged into another port? (2004)
blogs.msdn.com
blogs.msdn.com
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?
Now, I can't really remember when I first came across an usb device -- but I also can't remember them ever causing me trouble in Debian.
My issue on the other hand, is that it keeps asking to "scan and fix errors" when you plugin thumb drives if you take them out without using "eject" first.
Unplugging an idle drive should never lose anything.
But there's a lot of flaky hardware out there.
Users aren't especially great at knowing when their drives are idle. This has honestly been true since we moved on from loud floppy drives.
That's completely wrong. If it were workable, that's how these things would have always been set up. We've got good reasons for not doing things this way.
> have the icon in the tray turn red when there is unflushed data in the cache
There's a lot more to worry about than data in the cache. Open or locked files are an issue regardless of whether or not the cache is empty.
> turn green when you can safely pull the drive
We have almost got this now, with the icon that indicates whether it's safe to pull the drive or not. The difference is that you have to unmount the drive manually to get the friendly "all clear" indication. (a lot of times it won't really matter if you pull the drive while it's mounted)
You could add a process to automatically unmount the drive, but simultaneously provide some kind of virtual drive such that applications could seamlessly remount it and use it. You've then got the possibility that an app will start using it in the moment between when you look at the screen to verify it is safe to pull the drive and when you pull the drive. To make THAT error go away you need to add a request to the user to put the drive back in...
> Then, in the case where another write starts up just before you pull the drive, give you the ability to plug the device back in to let the data flush to it (after the OS check the volume ID of course).
Of course it's not just writes, there are also reads to be contended with.
Anyway, after seeing a few of the new "Not ready reading drive A Abort, Retry, Fail?" error messages, people are going to wonder why your new feature is fucking with them.
A new write is possible but unlikely if the user is done with the drive, and again shouldn't cause major damage.
The blinking light does precisely what it advertises. That's never really been the issue.
Damage certainly is unlikely if the thing is pulled while mounted. I wouldn't design the UI around that, though.
I can somewhat excuse losing data if things go wrong during a save. At any other time it should be robust enough that my data is safe.
This is not just about unplugging drives, this is a general sanity measure.
I ended up needing to use some low level tool from a USB drive manufacturer's website to get it working again.
You can ruin entire filesystem, because not only file blocks are cached, but filesystem blocks too.
If you still do not want to eject the drive beforehand, turn on Optimize for quick removal option (should be default for flash drives now). You will lose write cache though (the write performance will be drastically worse).
This is not an issue for modern filesystems, but most USB drives are formatted with FAT, which has no journaling or other defences against such issues. You could minimize the risk by doing synchronous writes to the drive, but that'd also incur a _very_ big performance penalty.
Also it gets triggered by the dumbest of things, eg my linux laptop does not unmount it in a way that windows 8 consider good enough. At the very least windows itself could/should "clean slate" (aka unmount remount I guess) the thumb every once in a while if there has been activity followed by no activity and no opened descriptors for a few minutes since that would cover a majority of the cases.
I'm sorry for that other issue. How does Windows complain exactly?
In a geologic time scale at least, I believe that was actually a "new feature" some time after Windows Vista and maybe even after 7.
Try pulling out a mounted ext4 drive on Linux, it will also be marked dirty and request fsck.
That's not exactly true. That only happens if the NTFS volume has a dirty bit set. That happens when you corrupt something and some check fails. I pull drives in and out all the time without ejecting and almost never see the error you mention.
If you pull the drive when there's a write going on, then you'll activate the dirty bit and get that message.
It does get you into the habit of ejecting the drive first
Also, many removable drives don't have a partition map.
Said as a driver writer who always commits blocks on an activity one-shot.
This is actually one of the few areas where linux is significantly superior to windows from an average "destktop" user's perspective. For instance getting PS3 controller to work on windows is (used to be?) very painful. On linux I plug it and it just works. Same for network-over-usb "RNDIS" devices but that might be more of a niche.
Windows XP was published in October 2001. The latest Service Pack (SP3) was published in April 2008.
RHEL 6.2 was released in December 2011. So even the latest XP release is 3.5 years older than RHEL 6.2 (which does recognize USB drives quite fine).
(I was actually thinking that if the comment were referring to RH prior to RHEL, we were talking of a version that was still using a.out binary format, but that was not so, I was off by some three years, it came in RH3).
Drag a file onto an application in the taskbar (as you would with a Dock icon in OS X), and it doesn't just fail to open it in that application—it actually gives you an alert saying "you can't drag things onto the taskbar" or something like that.
So they built in the ability to tell people they can't do it, instead of building the ability to actually do what people clearly already wanted to do. Classic Microsoft UX.
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.
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).
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.
Remember, due to vendors producing devices which share IDs with different devices, Windows can't assume that a device on a different port reporting the same device ID is the same device or works with the same driver.
(Although I still prefer the old rules of setting PCI and PCIe identifiers based on address. It's only for USB that it does not work.)
Uh I mean it's a solvable problem, even if they didn't solve it.
He still uses Windows to this day, I guess we value different things as important in our OSes. :)
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.
http://askubuntu.com/questions/477370/ubuntu-14-04-boots-to-...
http://ubuntuforums.org/showthread.php?t=2080918
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.
FWIW, Windows has been mostly painless for me, except for the ridiculously bad command line UI, and my last experience with Linux on the desktop was a circus of weird problems.
This... I welcome that they are improving it a bit on W10 but it's not nearly as good as in Linux. (Cmder does a decent job though)
Hell, Elementary and Mint seem like the first really usable desktops I'd even come close to recommending (No, grandma has no idea how to even begin using the GUI Ubuntu ships with now). It took us how many years to get here? 20+? While the whole time Apple and MS had easy to use GUI's and stable OS's that just worked.
Desktop experiences are a lot harder to perfect than we give to credit to. I wish more people understood that.
I'm still waiting for the year of linux's desktop. That's not the case with the server though. I really love the linux's server experience more than windows and osx. There is one thing that Linux really got it right and it is the terminal experience.
This is the funny part too, because for me the same happens with Windows. I can't invest the time to learn the new Windows (I left at Windows XP). Once I spent half an hour on Windows 8 trying to find out how I shutdown the machine! I even opened windows help! Another time I spent as much time on Windows 7 trying to make file extensions visible.
I was applying a security patch and give me something like this (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1416849)
And was literally a morning... not a 5 min update and reboot.
>doesn't invest that money in making a secure OS.
All OSs need to do regular securities updates, even "secure" OSs (remember Heartbleed?, CVE-2015-0235(Ghost) ?)
furthermore, the linux OS's don't have 370 billion dollars backing them up. their limitations are truly techinical, not greed.
Which driver was that?
If it was the nvidia proprietary driver then there are ways of installing the driver so it rebuilds the kernel module to avoid all that.
The arduino though only uses a USB to Serial converter, nothing fancy.
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)
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.
(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/FIXEDBlueScreenOfDeathBSOD7EIn...
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.
...I'd find that so annoying I'd be trying to find the root cause using the information in post above yours. Each to his/her own.
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.
"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."
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.
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.
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.
Edit: Corrected the maths, thanks Syi.
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
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.
Layout changes, testing, assembly (even if automated) etc?
/Got it working once, for an afternoon.
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.
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?
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 :-)
I have never been more stumped and ended up reformatting (which I had been wanting to do anyways to move to a 1TB ssd)
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.
Inserting a kernel module is fast. What else would you need?
Uh, I'm not sure what you mean here. Care to explain how Linux does not have to deal with the 'real world'?
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."
http://blogs.msdn.com/b/oldnewthing/ 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