Page 1 of 4

The mouse drifting issue potential breakthrough

Posted: 21 Nov 2025, 20:58
by Vocaleyes
hi there, I'm sure you need no introduction from me or my issue by this point, but regardless.. tl;dr extreme mouse drifting, on multiple pcs, laptops (unplugged) & native ps4 kb&m input.

So i previously referenced a (now removed) post, regarding an confirmed issue on ubuntu which appeared to have the exact same symptoms i am experiencing on modern windows. This was also illustrated with drawings on paint highlighting the severity of the circle drifting.

Remember, they acknowledged the issue proving this was NOT working as intended.

Now, i have unfortunately been stuck down the rabbit hole of mouse delta accumulation being the reason behind this phenomenon after using the mouserawinputtester app which shows delta accumulation depending on the orientation of the circles made (clockwise vs anti).

So after being stuck, i decided to take a different approach and yield to the fact that all sensors have unavoidable drifting and always have.. HOWEVER, the natural expected accumulation shouldn't be as drastic as it has been since windows 8 onward.
So if we admit there is always an expected drift due to the way sensors work, what could make it so extreme now than it used to be, on all these platforms?

Then it hit me like a tonne of bricks. Something already known about but not understood as to why.

DWM.
So back in W7, DWM was optional. When disabled, used GDI.


Here's where we get interesting!


DWM heavily relies on floating point math, which is for the sake of scaling compatibility with high dpi displays and modern graphical features etc.
While the GDI pipeline used integer based coordinates and math.

This aligns with the previously mentioned ubuntu post in regards to their issue being solved by switching the math type used and it gets better...
This ALSO EXPLAINS why the effect is observed on ps4 native kb&m input. The ps4 uses math for compositing that is functionally similar to modern PC pipelines. PS4 architecture is entirely based on modern GPU hardware (AMD radeon GCN) which operates using high precision floating point math.


So it is as people observed the effect when DWM became mandatory due to no longer being able to disable DWM when that transition was made. Also this issue will not be obvious to a majority of users due to a variety of reasons, ie. haven't felt a mouse movement without the aid of compositing, standard users not having to make the fine movements and adjustments as gamers do or even graphical artists do, which is why they rather the use of absolute positioning devices, are arm aimers as opposed to wrist aimers etc. as wrist aimers heavily rely on micro movements. perceptual sensitivity and due to faster movements in comparison.

So when we conclude that sensors always have unavoidable delta accumulation, the different between now and w7/ w vista is that DWM math is essentially turning this slight discrepancy into an obnoxious immediate effect.

Any thoughts, corrections or questions please chime in!

Re: The mouse drifting issue potential breakthrough

Posted: 22 Nov 2025, 01:17
by crack
Vocaleyes wrote:
21 Nov 2025, 20:58
hi there, I'm sure you need no introduction from me or my issue by this point, but regardless.. tl;dr extreme mouse drifting, on multiple pcs, laptops (unplugged) & native ps4 kb&m input.

So i previously referenced a (now removed) post, regarding an confirmed issue on ubuntu which appeared to have the exact same symptoms i am experiencing on modern windows. This was also illustrated with drawings on paint highlighting the severity of the circle drifting.

Remember, they acknowledged the issue proving this was NOT working as intended.

Now, i have unfortunately been stuck down the rabbit hole of mouse delta accumulation being the reason behind this phenomenon after using the mouserawinputtester app which shows delta accumulation depending on the orientation of the circles made (clockwise vs anti).

So after being stuck, i decided to take a different approach and yield to the fact that all sensors have unavoidable drifting and always have.. HOWEVER, the natural expected accumulation shouldn't be as drastic as it has been since windows 8 onward.
So if we admit there is always an expected drift due to the way sensors work, what could make it so extreme now than it used to be, on all these platforms?

Then it hit me like a tonne of bricks. Something already known about but not understood as to why.

DWM.
So back in W7, DWM was optional. When disabled, used GDI.


Here's where we get interesting!


DWM heavily relies on floating point math, which is for the sake of scaling compatibility with high dpi displays and modern graphical features etc.
While the GDI pipeline used integer based coordinates and math.

This aligns with the previously mentioned ubuntu post in regards to their issue being solved by switching the math type used and it gets better...
This ALSO EXPLAINS why the effect is observed on ps4 native kb&m input. The ps4 uses math for compositing that is functionally similar to modern PC pipelines. PS4 architecture is entirely based on modern GPU hardware (AMD radeon GCN) which operates using high precision floating point math.


