Search Me

Tuesday, September 10, 2013

Jerky, stuttering mouse pointer in RDP or Console sessions

When using an RDP session through ICA (Citrix), accessing a Virtual Machine through a management console, or using any other sort of remote control, the mouse pointer is jerky, stutters, and just overall feels slow.

This is caused by a feature of Windows called Mouse Pointer Shadows.  You can manually disable the feature using the Mouse applet in the control panel (it's on the pointers tab, down at the bottom).  With this enabled, there is a shadow under the mouse pointer, and you most likely didn't even notice it.  With this off, the shadow isn't drawn and mouse tracking is much more accurate.

This is a per-user setting, which makes it rather difficult to provide a solution for.  You can adapt the solution below to your environment.

  1. Log into a Windows machine. 
  2. Configure it the way you would like
    1. Mouse Pointer Shadow : This can be configured from the Mouse Control Panel applet.  The shadow option is on the Pointers tab.,
    2. Performance Options: This can be access from Control Panel : Performance Information and tools.  Once here, click the Adjust Visual Effects setting from the link on the left. 
  3. Open registry editor and navigate to HKCU\Control Panel\Desktop.
  4. Record the value of UserPreferencesMask.  Please note that it's PREFERENCES, not Preference.  This mistake cost me an hour trying to figure out why it didn't work!
  5. Open Group Policy editor and either create a new policy, or edit an existing policy.
  6. Expand User Configuration > Preferences > Windows Settings 
  7. Right click on Registry and choose New > Registry Item.  Configure the Action, Hive, KeyPath and value name as shown below.   Make sure you choose REG_Binary as the type and then set the Value Data as the number you recorded above.  If you're lazy, or you trust my value, you can use 90120180.

  8. Clock OK to save the changes.  Close the policy editor and wait for an update (or force one).
  9. When you log into a machine, the policy should immediately take effect and you will notice that the mouse is no longer stuttering and jerky.

NOTE: If you're applying this via an OU with computers accounts (for example, all your domain servers), make sure to configure the following policy:

Computer Configuration > Policies > Administrative Templates > System > Group Policy 
Use Group Policy Loopback processing mode 

Configure this policy to enabled and set to merge.  This will tell the policy to apply to anyone logging into this machine.  Since this is a user policy applied to a computer account, it will not apply without this configuration change.