Reduce lag and responsiveness by changing mouse and keyboard priorities

Everything about latency. This section is mainly user/consumer discussion. (Peer-reviewed scientific discussion should go in Laboratory section). Tips, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 03:36

This discovery is very similar to the principle in Slender's tutorial, viewtopic.php?f=10&t=9977

My friend and I found that HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, this registry contains the mouse priority, and changing it will affect the feeling of the mouse.The mouse is lighter, smoother, and starts faster I am 100% sure that this is not a placebo, and it can work in real time like win32.Maybe this is one of the reasons why the mouse feels different every time you boot up. If you have many device instance paths for your mouse in this registry, The order in the registry will be disrupted when you restart the computer or unplug the relevant USB, which will cause the mouse to feel different.

In the device manager, you can find the device instance path of your mouse, Image
You will find that it also appears in the registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, Image

You just need to change the device instance path name of your mouse to 0 in the registry. The optimization is completed, just like in the picture Image

As for ACPI\CUST0001\4&35cf9452&0, I deleted it because it is the touch screen of my laptop. When it is 0, it will affect the response speed of my mouse, but don't worry, these registry deletions or changes will be restored after restarting. You need to make a batch file to automatically change it when booting

Similarly, the keyboard part of the mouse will also affect the feel of the mouse, Image

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum
You only need to set the keyboard part of the mouse to 0 and the normal keyboard to 1 to complete the optimization, as shown below
Image

Count and NextInstance represent the number, I changed it to the number after deletion or change. For example: there is only one REG_SE named 0, then Count and NextInstance are changed to 1
My guess is that the priority is interrupted by the order in the registry, and the top ranking is interrupted first, which leads to the change in feel caused by different priorities,

To summarize
1: Check the device instance path of the mouse and keyboard part of the mouse in the device manager
2: Change them to 0 in the registry mouclass\Enum and kbdclass\Enum
3:Change the Count and NextInstance values ​​to match the number of REG_SZ

You can make registry changes while the game is running, and it will take effect immediately without restarting the computer. You can experience the changes through a game. It should be noted that after restarting the computer, the changes in the registry will be restored to the original state, and you need to change the registry again. You can create a batch file to automatically change it when the computer is turned on.
Last edited by Syykfk on 13 Aug 2024, 11:28, edited 1 time in total.
currently mainly researching desync.

Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 03:47

If anyone has any new discoveries, please share them in the comments.
currently mainly researching desync.

Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 03:53

Syykfk wrote:
13 Aug 2024, 03:36
Similarly, the keyboard part of the mouse will also affect the feel of the mouse, Image

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum
You only need to set the keyboard part of the mouse to 0 and the normal keyboard to 1 to complete the optimization, as shown below
Image
The keyboard part of the mouse is just as important, I'm sure this affects the feel of the mouse, I'm sure changing it will make the mouse smoother and start faster!! So don't forget to change it in kbdclass\Enum and test it! You can test kbdclass first and then mouclass
currently mainly researching desync.

User avatar
Slender
Posts: 1684
Joined: 25 Jan 2020, 17:55

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Slender » 13 Aug 2024, 09:12

Syykfk wrote:
13 Aug 2024, 03:47
If anyone has any new discoveries, please share them in the comments.
How many mouse drivers and keyboard drivers do you have now?

edit: it amuses me that neither roach nor I have yet created a ticket about this problem in MS and have not yet logged into the regedit to see how it works, and it has been more than 2 years.
Attachments
photo_2024-08-13_07-12-05.jpg
photo_2024-08-13_07-12-05.jpg (13.79 KiB) Viewed 12205 times

Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 10:13

Slender wrote:
13 Aug 2024, 09:12
Syykfk wrote:
13 Aug 2024, 03:47
If anyone has any new discoveries, please share them in the comments.
How many mouse drivers and keyboard drivers do you have now?

edit: it amuses me that neither roach nor I have yet created a ticket about this problem in MS and have not yet logged into the regedit to see how it works, and it has been more than 2 years.
I have 3 keyboards drive now:
mouse keyboard part
normal keyboard
laptop keyboard