So it is as people observed the effect when DWM became mandatory due to no longer being able to disable DWM when that transition was made. Also this issue will not be obvious to a majority of users due to a variety of reasons, ie. haven't felt a mouse movement without the aid of compositing, standard users not having to make the fine movements and adjustments as gamers do or even graphical artists do, which is why they rather the use of absolute positioning devices, are arm aimers as opposed to wrist aimers etc. as wrist aimers heavily rely on micro movements. perceptual sensitivity and due to faster movements in comparison.

So when we conclude that sensors always have unavoidable delta accumulation, the different between now and w7/ w vista is that DWM math is essentially turning this slight discrepancy into an obnoxious immediate effect.

Any thoughts, corrections or questions please chime in!
I don't feel any mouse drifting in games anymore when I go to the .exe's properties > compatibility > change high dpi settings > program dpi > Use the dpi that's set for my main display when > I open this program.

Some games you can alt tab and find the .exe in task manager and do this, others you need a (edit:game restart) to see an effect.

Re: The mouse drifting issue potential breakthrough

Posted: 22 Nov 2025, 03:57
by Hyote
Vocaleyes wrote:
21 Nov 2025, 20:58
hi there, I'm sure you need no introduction from me or my issue by this point, but regardless.. tl;dr extreme mouse drifting, on multiple pcs, laptops (unplugged) & native ps4 kb&m input.

So i previously referenced a (now removed) post, regarding an confirmed issue on ubuntu which appeared to have the exact same symptoms i am experiencing on modern windows. This was also illustrated with drawings on paint highlighting the severity of the circle drifting.

Remember, they acknowledged the issue proving this was NOT working as intended.

Now, i have unfortunately been stuck down the rabbit hole of mouse delta accumulation being the reason behind this phenomenon after using the mouserawinputtester app which shows delta accumulation depending on the orientation of the circles made (clockwise vs anti).

So after being stuck, i decided to take a different approach and yield to the fact that all sensors have unavoidable drifting and always have.. HOWEVER, the natural expected accumulation shouldn't be as drastic as it has been since windows 8 onward.
So if we admit there is always an expected drift due to the way sensors work, what could make it so extreme now than it used to be, on all these platforms?

Then it hit me like a tonne of bricks. Something already known about but not understood as to why.

DWM.
So back in W7, DWM was optional. When disabled, used GDI.


Here's where we get interesting!


DWM heavily relies on floating point math, which is for the sake of scaling compatibility with high dpi displays and modern graphical features etc.
While the GDI pipeline used integer based coordinates and math.

This aligns with the previously mentioned ubuntu post in regards to their issue being solved by switching the math type used and it gets better...
This ALSO EXPLAINS why the effect is observed on ps4 native kb&m input. The ps4 uses math for compositing that is functionally similar to modern PC pipelines. PS4 architecture is entirely based on modern GPU hardware (AMD radeon GCN) which operates using high precision floating point math.


So it is as people observed the effect when DWM became mandatory due to no longer being able to disable DWM when that transition was made. Also this issue will not be obvious to a majority of users due to a variety of reasons, ie. haven't felt a mouse movement without the aid of compositing, standard users not having to make the fine movements and adjustments as gamers do or even graphical artists do, which is why they rather the use of absolute positioning devices, are arm aimers as opposed to wrist aimers etc. as wrist aimers heavily rely on micro movements. perceptual sensitivity and due to faster movements in comparison.

So when we conclude that sensors always have unavoidable delta accumulation, the different between now and w7/ w vista is that DWM math is essentially turning this slight discrepancy into an obnoxious immediate effect.

Any thoughts, corrections or questions please chime in!
I had the same issues on Windows 7 without DWM, Windows 10 without DWM and Linux. And I play on a PS3 too and there is a strange effect on it as well. I was working on a program for Windows 11 that handles some threads in DWM and games as well but for now I had to put it off because I moved on to using RDTSC which I had very good results with. Unfortunately the only ways to make it work are done by using modified drivers which some anticheats pick up or by running them as .dllls which might be what I'm going to automate for a custom Windows build. It's true that DWM is getting more enforced with newer Windows builds.

Re: The mouse drifting issue potential breakthrough

