Why does my mouse/touchpad sometimes go berzerk?

Date:September 17, 2004 / year-entry #340
Tags:tipssupport
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20040917-00/?p=37833
Comments:    67
Summary:Each time you move a PS/2-style mouse, the mouse send three bytes to the computer. For the sake of illustration, let's say the three bytes are x, y, and buttons. The operating system sees this byte stream and groups them into threes: x y b x y b x y b x y b Now...

Each time you move a PS/2-style mouse, the mouse send three bytes to the computer. For the sake of illustration, let's say the three bytes are x, y, and buttons.

The operating system sees this byte stream and groups them into threes:

x y b x y b x y b x y b

Now suppose the cable is a bit jiggled loose and one of the "y"s gets lost. The byte stream loses an entry, but the operating system doesn't know this has happened and keeps grouping them in threes.

x y b x b x y b x y b x

The operating system is now out of sync with the mouse and starts misinterpreting all the data. It receives a "y b x" from the mouse and treats the y byte as the x-delta, the b byte as the y-delta, and the x byte as the button state. Result: A mouse that goes crazy.

Oh wait, then there are mice with wheels.

When the operating system starts up, it tries to figure out whether the mouse has a wheel and convinces it to go into wheel mode. (You can influence this negotiation from Device Manager.) If both sides agree on wheeliness, then the mouse generates four bytes for each mouse motion, which therefore must be interpreted something like this:

x y b w x y b w x y b w x y b w

Now things get really interesting when you introduce laptops into the mix.

Many laptop computers have a PS/2 mouse port into which you can plug a mouse on the fly. When this happens, the built-in pointing device is turned off and the PS/2 mouse is used instead. This happens entirely within the laptop's firmware. The operating system has no idea that this switcheroo has happened.

Suppose that when you turned on your laptop, there was a wheel mouse connected to the PS/2 port. In this case, when the operating system tries to negotiate with the mouse, it sees a wheel and puts the mouse into "wheel mode", expecting (and fortunately receiving) four-byte packets.

Now unplug your wheel mouse so that you revert to the touchpad, and let's say your touchpad doesn't have a wheel. The touchpad therefore spits out three-byte mouse packets when you use it. Uh-oh, now things are really messed up.

The touchpad is sending out three-byte packets, but the operating system thinks it's talking to that mouse that was plugged in originally and continues to expect four-byte packets.

You can imagine the mass mayhem that ensues.

Moral of the story: If you're going to hot-plug a mouse into your laptop's PS/2 port, you have a few choices.

  • Always use a nonwheel mouse, so that you can plug and unplug with impunity, since the nonwheel mouse and the touchpad both use three-byte packets.
  • If you turn on the laptop with no external mouse, then you can go ahead and plug in either a wheeled or wheel-less mouse. Plugging in a wheel-less mouse is safe because it generates three-byte packets just like the touchpad. And plugging in a wheeled mouse is safe because the wheeled mouse was not around for the initial negotiation, so it operates in compatibility mode (i.e., it pretends to be a wheel-less mouse). In this case, the mouse works, but you lose the wheel.
  • If you turn on the laptop with a wheel mouse plugged in, never unplug it because once you do, the touchpad will take over and send three-byte packets and things will go berzerk.

Probably the easiest way out is to avoid the PS/2 mouse entirely and just use a USB mouse. This completely sidesteps the laptop's PS/2 switcheroo.


