MSTSC is throttling mouse updates / poor update rate

Casper ‪ 96 Reputation points
2021-09-06T05:18:55.367+00:00

When connecting from either Vista or Windows 8.1 to Server 2012 R2 I have a very consistent problem of mstsc having a very slow mouse update rate.

The polling rate seems to be around 10 fps for the mouse. Here is a perfect example of what happens when I try to draw a circle in Paint through RDP (see the jagged updates):

https://i.imgur.com/9mvT88e.png

The problem is clearly in mstsc.exe, because if I run FreeRDP instead the problem is not present.

I've troubleshooted this in several different ways to try to rule out any other factors, and it appears this is some sort of internal throttle in the mstsc code. The problem is not with the frame rate from the server towards the client, as I can see smooth video and other animations from the server without any problems.

The problem is only with sending mouse updates from client to server.

Even keyboard updates are instant, but any mouse updates are throttled. In fact if I type on the keyboard while moving the mouse, the throttling goes away as the mouse packets seem to get flushed faster from the client by piggybacking on the keyboard stream.

Is there any fix to this issue? I'm pretty sure it's a bug in mstsc, as FreeRDP without any changes to the server settings does not have this problem at all.

I got so annoyed by this problem I even started debugging the mstsc code in IDA. In it I can see methods for event batching "CIH::AddMouseEventToBatch". Is it batching mouse updates instead of sending them instantly? How to get around this issue?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,336 questions
0 comments No comments
{count} votes

Accepted answer
  1. Casper ‪ 96 Reputation points
    2021-09-06T06:24:40.003+00:00

    Playing around with IDA paid off. I found some registry entries, searched them with Google, and indeed the default setting of MSTSC is to throttle input updates.

    This will fix the issue, and everything is glorious after these changes:

    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client]
    "Min Send Interval"=dword:00000001
    "Keep Alive Interval"=dword:00000001
    "BitmapCacheSize"=dword:0000ffff
    "Order Draw Threshold"=dword:00000001
    
    0 comments No comments

0 additional answers

Sort by: Most helpful