Posted: 22 Nov 2025, 20:19
by Vocaleyes
How did you manage to fully disable DWM on windows 10, also does ps3 allow for native kb&m support?

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 06:28
by Hyote
Vocaleyes wrote:
22 Nov 2025, 20:19
How did you manage to fully disable DWM on windows 10, also does ps3 allow for native kb&m support?
https://github.com/Hyyote/files-/tree/main/DWM
Run the disable script and then restart.
No, I just meant that even on the PS3 I can feel some sort of delay changes over time regardless of temperatures or anything perceivable.

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 12:24
by Vocaleyes
Windows Mouse Input Delta Accumulation: Architectural Divergence Between GDI and DWM Rendering Pipelines
Summary;
The perceptible disparity in mouse responsiveness between Windows 7 and Windows 11 derives from fundamental architectural differences in how each operating system processes and accumulates mouse input deltas at the coordinate transformation level. Windows 7 employed a GDI-based integer coordinate system that preserved fractional remainders across frame intervals, whereas Windows 11 implements a DWM-based floating-point rendering pipeline that applies multi-stage coordinate transformations. This architectural bifurcation produces measurable differences in input precision accumulation patterns and manifests as subjective differences in perceived responsiveness.

Windows 7: Integer-Based Remainder Preservation Model
Accumulation Mechanism;
Windows 7 implements a non-discarding remainder model in pointer movement calculations. Rather than truncating fractional coordinate values at each frame boundary, the system explicitly preserves and carries forward sub-pixel fractional remainders to subsequent frames. This mechanism ensures that accumulated input deltas maintain fidelity across temporal boundaries despite integer-based coordinate representation.

Mathematical Framework;
Achieving exact 1:1 mouse-to-pointer correspondence in Windows 7 requires a specific mathematical structure: a piecewise-linear accumulation curve composed of four segments with identical slope characteristics. Deviation from this structure produces a one-pixel directional error upon mouse vector reversal (horizontal or vertical), a direct consequence of the system's failure to truncate remainder values during pointer movement calculations.

Operational Characteristics;
The remainder-preservation model exhibits several defining properties:
Sub-pixel fractional deltas are retained between discrete frame updates, maintaining continuous accumulation of input precision. The accumulation process remains deterministic; identical input movement patterns reproducibly generate equivalent pointer trajectories. The system operates with minimal computational overhead, as the mechanism relies on simple arithmetic rather than complex transformation matrices. Input latency remains consistent across varied movement velocities and acceleration profiles.

Windows 11: Floating-Point Composition Pipeline Architecture
Technical Foundation;
Direct2D implements a floating-point coordinate space to accommodate device-independent pixel (DIP) scaling and anti-aliasing operations. Since rendering must accommodate arbitrary DPI configurations, fractional coordinate values are unavoidable. DWM leverages Direct2D as its primary composition engine and thus performs all desktop composition operations using IEEE half-precision floating-point (FP16) mathematics.

Multi-Stage Transformation Model;
Mouse input traverses a multi-layered processing pipeline within DWM's composition architecture:
Raw input enters the floating-point coordinate transformation system at the driver interface level. DPI scaling operations apply mathematical transformations at intermediate pipeline stages. Coordinate space conversions between physical pixels and device-independent pixels introduce floating-point rounding at each transformation boundary. Per-monitor scaling adjustments apply additional transformation layers for multi-display configurations. Composition-layer anti-aliasing operations further process coordinate information before final screen-space rasterization.

Evolutionary Complexity Accumulation;
Operating system evolution has compounded the architectural complexity. Windows 8.1 introduced power-optimization modifications that delay and coalesce mouse input events, reducing effective polling rates to approximately 62 Hz under load despite hardware support for higher rates. Subsequent Windows 10 iterations modified scaling behavior to apply per-monitor DPI adjustments dynamically, introducing variable transformation coefficients based on display configuration rather than global system settings.

Comparative Analysis: Delta Accumulation Methodology
Windows 7 Approach;
Integer-based coordinate representation with explicit fractional remainder preservation across frame boundaries. Linear, deterministic accumulation following fixed mathematical relationships. Minimal transformation stages reduce opportunities for rounding-error compounding. Transparent accumulation semantics enable predictable behavior across diverse input velocities.

Windows 11 Approach;
Floating-point coordinate representation throughout the entire processing pipeline. Multiple transformation stages with variable precision characteristics depending on system state. DPI scaling, per-monitor adjustments, and composition-layer processing introduce decision points where rounding behavior diverges. Additional latency variability emerges from asynchronous input coalescing mechanisms.