2 mice drive:
mouse
laptop touchpad
屏幕截图 2024-08-13 230854.png
屏幕截图 2024-08-13 230854.png (7.17 KiB) Viewed 12154 times
Roach's tutorial tells us to put the keyboard part of the mouse on top, which actually means setting the keyboard part of the mouse to 0 in the registry kbdclass\Enum, so that it will feel better.

My friend discovered that if other mouse drivers are not disabled, or the mouse is changed frequently, the order of these mouse and keyboard device instance paths in the registry will change randomly at startup, resulting in the difference in feeling.
currently mainly researching desync.

JimCarry
Posts: 586
Joined: 24 May 2024, 20:01
Location: csgo

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by JimCarry » 13 Aug 2024, 10:40

Syykfk wrote:
13 Aug 2024, 03:36
This discovery is very similar to the principle in Slender's tutorial, viewtopic.php?f=10&t=9977

My friend and I found that HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, this registry contains the mouse priority, and changing it will affect the feeling of the mouse.The mouse is lighter, smoother, and starts faster I am 100% sure that this is not a placebo, and it can work in real time like win32.Maybe this is one of the reasons why the mouse feels different every time you boot up. If you have many device instance paths for your mouse in this registry, the order in the registry will be disrupted at boot time, which will cause the mouse to feel different.

In the device manager, you can find the device instance path of your mouse, Image
You will find that it also appears in the registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, Image

You just need to change the device instance path name of your mouse to 0 in the registry. The optimization is completed, just like in the picture Image

As for ACPI\CUST0001\4&35cf9452&0, I deleted it because it is the touch screen of my laptop. When it is 0, it will affect the response speed of my mouse, but don't worry, these registry deletions or changes will be restored after restarting. You need to make a batch file to automatically change it when booting

Similarly, the keyboard part of the mouse will also affect the feel of the mouse, Image

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum
You only need to set the keyboard part of the mouse to 0 and the normal keyboard to 1 to complete the optimization, as shown below
Image

Count and NextInstance represent the number, I changed it to the number after deletion or change. For example: there is only one REG_SE named 0, then Count and NextInstance are changed to 1
My guess is that the priority is interrupted by the order in the registry, and the top ranking is interrupted first, which leads to the change in feel caused by different priorities,

To summarize
1: Check the device instance path of the mouse and keyboard part of the mouse in the device manager
2: Change them to 0 in the registry mouclass\Enum and kbdclass\Enum
3:Change the Count and NextInstance values ​​to match the number of REG_SZ

You can make registry changes while the game is running, and it will take effect immediately without restarting the computer. You can experience the changes through a game. It should be noted that after restarting the computer, the changes in the registry will be restored to the original state, and you need to change the registry again. You can create a batch file to automatically change it when the computer is turned on.
Thansk for sharing.so if i read all this right,this is how my registry must look:

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum]
"0"="HID\\VID_09DA&PID_31A2&MI_01\\7&8b377aa&0&0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum]
"0"="HID\\VID_09DA&PID_FA10&MI_00\\7&7f234a1&0&0000"
"1"="HID\\VID_09DA&PID_31A2&MI_01\\7&8b377aa&0&0000"
"Count"=dword:00000002
"NextInstance"=dword:00000002

.

Sandy
Posts: 138
Joined: 30 Mar 2024, 02:14

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Sandy » 13 Aug 2024, 11:13

Syykfk wrote:
13 Aug 2024, 03:36
This discovery is very similar to the principle in Slender's tutorial, viewtopic.php?f=10&t=9977

My friend and I found that HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, this registry contains the mouse priority, and changing it will affect the feeling of the mouse.The mouse is lighter, smoother, and starts faster I am 100% sure that this is not a placebo, and it can work in real time like win32.Maybe this is one of the reasons why the mouse feels different every time you boot up. If you have many device instance paths for your mouse in this registry, the order in the registry will be disrupted at boot time, which will cause the mouse to feel different.

In the device manager, you can find the device instance path of your mouse, Image
You will find that it also appears in the registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum, Image

You just need to change the device instance path name of your mouse to 0 in the registry. The optimization is completed, just like in the picture Image

