Until Windows 7, mouse handling in Windows has been subtly broken in some ways, and it has taken Microsoft 8 years to fix those problems.
You can fairly easily see these problems (in Vista and XP).
They appear when the Mouse Properties 'Enhance pointer precision' option is turned on (* Note).
In a previous blog I wrote about one of the problems: mouse pointer DPI scaling is wrong in Vista and XP. I'll summarise that problem and also describe another problem.
Rounding of Fractional Intermediate Results Causes Pointer Jitter and Drift
The various internal acceleration and scaling calculations result in a fractional mouse-pointer movement.
This fractional movement is turned into an integer actual number of pixels moved and a fractional remainder.
The fractional remainder is saved internally and applied to the next mouse input.
Such calculations have been done for some while for the 'Mouse Speed' slider, at least since Windows 98.
Typically the fractional result is truncated towards zero, leaving a remainder that has the same sign as the integer part.
(For example, +2.7 is truncated to +2 with remainder +0.7; -3.3 is truncated to -3 with remainder -0.3)
- Windows 7 adds in the previous remainder, then truncates the fractional result towards zero, and stores the new remainder.
This is desirable and good.
If you record how the Windows 7 pointer responds to mouse input, you can create a picture like this (* Note):
(The small red dot is on-mouse-pad mouse movement, moving slowly in a circle of diameter 20 'dots' or Mickeys.
The pointer is how the Windows 7 pointer moves on the screen in response.
Note that the red dot moves in a larger circle than the pointer does: This is what the 'Enhance pointer precision' option does: If you move the mouse slowly, the pointer moves even slower to allow you fine control over objects selected.)
- Vista sometimes adds in the previous remainder and sometimes discards the previous remainder, then truncates towards -infinity, and stores the new remainder.
Truncating towards -infinity means that the remainders are always +ve numbers. Sometimes discarding the +ve remainder can cause the mouse pointer to drift up and left over time relative to the actual on-mouse-pad mouse position.
(You can see the drift if you move your on-mouse-pad mouse in a slow circle, making sure to keep the physical mouse near the same point on the mouse pad. Over time the mouse pointer drifts up and left.)
- XP sometimes adds in the previous remainder and sometimes discards the previous remainder, then truncates towards -infinity, and stores the new remainder.
It discards the remainder more frequently than Vista.
Truncating towards -infinity means that the remainders are always +ve numbers. Sometimes discarding the +ve remainder can cause the mouse pointer to drift up and left over time relative to the actual on-mouse-pad mouse position, and may cause gently curved near-horizontal or gently curved near-vertical mouse input to result in the mouse pointer 'snapping' to exactly-horizontal or exactly-vertical lines.
These effects are far more pronounced in XP than they are in Vista.
(You can see the drift the same as for Vista. Also, slow movement at 45 degrees down and right is grossly slowed down and slow movement 45 degrees up and left is sped up.)
If you record how the Windows XP pointer responds to mouse input, you can create a picture like this (* Note):
(The small red dot is on-mouse-pad mouse movement, moving slowly in a circle of diameter 20 'dots' or Mickeys.
The pointer is how the Windows XP pointer moves on the screen in response.
Note that the pointer slowly moves up and left even though the mouse is circling in place.)
Mouse Pointer DPI Scaling is Completely Wrong in Vista and XP
For a long while (Win9x+), Windows has scaled user interface (UI) elements according to the monitor DPI Setting.
Larger DPI settings cause UI elements to be drawn larger on-screen.
Starting in XP, Microsoft attempted to apply DPI scaling to mouse pointer movement.
- In Windows 7, mouse pointer movement is scaled according to DPI. For a given on-mouse-pad mouse movement, larger DPI settings cause larger on-screen pointer movement.
An internal calculation includes a factor '* DPI'.
- In XP and Vista, Microsoft got the internal scaling calculation wrong. For a given on-mouse-pad mouse movement, larger DPI settings cause smaller on-screen pointer movement.
An internal calculation includes a divisor '/ DPI'.
Mouse Pointer Monitor Refresh Rate Scaling Occurs in Vista and XP When It Should Not
- Windows 7 does not scale mouse pointer movement according to the monitor refresh rate.
- XP and Vista do scale mouse pointer movement according to monitor refresh rate.
This is incorrect (see my previous post for details).
An internal calculation includes a factor '* RefreshRate'.
* Note. To see these effects requires the Mouse Properties 'Enhance pointer precision' checkbox to be ON, and might be masked by mouse drivers specific to a particular mouse, for example: Logitech SetPoint mouse drivers with the 'Game Mode > Speed and Acceleration > SetPoint implemention' option selected do not exhibit the above behaviours. The animations were created with the Control Panel Mouse Speed slider set to the middle, 6th position.
7 comments:
Thank you for documenting this, excellent work!
It should be noted that the jitter and the drift towards left and up is more pronounced when the pointer sensitivity ("speed") in the Mouse Control Panel is set to a low value (try the first or second notch).
Since for high-quality, high-resolution mice the sensitivity needs to be set lower than usual, the drift and jitter are paradoxically more pronounced for those mice. In other words, the issue can make high-quality, high-resolution mice appear to be of bad quality.
Yes, I see that the left & up drift is faster when using low pointer speed slider settings.
More or less, the lower sensitivity slows down the right & down movements, but the left & up stay at about the same speed.
Any help anyone can give would be greatly appreciated. I used WinXP/SP3 for 7.5 years until my Hard Drive died this npast December. My monitor was of the 20" square type. With my new computer, I also purchased a 25" widescreen monitor. I never in my wildest dreams thought I would have the problem that has developed.
I love my new monitor. I delivers a wonderful interface/user experience for Win7 Pro. However, with the increased size (left to right), I am experience significant pain in my right hand, arm, and shoulder. whenever I switch back to my old monitor, the problem disappears.
Someone in another forum recommended that I get a gaming mouse, even though I am not a gamer. So, I recently purchase Logitech's M500 mouse. I previously had the basic optical mouse that Logitech made for Dell.
I have downloaded the software for the M500 and tried configuring it so that I could move around the screen with ease. It seems like pointer speed allows me to move from one side to another much more quickly than before. I am no certain what pointer acceleration does, however.
In any event, if anyone could make suggestions to some of the basic settings that could help me use this mouse in such a way that it is comfortable. I have already adjusted it so that the pointer goes to the default button on a new diaglogue box/window.
Overall, however, I am still getting hand, arm, and shoudler pain. I would hate to go back to my old monitor as the viewing experience is just not the same. Any suggetions ladies and gentlemen? Thanks in advance for your help.
Jim
Hi Jim,
I would say it was good advice to try a quality mouse.
- Logitech mouse drivers can turn off Windows control panel speed and acceleration and instead use Logitech mouse speed and acceleration, so try it both ways to see which works best for you.
- Acceleration (in Windows = "Enhance pointer precision"), makes fast mouse movements EXTRA fast and (usually) slow mouse movements EXTRA slow.
For example a quick mouse movement of 20 counts-per-whatever might move the pointer 40 pixels-per-whatever (20:40 = 1:2, doubling movement), but a slow mouse movement of 2 counts-per-whatever might move the pointer by 1 pixel-per-whatever (giving enhanced precision), (2:1 = 1:0.5).
It can help with large monitors because a small quick movement can move the pointer the same as a larger slow movement.
What hurts the most? Large movements or quick movements?
- Change hands and mouse with your left hand!
I damaged my right wrist a long time ago playing minesweeper (how sad is that?), and fairly quickly got used to mousing left-handed.
(You might need a to buy a left-handed or ambidextrous mouse.)
Mark
I have windows xp pro x64 edition. Well when I have mouse pointer precision "off" and put pointer speed dot "1-5" the sens is higher dragging mouse to left and slower right, like when i drag to left and right pretty fast it automatically goes to left, and it's impossible to play with, it responds exactly like the second picture. This does not happen taking pointer precision "on", but I dont wanna use that during mouseacceleration. How to I fix this? been searching everywhere for this, and im not kidding, going crazy.
Best regards,
Kent
Or I could always check pointer precision "on" during this problem. But then mousepointer get's unprecise for me, "small movements" = very jerky. So I was wondering if I could download cpl mousefix or something like that with "check enhance pointer precision" on, (so I could lower my sens to "3", would that fix the wierd behavior? And what fix would be best for windows xp pro x64 edition?
thx again
Ken
Hi Ken,
I remember reading a Microsoft support article about this exact problem with Windows XP x64, but I can't find it anymore...
As I understand:
- Windows XP (both x86 and x64), when 'Enhance pointer precision' (EPP) is ON, have the jitter and drift problem I write about above.
- Windows XP x64, when EPP is OFF, have a separate jitter or drift problem, as you describe.
- Try installing SP2 for XP x64 (it is possible that SP2 fixes the problem).
- Maybe the EPP ON drift is not as bad as the EPP OFF drift?
Apply the Cheese Fix, or my MarkC Fix Builder, set EPP ON, set 3/11 and try it out?
(I recommend Cheese or my fix builder fix rather than CPL.)
- Can you reduce the DPI or sensitivity using a mouse driver, and set 6/11?
(For in-game, you would want to also apply Cheese Fix or MarkC Fix Builder.)
- If not, does this 3rd party driver work for you:
3rd party mouse driver GUI @ ESReality.com
... it will let you use 6/11, and has its own separate sensitivity.
Post a Comment