Comments (67)
  1. Andy says:

    So what happens if you have a laptop which has a wheelie touchpad/track point (like IBMs where there track point becomes a wheel when you hold the blue button).

    I guess you can never hot plug in a non-wheelie mouse?

  2. pompo500 says:

    How do you know all of this stuff?

    Do you do some research when you get a question or do you just know the stuff already?

    You’re my hero man. O_O

  3. CesarGon says:

    Very interesting. I hot-plug and unplug my wheeled mouse from/to my touchpad-fitted laptop all the time and I never get the weird behaviour that you describe. Also, when the wheel mouse is connected, the touchpad keeps working, so if I inadvertedly touch it, the pointer will move.

    Why is that?

  4. denny says:

    I think some laptops may have better firmware that others.

    also I thought that at some point windows read the inputs and did some form of "averageing" of the data.

    example: mouse pointer "acceleration" is an example of the driver modifying the location based on a time-location-serize function.

    perhaps better drivers look for "Jitter" in the data and smooth it out.

  5. James Mastros (theorbtwo) says:

    Andy, it depends; there are two ways to implement such beasts. One is to always output like a "normal" (two button, no wheel) mouse, and take care of it with a special driver. The other is to output the "correct" wheely events. The former means that you have to load special drivers to get the extended functionality. The later means more complicated chips, and thus more expensive ones, and ones more likely to have problems that aren’t fixable in software. I think most touchpads use the first method, but I could well be wrong. In any case, the IBM one, with an extra button, sounds like it does the second.

    CeasarGon, I suspect your laptop doesn’t do things quite as described — it "Y"s the PS2 output internally, so both are alaways connected, and enabled. The touchpad just ignores the wheel negotiation, possibly. I know my laptop has a BIOS option that allows me to choose which to do. (I haven’t used an external mouse with it much — poor design decisions mean that plugging any but a very small USB plug in blocks any but a very small PS/2 plug, and I mostly use my laptop in bed, where a mouse would find little purchase.)

  6. Craig Thrall says:

    Wow, I’ve always wondered about this.

    Now, why does my USB mouse go bezerk on my new Dell? It’s a Dell optical wheeled mouse.

  7. timts says:

    most of the time it feels like driver bug instead of any hardware signal problem.

  8. Mike Raiford says:

    Now, why does my USB mouse go bezerk on my new Dell? It’s a Dell optical wheeled mouse

    Heh. I have the same problem with a similar IBM set up.

    Interestingly, I have a MS IntelliMouse optical at home (the one with 4 buttons+wheel) and I never have any problems with it going beserk.

  9. Victor Vogelpoel says:

    I sometimes find my mouse cursor starts ‘walking’ towards west-north-west and I don’t even have the touchpad ‘on’. I only had this with a thinkpad with the pointin’ clit.

  10. Gregg says:

    It is interesting how quickly and effectively the various lexicons of computer jargon adapt to situations where there isn’t a good word: wheeliness

  11. Centaur says:

    I thought PS/2 was not meant to be plugged/unplugged on the fly, and heard horror stories about how one little boy plugged a PS/2 mouse into a working computer and his PS/2 port instantly died a painful death… is it just that, horror stories?

  12. Raymond Chen says:

    The "wandering mouse-stick" is the stick recalibrating itself. If you touch the stick while it is recalibrating you are only making it worse. Just let it wander for a few seconds until it gets its bearings.

  13. I have occasionally seen Windows interpreting left mouse clicks and right clicks. It doesn’t happen that often but when it does it is quite annoying.

    On a slightly related note, I tried to convince someone from Microsoft that there is a bug in MFCs handling of mouse wheel messages. I am not sure if he admitted the code was incorrect but I think we came to an understanding! The thread is at http://tinyurl.co.uk/s3uw .

  14. Filip says:

    The W2K+ PS/2 mouse driver has an option to resynchronize with mouse HW state once in a while (MouseSynchIn100ns). Can’t it help in some of the outlined cases?

  15. Scott says:

    IBM’s solution on the latest T series: remove the PS/2 mouse port entirely. USB or bust (unless you buy the docking station).

  16. DrPizza says:

    Hot plug PS/2?

    ph34r.

    I’ve seen the magic smoke escape from a couple of motherboards due to (inadvertently) doing such a thing.

  17. DrPizza says:

    "The "wandering mouse-stick" is the stick recalibrating itself. If you touch the stick while it is recalibrating you are only making it worse. Just let it wander for a few seconds until it gets its bearings. "

    Where is this documented?

    The wandering stick is the only downside to the stick (they’re superior to trackpads in every way apart from this, and in fact I wish I could have one integrated into a regular keyboard for brief mousing tasks), and I’ve never seen its behaviour explained.

  18. Carlos says:

    For some reason I used to think that external SCSI was hot-pluggable. I only did that once.

  19. bramster says:

    Raymond: Is a PS2 Mouse plugged into a powered USB port extender treated as a USB mouse or a PS mouse? Fascinating!

  20. Bernard says:

    Good question, Craig. Mine is even stranger: let’s my XP laptop hibernates with any USB mice attached (I tried several makes/models, wheel, no wheel). When it comes back, if there is no USB mouse attached, the internal mouse slows down to a crawl. Nothing will make it come back to life, other than a reboot.

  21. Vince says:

    The original PS/2 connectors (ie, on the IBM PS/2 line) had no isolation diodes or resistors and yes you could fry the motherboard by hot-swapping.

    That was years ago. Most modern motherboards support hot-swapping just fine, and thre is actually in the specification a hand-shaking mechanism for hot-swapping.

    It’s still not a trivial thing to get right, when moving to the new input layer the Linux people took months of sorting out all the corner cases and there are still bug reports now and then from some of the more obscure combinations. It seems each mouse vendor implements different subsets of the specs.

    Carlos: yes, years ago my friend and I thought SCSI was hot-swappable too. You should have seen the look of horror on the face of an SGI-service tech when we did so in front of him when we needed to move the CD-ROM around.

  22. Ray Trent says:

    I designed one of the major notebook drivers for TouchPads, so here are a few comments:

    1) Some KBCs have quite unexpected behaviors around in this area (both good and bad). E.g.:

    a) Many KBCs that don’t just disable the internal device when an external device is plugged in try various shenanigans to try to merge the packet streams. This often ends up in disaster as Raymond discusses.

    b) There’s even one KBC that looks for the wheelmouse detection sequence, and pads the 3 byte packets from the internal device to 4 bytes by adding a zero "wheel" byte. Yikes.

    c) Some KBCs have a "kill switch" on them for the TouchPad. This can be done in a variety of ways, most of which have downsides.

    d) Those that follow the PS/2 Active Multiplexing specification from Synaptics, IBM, and Compaq don’t have any problems with this at all, because they can be put into a special mode by a driver where they mark each byte indicating which device it came from, allowing the driver to seperately detect up to 4 devices and route their bytes to different code modules.

    2) The PS/2 "bus", if I can dignify it with that term, is one of the most poorly designed architectures ever foisted on an unsuspecting public. Its only charm is that it’s cheap to implement. There are race conditions and other conflicts galore. One joke around the office is that it must have been designed by a summer intern from a 3rd rate college.

    3) Some drivers are pretty good about noticing that this out-of-sync condition has occurred and recovering from it. The MS driver isn’t especially great at it, but it tries. The one I designed (Synaptics’, if any one cares) uses a variety of hueristics to detect this condition, but because of #2, there’s no perfect way to do it. PS/2 doesn’t have an out-of-band packet synchronization mechanism, and every combination of 3 bytes can technically be a valid PS/2 packet.

    4) Notebook keyboard controllers are nasty little beasts. They used to be designed, programmed, and sold, by largely competant keyboard controller companies. Several years ago, all of these companies decided to, instead, start licensing out their firmware to ODMs instead. These ODMs, who weren’t especially knowledgable about KBCs, and especially about their not-invented-here firmware, then modified their keyboard controllers to perform numerous tasks unrelated to controlling keyboards. This proliferation of special functions started a downward era in the quality of KBCs. The most common example of this, which to be fair started back when the KBC vendors still controlled the code, is that KBCs typically perform battery management as well.

    5) To some degree, wheelmice are the culprit. If they had been designed to emit 6-byte packets (or any multiple of 3), this problem would be greatly reduced. It was well known at the time that many notebook KBCs played various games with that depended on being able to chunk up packets by counting out 3 bytes. I’m not saying that was necessarily a good idea…

    But since we’re on this particular blog :-), I thought I’d point out that wheelmice were a failure of the "Raymond Chen camp" that Joel Sapolsky talks about. They could have been much better designed for backwards compatibility. Part of this, if I recall, is probably due to MS having acquired this technology by buying a company called "Zoom", rather than developing it themselves.

    (BTW, OT: this blog doesn’t seem to accept submissions from non-IE browsers… at least Firefox doesn’t seem to work for me)

  23. Raymond Chen says:

    DrPizza: Trackpoint calibration is a well-known phenomenon. Google for it and it’s all over the place.

  24. DrPizza says:

    "DrPizza: Trackpoint calibration is a well-known phenomenon. Google for it and it’s all over the place. "

    If you search for the right thing….

    And knowing what it is makes it much easier to search for if you know what it is.

  25. Raymond Chen says:

    I didn’t know what the magic words were either when I began. I started with "mouse stick wanders" and that gave me a foothold into other keywords.

  26. "So what happens if you have a laptop which has a wheelie touchpad/track point (like IBMs where there track point becomes a wheel when you hold the blue button).

    I guess you can never hot plug in a non-wheelie mouse?"

    Andy, the third button on a TrackPoint does not turn it into a wheel mouse. It’s just a third mouse button, nothing more nor less. IBM has software that runs under Windows that provides the scrolling and magnifying functions with this button.

    If you open the Mouse control panel, go to the TrackPoint tab, and change the "Choose Scrolling or Magnifying Glass Function" to Neither, it disables this special behavior. Then use Spy++ to watch the messages being sent to any app, and you’ll start seeing WM_MBUTTONDOWN/UP messages if you click the third TrackPoint button.

  27. James Kew says:

    Hot-plugging ADB devices used to be a kiss of death to early Macs. I lost an SE/30 mainboard that way.

    I was going to ask whether the PS/2 protocol has any framing bits which would allow the mose driver to resynchronise (and if not, why not?) but Ray’s already answered that one in detail — good stuff!

  28. Chip H says:

    > The original PS/2 connectors (ie, on the IBM PS/2 line) had no isolation diodes or resistors and yes you could fry the motherboard by hot-swapping. <<

    The original PS/2 systems from IBM circa 1987 had a fuse on the keyboard & mouse ports. It was soldered to the motherboard (surface-mount device), so if you tried to hotswap and failed (i.e. blew the fuse), you’d have to replace a $1300 or more motherboard. Ouch!

    I believe that Compaq copied the IBM design exactly, but once the Taiwanese motherboard manufacturers got involved the fuse was dropped as being too expensive. Not sure what a failed hotswap will do to them, but at least they don’t cost $1300 to replace.

    Chip H.

  29. Eric Hodel says:

    I get random extra clicks with my logitech trackman and a dell/logitech rebrand, both USB on a Dell D600. Fortunately it hasn’t dragged and dropped any files into random places yet. I find it odd that the same trackball at home doesn’t have these odd clicks.

  30. Craig Thrall says:

    (BTW, OT: this blog doesn’t seem to accept

    > submissions from non-IE browsers… at least

    > Firefox doesn’t seem to work for me)

    Hmmm, interesting. FF 0.8? and 1.0PR work for me on XP.

  31. David says:

    I’ve never seen a motherboard fry due to hot-swapping PS/2 devices (RAM yes, PS/2 no), but I do have a Pentium Pro workstation board that hangs reliably when a PS/2 device is disconnected. It doesn’t matter what OS I’m running.

    Such a board does not go well with children or pets.

  32. Merle says:

    What about serial port mice? (or does anyone even remember those? ;-))

    My 2kpro workstation at work also loses the USB mouse after hibernate. Then again, the system control panel thinks there are problems with the USB driver (which is IBM’s own driver), so that’s probably part of the problem.

    We also have problems with KVM switches on some Dell systems where the mouse goes wild. It’s very intermittent, though: I would expect if it’s an xym-xym-xym sync failure that it would happen 2/3 of the time? I guess not, if it’s not a constant stream.

    Ray: posting from Opera 5 works just fine for me.

  33. Gene Hamilton says:

    What about serial mice? I have a laptop with no serial ports, but to connect my GPS I got a serial to usb adapter. When I have the GPS on and sending data then wake my computer from hibernation, the computer thinks the GPS is a mouse and the pointer flies all over the place.

    To solve this problem I would turn on the computer then connect the gps and then all was fine. I guess this is a similar issue?

  34. Keith Moore [exmsft] says:

    {Dusting off some long-dormant neurons…}

    Many years ago (1989) in a galaxy far, far away (Fort Worth, TX) I worked for Tandy’s R&D group, mostly drivers and BIOS code. Because I had written a serial mouse driver once, I was "selected" to write the PS/2 mouse BIOS code for a new Tandy computer model.

    IIRC, the serial mouse protocol is self-synchronizing. In each multibyte packet, the high bit of the first byte is set; it is clear on subsequent bytes.

    The PS/2 mouse protocol is, unfortunately, not self-synchronizing. I always wondered why this useful feature was dropped.

    Can anyone confirm this? I could be totally off-base here — I haven’t thought about mouse protocols in 15 years or so…

  35. quanta says:

    How about those? They are treated as native PS/2 mice, I presume.

    I hot-swapped PS/2 mice before…nothing fatal happened, but the system would invariably lock up nice and tight.

  36. Gene Hamilton says:

    If that is the case with serial mice; it would be interesting to see what the NMEA protocol (what the GPS sends over the serial) looks like.

  37. JoePS2 says:

    > One joke around the office is that it must have been designed by a summer intern from a 3rd rate college. <<

    Hey, I resent that statement. I designed the PS/2 port. OK, so yeah, it was during a summer internship at IBM in Boca Raton, and, yeah, I was a student at Ohio State, but still I resent that statement!

  38. Mark says:

    Test post using Firefox PR 1.0

  39. Jeremy Morton says:

    I have seen Microsoft optical mice suddenly jump the cursor down to the lower right corner of the screen when I would start moving them. I wonder if something similar was happening or if it has to do with the mouse misinterpreting the optical data. I have seen this happen on many different computers with many different MS optical mice.

  40. James Summerlin says:

    Raymond,

    Do you ever get the idea that some people are going to bitch and say it’s all MS’s fault no matter how much you explain why things are the way they are?

    On the other hand, I agree with pompo500, you ARE my hero.

    James

  41. anon says:

    Berzerk? Shouldn’t it be berserk???

  42. Mike says:

    For those that are interested, here is a link to detailed PS/2 mouse protocol information.

  43. Mike Dunn says:

    I have a KVM at work hooked up to two computers’ PS/2 ports, and when I switch between boxes the mouse freaks out. Now I know why. Although, after a couple of seconds it returns to normal, so something is re-syncing the bytes.

  44. slide says:

    Logitech used to make a certain ambidextrous optical trackball. Upon removing the ball from the device (usually for cleaning, although it would fall out if the device was knocked off the desk), any computer that the trackball was connected to (I used it in my test bed) would seize and need a hard reset. Was that just a bad driver? If so, has Logitech since cleaned up their act?

  45. Chris H says:

    I have seen Microsoft optical mice suddenly

    > jump the cursor down to the lower right corner

    > of the screen when I would start moving them.

    I’ve also seen this, very frequently, on my current machine with a Microsoft optical mouse. It really freaked me out, because the only other time I’d seen the mouse pointer jump around my desktop was when we had a machine that we’d tried and failed to lock down securely to be the machine in our flat which was connected to the Internet. One day, the mouse started veeeery gently to move around out of our control, and it got worse and worse until whoever it was took pity on us and opened a text editor to tell us we had a port open.

    The other mouse quirk I see regularly, on different machines with different brands of mice, USB and PS2, is that while playing a FPS shooter game – Unreal, Doom 3, Halo, Medal Of Honour, whatever – the view will suddenly jump either to 180 degrees up or 180 degrees down and spin rapidly. Most disconcerting.

  46. Not important says:

    Does anyone wonder why the protocol does not utilize any kind of synchronization in the first place?..

  47. Brad says:

    Optical mice often have trouble with reflective surfaces. Dell ships mouse pads that have tons of reflective sparkly bits. So if your Dell’s optical mouse is jumping into the corner of the screen, try using a non-reflective mouse pad, or no mouse pad at all.

  48. I wasnt aware so many had problem with mice lol. My Logitech works fine in XP and Linux, along with hot plugging it into a ps/2 on a HP laptop.

  49. Chris Becke says:

    While we are all ranting about mouse problems: mine is pretty unique. About 10% of the times I reset my PC windows doesnt detect my USB mouse. I have to unplug it and plug it in another USB port.

  50. Mine’s definitely not a problem from a reflective surface. It happens at home where I use the mouse on a wooden desk or my girlfriends wooden desk, and at work on that work surface [if you work at Microsoft, you know the type]. I think it usually happens right after the mouse has been sitting idle; maybe the light doesn’t quite come on quickly enough. It doesn’t happen very often, but often enough to be noticable, and it used to happen more when I first started using them, so maybe it’s a driver issue…

  51. if my PC is completly powered down (i.e. unplugging it, power failure, etc), the system wont recognize my MS USB Optical Intellimouse untill its removed and plugged back in.

  52. Justin Wood says:

    For those curious on my laptop I never experience any of these issue, though my touchpad itself has a left and a right button, and a scroll "button" (two buttons) for up/down, as well as I can run my finger along the far right of the touchpad to simulate a scroll-wheel.

    I can plug/unplug ps/2 mouses without issue. (wheeled and wheeless).

    For those curious, my computer is a Gateway (Model No. 600YGR)

  53. Centaur says:

    One more reason why PS/2 is weird… as far as I see, it’s about the only port that has two connector-compatible and protocol-incompatible devices, keyboard and mouse. For everything else, if you can plug it, it works.

    Another exception from this connector compatibility rule are speakers and microphones… but that’s based on a pre-computer convention.

  54. me says:

    It wouldn’t be to hard to recognise a pause between bytes as the separator though.

    The mouse only sends packets if it is used (moved or clicked), and even then it only sends them as fast as the configured sample rate. You can recognise the first byte by the silence between it and the last byte of the last packet.

    Also bit three of byte one is always on. In the other bytes it /could/ be on, but probably not in all packets, so you could skip bytes which do not have that bit set to try and synchronise.

  55. Vince says:

    Centaur:

    but the keyboard and mouse ports are compatible.

    PS/2 is basically just a serial interface, while

    the protocol is different for mouse and keyboard

    the ports are electrically identical.

    You can plug a keyboard into the "mouse" port or

    a mouse into the "keyboard" port under Linux and

    it will work. You can even have two mice, or two

    keyboards using the standard two PS/2 ports.

    Just because windows can’t handle something doesn’t

    mean the rest of the world can’t.

  56. Cooney says:

    Jeremy:

    > Mine’s definitely not a problem from a reflective surface. It happens at home where I use the mouse on a wooden desk or my girlfriends wooden desk, and at work on that work surface [if you work at Microsoft, you know the type].

    Betcha it’s the high frequency texture. Try using a printout of some text or something non-glossy.

  57. AndyB says:

    re: optical mouse jumping.

    It is definitely due to the mouse mat. I had a new optical mouse, and a very nice mat with pictures of some trees on it. Every so often the cursor would zoom off into a screen corner. I replaced it with a plain cloth mat, and everything has been fine since.

    I hear that logitech has come out with a laser mouse (instead of a LED) which has such a high resolution it will work on such surfaces (and allegedly wood grain) without jumping. http://www.logitech.com/index.cfm/products/details/US/EN,CRID=3,CONTENTID=9043

  58. Base note:

    > If you’re going to hot-plug a mouse into

    > your laptop’s PS/2 port, you have a few

    > choices.

    Yes, but here’s an improvement on all of the listed choices. Find out what kind of mouse emulation is provided by your laptop’s BIOS, and make sure that your external mouse matches. In every laptop I bought, the BIOS emulated something that wasn’t a basic 2-button mouse.

    9/17/2004 9:15 AM Carlos

    > For some reason I used to think that

    > external SCSI was hot-pluggable.

    Well if you’re using a laptop then external SCSI is usually hot-pluggable. Hardware-wise, the PCMCIA card can be pulled and you can turn off the hard disk, though you’re likely to lose data and corrupt your files. In Windows 95 and later, Windows 2000 and later, and Linux some-version and later, you can tell the OS that you want to disconnect the drive, it will flush the buffers, and then you can safely pull the PCMCIA card and shut off the hard disk. Yes even Windows 95 is safe with this operation, it’s only FDISK that commits massive corruption to them. But in Windows NT4 you can’t remove PCMCIA cards dynamically unless you have third-party tools.

    In fact for external hard disks connected by PCMCIA-IDE or USB it can be dangerous to have them connected when Windows 2000 or 2003 starts to boot. I should test it on XP as well, and should test it with PCMCIA-SCSI as well. If one of these Windows versions is already fully booted before connecting the drive, no problem. If the drive is connected first, then something early in Windows booting issues a false report of a consistency error and then Windows proceeds to a false correction, actually causing massive corruption, before continuing with the boot. In summary, your life (figuratively speaking[*]) depends on the ability to hotplug external hard disks.

    [* Maybe not figurative if you needed a backup of a medical database that used to be on that external hard drive.]

    There were several comments about hot-plugging PS/2 devices. Sure it works on some machines but, exactly as mentioned, not on other machines. Nonetheless, hot-unplugging is something that the user doesn’t always have control over. I hope the motherboard doesn’t lose its magic smoke just because the cable accidentally got pulled. Of course before plugging it back in you’d better use keyboard shortcuts to power down the machine.

  59. Mat Hall says:

    "Of course before plugging it back in you’d better use keyboard shortcuts to power down the machine."

    Assuming, of course, that the keyboard also didn’t get yanked out.

    I used to work in a university computer lab filled with PS/2s, and although we tried our best to make sure the cables were securely attached it was fairly common for someone to pull them out as they squeezed past, and for whoever was using the machine at the time it was a traumatic moment as it was guaranteed to lock the PS/2…

  60. Cooney says:

    Norman:

    > In fact for external hard disks connected by PCMCIA-IDE or USB it can be dangerous to have them connected when Windows 2000 or 2003 starts to boot. I should test it on XP as well, and should test it with PCMCIA-SCSI as well. If one of these Windows versions is already fully booted before connecting the drive, no problem. If the drive is connected first, then something early in Windows booting issues a false report of a consistency error and then Windows proceeds to a false correction, actually causing massive corruption, before continuing with the boot. In summary, your life (figuratively speaking[*]) depends on the ability to hotplug external hard disks.

    Is there any plan to fix this behavior in future versions? It occurs to me that combining a USB disk with a hard reset (say from a video driver bug or a hardware fault) could put you in a world of hurt.

  61. Norman Diamond says:

    9/21/2004 6:58 AM Cooney

    > Norman:

    > Is there any plan to fix this behavior in

    > future versions?

    Who are you asking?

    It’s interesting that Windows 98’s fdisk command didn’t create overlapping logical drives on SCSI disks the way Windows 95’s fdisk command did. Microsoft hasn’t admitted that such a serious bug existed in Windows 95, so how did it get fixed in Windows 98?

    I was really startled to see that Windows 2003’s boot-time disk checker started to duplicate the behavior of the one in Windows 2000. There was a patch for some related problem in Windows XP, which curiously enough had W2K in its filename but which did not work on Windows 2000. I didn’t do enough testing and actually am not quite sure if I can find that patch now. But it led me into a false sense of security, thinking that Windows 2003 wouldn’t have that bug.

    > It occurs to me that combining a USB disk

    > with a hard reset

    Or a soft reset. I forgot why I rebooted the thing, I was so relieved that I caught it in time. After the boot finished I ran a disk check and it seemed there was no damage. I have enough equipment to do some more thorough testing, but don’t have enough days to do it, and even if I prove it the odds are it still won’t get fixed.

    I made a very serious error on a somewhat related topic. In Windows XP, when removing a USB floppy drive I was getting blue screens of death. After all of my other experiences with removable drives, naturally I blamed Microsoft. And since BSODs yielded minidumps, I thought that maybe something could be done. But this turned out not to be Microsoft’s fault. A recent version of Computer Associates’ antivirus program installs a floppy disk driver without signing, without notice to the user (how do they evade that eh?), and without having been tested. CA has already provided a download for a newer version with that bug fixed.

    So Microsoft seems to handle removable floppy drives safely enough. But removable hard drives, you’d better be very careful and test everything with crash boxes before figuring out what is safe to do.

  62. mikeb says:

    Norman:

    > A recent version of Computer Associates’

    > antivirus program installs a floppy disk

    > driver without signing, without notice to

    >the user (how do they evade that eh?)

    If the driver is not installed using an .inf file, the signature check does not occur. So, the installation simply copied the driver file to the file system and wrote in the proper registry entries. Voila, no nasty warning.

  63. Tong Family Blog: Gigantic Fan — rich finds a nice quiet fan Industrial PCs — specs for hardened pcs Raymond explains mice protocols — more than you wanted to know. Via gadgetopia, Windows Process Library — another helpful directory of…

  64. troll says:

    Microsoft make good mouses. I cannot say the same about their software.

  65. Kaylani says:

    I have a unique mouse problem, if anyone is still reading this thread. My USB optical mouse gets stuck on a continuous scroll down when I log on. The only way to fix it is to stay logged on, go to "switch user," log on to another profile, then go back to my profile. That seems to fix it. It’s intermittent so I didn’t mind, but now my boyfriend’s computer is having the same problem and the switch-user-technique isn’t working for him. We’ve done spyware, virus scans, etc. and we can’t see any logical reason for the problem. Anyone know what this might be?

  66. meadowlark says:

    How about a Notebook where the left

    mouse button is intermittent ( sometimes you

    have to click it 5 times in a row to get it

    to work once, sometimes it works perfectly ).

    This is a Compaq Presario w2kP notebook where

    HP recently replaced the keyboard due to some

    keys that were intermittent (but now work fine)

    . Synaptics Touchpad driver version is 5.0.80.0

    from 6/20/2000 . Has anyone seen/solved this

    type of left mouse problem on a notebook ?

  67. dp says:

    Um, I think there is a known bug called "crazy mouse", which Dells have been especially cursed with. I have witnessed it many times doing PC support at conferences and on my own Dell laptops. My best inferences about it and from what I have read is that it is caused by the build-up and release of static electricity in/on/near the glide-pad. The fantastic thing about it is that any combination of clicks, right clicks and motions are possible, so sometimes it does highly specific things like opening a folder grabbing a file and deleting it, starting programs, etc. Most of the time it just moves stuff around though.

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index