Mechanistic Basis for Perceived Responsiveness Differences
The subjective experience of superior mouse responsiveness in Windows 7 operates through several interconnected mechanisms:
Deterministic accumulation follows an immutable algorithmic pattern. Minimal computational intermediation between input and output reduces latency variance and permits intuitive user adaptation to system behavior. The remainder-preservation model creates stable, reproducible input trajectories across identical physical movements. Floating-point's inherent variable precision characteristics introduce frame-to-frame rounding inconsistencies that accumulate subtle positional variations imperceptible at conscious analysis but perceptible through fine motor control feedback mechanisms.

The Locked-In Architectural Constraint
The contemporary software ecosystem has fundamentally adapted to DWM's floating-point model. Game engines, input abstraction libraries, graphics APIs, and hardware drivers were developed and optimized to accommodate DWM's specific mathematical characteristics. Reverting the system to pure integer mathematics would necessitate recalibration across thousands of applications, generating widespread incompatibility and performance degradation. This creates a self-reinforcing constraint wherein architectural design decisions, once adopted ecosystem-wide, become functionally irreversible despite potential technical limitations. The system's mathematical model, regardless of subjective merit, has achieved de facto standardization through entrenchment rather than optimization.

Absolute Input Devices: Implications for Delta Accumulation
Absolute positioning devices (styluses, digitizer tablets) report fixed spatial coordinates per frame rather than accumulated deltas. Consequently, they do not inherit sensor drift accumulation characteristics intrinsic to relative input devices. Although absolute devices still traverse DWM's floating-point transformation pipeline, the absence of delta accumulation prevents compounding of fractional precision losses across temporal boundaries. This architectural distinction suggests that absolute input methodologies may provide measurably different responsiveness characteristics compared to relative input devices operating within identical rendering pipelines, though this represents a logical implication rather than empirically confirmed observation.

Conclusion
The mathematical divergence between Windows 7's GDI integer accumulation model and Windows 11's DWM floating-point composition pipeline represents a fundamental transformation in input processing semantics. Windows 7's integer-based remainder preservation provided transparent, deterministic input processing with minimal computational overhead. Windows 11's floating-point architecture offers enhanced mathematical flexibility for multi-DPI display ecosystems but introduces accumulating variability in rounding behavior and latency characteristics. This transformation is neither objectively superior nor inferior; it represents an architectural trade-off optimizing for display technology evolution at the expense of input processing transparency. The resulting perceived responsiveness differential reflects genuine mathematical divergence rather than subjective artifact, and this difference persists as an inextricable characteristic of contemporary Windows architecture.

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 12:28
by Vocaleyes
Hyote wrote:
23 Nov 2025, 06:28
Vocaleyes wrote:
22 Nov 2025, 20:19
How did you manage to fully disable DWM on windows 10, also does ps3 allow for native kb&m support?
https://github.com/Hyyote/files-/tree/main/DWM
Run the disable script and then restart.
No, I just meant that even on the PS3 I can feel some sort of delay changes over time regardless of temperatures or anything perceivable.
Even with DISABLEDWM set, DWM itself continues running at the OS level. You cannot fully disable DWM in Windows 10/11 without breaking core system functionality unless I’m mistaken?
Also I understand now regarding the observed effects on console.

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 17:59
by Hyote
CMit, the MasterInputThread inside DWM in Windows 11 is tied to mouse input but I remember being able to have no DWM process at all in 10 as csrss handled everything. But regardless if Windows 7 and Linux X11 without composition count, then they still suffer from the same issues. I can't claim to have fixed this in particular but I went to great lengths to reduce latency where I don't feel these effects anymore.

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 18:21
by Hyote
viewtopic.php?t=8885

Like it's mentioned in the post, I use RDTSC now but instead of injecting it, I use it as a separate program which doesn't trip anticheats at least it hasn't been a problem for a month now.

Re: The mouse drifting issue potential breakthrough

Posted: 23 Nov 2025, 22:25
by Kipperii
Hyote wrote:
23 Nov 2025, 18:21
viewtopic.php?t=8885

Like it's mentioned in the post, I use RDTSC now but instead of injecting it, I use it as a separate program which doesn't trip anticheats at least it hasn't been a problem for a month now.
how to use it as a separate program?