As for ACPI\CUST0001\4&35cf9452&0, I deleted it because it is the touch screen of my laptop. When it is 0, it will affect the response speed of my mouse, but don't worry, these registry deletions or changes will be restored after restarting. You need to make a batch file to automatically change it when booting

Similarly, the keyboard part of the mouse will also affect the feel of the mouse, Image

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum
You only need to set the keyboard part of the mouse to 0 and the normal keyboard to 1 to complete the optimization, as shown below
Image

Count and NextInstance represent the number, I changed it to the number after deletion or change. For example: there is only one REG_SE named 0, then Count and NextInstance are changed to 1
My guess is that the priority is interrupted by the order in the registry, and the top ranking is interrupted first, which leads to the change in feel caused by different priorities,

To summarize
1: Check the device instance path of the mouse and keyboard part of the mouse in the device manager
2: Change them to 0 in the registry mouclass\Enum and kbdclass\Enum
3:Change the Count and NextInstance values ​​to match the number of REG_SZ

You can make registry changes while the game is running, and it will take effect immediately without restarting the computer. You can experience the changes through a game. It should be noted that after restarting the computer, the changes in the registry will be restored to the original state, and you need to change the registry again. You can create a batch file to automatically change it when the computer is turned on.
I deleted Enum and found no changes

Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 11:14

JimCarry wrote:
13 Aug 2024, 10:40


Thansk for sharing.so if i read all this right,this is how my registry must look:

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\mouclass\Enum]
"0"="HID\\VID_09DA&PID_31A2&MI_01\\7&8b377aa&0&0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kbdclass\Enum]
"0"="HID\\VID_09DA&PID_FA10&MI_00\\7&7f234a1&0&0000"
"1"="HID\\VID_09DA&PID_31A2&MI_01\\7&8b377aa&0&0000"
"Count"=dword:00000002
"NextInstance"=dword:00000002
Yes, please make sure that "0" = the device instance path of your mouse and mouse keyboard.
In addition, there are also device instance paths for mouse and mouse keyboard in ControlSet001\Services\mouhid\Enum and ControlSet001\Services\kbdhid\Enum, but my mouse and mouse keyboard parts are already 0 there. This may be because I have disabled the useless mouse and keyboard drivers in the device manager. I don't know if the order in mou\kbd hid will have an impact. To be on the safe side, you can also change the order in mou\kbd hid at the same time.
currently mainly researching desync.

Syykfk
Posts: 93
Joined: 28 Jul 2023, 08:19

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Syykfk » 13 Aug 2024, 11:17

Sandy wrote:
13 Aug 2024, 11:13

I deleted Enum and found no changes
In addition, there are also device instance paths for mouse and mouse keyboard in ControlSet001\Services\mouhid\Enum and ControlSet001\Services\kbdhid\Enum, but my mouse and mouse keyboard parts are already 0 there. This may be because I have disabled the useless mouse and keyboard drivers in the device manager. I don't know if the order in mou\kbd hid will have an impact. To be on the safe side, you can also change the order in mou\kbd hid at the same time.

Or maybe deleting Enum doesn't work, I haven't tested deleting Enum
currently mainly researching desync.

Sandy
Posts: 138
Joined: 30 Mar 2024, 02:14

Re: Reduce lag and responsiveness by changing mouse and keyboard priorities

Post by Sandy » 13 Aug 2024, 13:09

Syykfk wrote:
13 Aug 2024, 11:17
Sandy wrote:
13 Aug 2024, 11:13

I deleted Enum and found no changes
In addition, there are also device instance paths for mouse and mouse keyboard in ControlSet001\Services\mouhid\Enum and ControlSet001\Services\kbdhid\Enum, but my mouse and mouse keyboard parts are already 0 there. This may be because I have disabled the useless mouse and keyboard drivers in the device manager. I don't know if the order in mou\kbd hid will have an impact. To be on the safe side, you can also change the order in mou\kbd hid at the same time.

Or maybe deleting Enum doesn't work, I haven't tested deleting Enum
I have tested all of this and it worked at first, then after a few days the input lag returned but I found that the USB ports had different input lags and I was playing USB port roulette every time I played a game and this trick still works today!
It seems like everything points to a defective USB chip

Post Reply