Very long postinstall guide

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.
Hyote
Posts: 487
Joined: 09 Jan 2024, 18:08

Very long postinstall guide

Post by Hyote » 16 Oct 2024, 14:38

Moderator Added Note wrote:Disclaimer: Apply tweaks at own risk! Verify that you understand the risks of applying tweaks. Save a backup of your important data first.
I'm making this post to share the things I do to minimize any kind of input lag and have the lowest possible latency.

Here is my github page for some files you might need: https://github.com/Hyyote/files-

The first thing is the Windows version: Windows 7 used to be ideal low latency OS but there are some tweaks that only work for me on 1803 and the results bring out this version as the winner. Otherwise anything like, 21H2 LTSC, Server 2022, 22H2 and Windows 11 is fine. Just don't use anything like 1909, 2004 because they were inferior even when they were supported.
You can leave the base ISO as is and debloat them manually or use github debloaters or follow the AMITXV guide to debloat it. I prefer to use NTLite and will share my XML for 1803 which can also be used for any version of Windows 10 but not 11.
If you use my NTLite ISO you will need to download your ethernet driver, a browser and 7-Zip or WinRAR or something else.
After the ISO has been created it's time to move on to BIOS settings. Look up BIOS guides from people like Calypto, AMITXV again and also disable anything that is not being used and delete secure boot keys after installing Windows as well. This does not apply to every cpu (maybe not Intel 13th, 14th gen and AM4/5) but in short it's recommended to disable C-States, HyperThreading, E-cores, P-Cores, manually dialing in every possible setting, disabling ReSizeBAR, disabling XHCI-Handoff, Legacy USB Support, any unused USB ports, SATA ports, etc. A custom CPU fan curve is also recommended.

If you want to update your ethernet driver for older Windows versions, you might need to modify the .inf file and change all the version numbers to match the Windows version you are going to be using. For example i-225V drivers usually support 17763 and up. This is version 1809 so you need to change it to 17134 for 1803. Press Ctrl+H inside the .inf file and use find and replace. After installing Windows you need to Shift+right click on the Restart button, go to Advanced Startup Settings and Disable Driver Signature Enforcement. This only works for the next startup so you need to install your driver afterwards.

The first step after installing is to open up PowerShell as admin and type in:
Set-ExecutionPolicy Unrestricted

I like to disable the help icon in file explorer with CMD:
@echo off
taskkill /f /im HelpPane.exe
takeown /f %WinDir%\HelpPane.exe
icacls %WinDir%\HelpPane.exe /deny Everyone:(X)

Depending on the version you can disable the reserved storage with:
DISM /Online /Set-ReservedStorageState /State:Disabled

Also clean the WinSxS folder which can take a VERY long time:
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase

Disable superfetch:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SysMain" /v "Start" /t REG_DWORD /d "4" /f

In sysdm.cpl (Advanced System Settings) I recommend unchecking everything, disabling the paging file, disabling and deleting system restore points.

After that I go over the immersive control panel settings (Win+I), disable everything unneeded for gaming like Fax, GameBar, all the privacy permissions disabled.
Uncheck sticky keys and mouse keys in the Ease of Access Center in Control Pantel.
Disable audio enhancements in the sound control panel and preferably disable your microphone or set the quality to 44100 Hz.
Disable mouse pointer theme, disable scroll inactive windows, disable hide pointer while typing.

Install all the DirectX and C++ packages. There are all-in-one versions on TechPowerUp which you can find by searching for "DirectX AIO" and "C++ AIO".

I left out installing bloatware in the immersive control panel part but that can be done by the debloating scripts/tools I mentioned and also with a program called AppxPackagesManager which can be found on my github.

Uninstall OneDrive in CMD:
for %a in ("SysWOW64" "System32") do (if exist "%windir%\%~a\OneDriveSetup.exe" ("%windir%\%~a\OneDriveSetup.exe" /uninstall)) && reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > nul 2>&1

Disable everything unneeded in Autoruns like Chromium Microsoft Edge auto updater tasks, any unneeded startup tasks and Intel GPIO if you have that.

Disable GameBar:
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d "0" /f

Disable residual Defender task:
CMD: C:\bin\MinSudo.exe --TrustedInstaller --Privileged
taskkill /f /im smartscreen.exe > nul 2>&1 & ren C:\Windows\System32\smartscreen.exe smartscreen.exee

For the GPU driver, I've been using AMD for a few years so I can only give tips for that but there are plenty of guides for debloating NVIDIA.
For AMD, unzip the driver file, select the unzipped folder in RadeonSoftwareSlimmer and only leave AMD Display Driver, AMD Settings selected unless you need other components. Depending on the Windows version you might not be able to install the driver directly so you need to navigate to the device manager and look for Microsoft Basic Display Adapter, and update that by selecting the driver folder, not the .exe.
After installing, disable bloat like AMD External Events Utility in Autoruns and also in device manager.
Search for atieclxx in the file explorer and rename them using a program that gives you elevated privileges (NSudo) or by taking ownership of the folders atieclxx entries are in. So you open up CMD with elevated privileges for example and type in:
ren C:\Windows\System32\atieclxx.exe atieclxx.exe.old
Disable HDCP support in the AMD Control Panel

Then I recommend using a different power plan because even the Ultimate Performance one has many settings that are not ideal. Use at least the Bitsum Highest Performance power plan or you can check out mine as well or you can search github for this for a collection of plans:
POWERPLAN-WINDOWS-10-

Use InSpectre to disable Spectre and Meltdown. Security concern but this post aims for the lowest latency and better performance.
Again use NSudo or take ownership of the folder, CMD:
ren C:\Windows\System32\mcupdate_GenuineIntel.dll mcupdate_GenuineIntel.dlll

Next, bcdedits. Again depending on the Windows version there are a lot of cominations to use, but for 1803 I highly recommend disabling HPET, along with the entire ISA bus in regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msisadrv
"ErrorControl"=dword:00000001
"Start"=dword:00000004

For 1803 and up to 22H2 I recommend these for latency and without HPET. CMD:
bcdedit /set tscsyncpolicy legacy
bcdedit /set hypervisorlaunchtype off
bcdedit /set useplatformclock false
bcdedit /set useplatformtick no
bcdedit /set disabledynamictick yes
bcdedit /set x2apicpolicy disable
bcdedit /set uselegacyapicmode yes

For Windows 11 these values should not be set and if anything was changed, you can revert them with:
bcdedit /deletevalue useplatformtick
bcdedit /deletevalue useplatformclock
bcdedit /deletevalue tscsyncpolicy
bcdedit /deletevalue disabledynamictick

Turn off data execution prevention:
bcdedit /set nx AlwaysOff

Memory management settings, PowerShell:
Get-MMAgent
Disable-MMAgent -MemoryCompression

Network settings, type in ncpa.cpl, uncheck everyhing other than QoS Packet Scheduler and Internet Protocol Version 4
Disable NetBIOS over TCP/IP for all network adapters in Internet Protocol Version 4 (TCP/IPv4) -> Properties -> General -> Advanced -> WINS

Prevent the Software Protection service attempting to register a restart every 30s:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v "InactivityShutdownDelay" /t REG_DWORD /d "4294967295" /f

Disable unneeded services. I am sharing my disable and enable scripts for Windows 10 but unfortunately I don't have one for 11.
After running the script, camsvc, PlugPlay and TabletInputService can be disabled additionally.

Device manager: if you ran my services script, do not disable yellow devices.

View -> Devices by type
In the Disk drives category, disable write-caching (setting on top) on all drives in the Properties -> Policies section

These things can be disabled: Microsoft System Management BIOS Driver
Microsoft GS Wavetable Synth
PCI Express Root Ports
ISA Bridge
PCI standard RAM Controller
generic software components
unused usb devices
Generic PnP Monitor (not before using CRU if you want to use that)

run Services-Enable.bat for further setting

Disable power saving for all devices:
PowerShell: Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi | ForEach-Object { $_.enable = $false; $_.psbase.put(); }

Build reg keys to configure event trace sessions (run built reg files with NSudo):
reg export "HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger" "C:\ets-enable.reg"

>> "C:\ets-disable.reg" echo Windows Registry Editor Version 5.00 && >> "C:\ets-disable.reg" echo. && >> "C:\ets-disable.reg" echo [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger]

Disable SleepStudy:
for %a in ("SleepStudy" "Kernel-Processor-Power" "UserModePowerService") do (wevtutil sl Microsoft-Windows-%~a/Diagnostic /e:false)

Disable the creation of 8.3 character-length file names on FAT- and NTFS-formatted volumes in CMD:
fsutil behavior set disable8dot3 1

Disable updates to the Last Access Time stamp:
fsutil behavior set disablelastaccess 1

Check the MSI Utility for IRQ sharing, make sure you GPU, storage, ethernet and USB are all in MSI mode and do not change their priorities.

Use CRU, put the Established resolutions tab on the left to None
Delete Detailed Resolutions, Standard Resolutions and Extension blocks.
Add resolutions you use in Detailed Resolutions by pressing Add, Timing: Exact reduced so you only have to type in your resolution and refresh rate. Use restart64 in the CRU folder to restart the driver and disable Generic PnP Monitor in device manager afterwards.

XHCI IMOD for Intel CPUs: for Windows 11 you need to add this registry key:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Config" /v "VulnerableDriverBlocklistEnable" /t REG_DWORD /d "0" /f

Install RWEverything: (I'll try to kind of explain this in text but you can find this information on JerryXOC's youtube channel)
PCI Devices: 32 bit, XHCI USB Controller, find BAR1 address in the columns, double click on it
16 bit in the next menu, search in Address, copy paste after the 0x part if there is only BAR 1, then delete 4 characters at the end and type 2024
click on 00C8 and double click on every 1 to make them 0
This has to be repeated on every startup as well.

regedit settings:

HKEY_CURRENT_USER\Control Panel\Mouse ; delete everything, create String values MouseAccel 0, MouseAccel_Max 0, MouseAccel_Scale 0
By deleting all the other values, enhance pointer precision gets re-enabled after a restart so you will need to manually uncheck EPP and delete the other registry keys again

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mouclass
new key called Parameters, new dword MouseDataQueueSize decimal 16
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters ; KeyboardDataQueueSize decimal 16

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole ; EnableDCOM (N)

True display scaling, replace <id> with your unique id
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\<id>
"Scaling"=dword:00000002

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PriorityControl" /v "Win32PrioritySeparation" /t Reg_DWORD /d "40" /f

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StateRepository ; Start 4 (this completely breaks Windows installs above version 21H2)

Disable Task Manager (use ProcessExplorer or other alternatives when needed because Task Manager running constantly in the background is a hit for performance and latency)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies
new key called System, new 32-bit dword DisableTaskMgr 1

I recommend assigning separate cores to your
USB controller
GPU
PCI-to-PCI bridges related to the GPU
Ethernet
SATA
if you have 8+ cores and want to go for the lowest latency. I also use separate cores for system services like csrss, smss, wininit, lsass, fontdrvhost, winlogon

Remove hidden devices with DeviceCleanup which can dramatically reduce mouse lag and change input feel

Most modern games require DWM to be running at least while opening but most of the time it can be disabled with a script afterwards. So open your game and then run _disable.bat

msconfig -> Services: disable Cryptographic Services, DHCP Client, Fax, Network List Service,Network Setup Service,Network Location Awareness, Secondary Logon, Windows Connection Manager, WLAN AutoConfig


Startup steps:

XHCI IMOD change with RWEverything

Timer Resolution: if you used most things from this guide then Task Scheduler might not work so using TimerResolution as a startup task is not an option. I use TimerToolV3 to set my timer resolution to 0.5033 but anything like that or ISLC should work.

delete monitor EDID
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\DISPLAY\<id>\Device Parameters
restart with Win+CTRL+Shift+B

Disable power saving on every device just in case
PowerShell:
Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi | ForEach-Object { $_.enable = $false; $_.psbase.put(); }

kill sihost.exe, explorer.exe, WmiPrvSvc, WMIADAP before running games

Common knowledge but disable fullscreen optimizations for games.

There are some things I recommend that I won't cover here. On my github page you can find "regedit tweaks with amd gpu specific settings.bat". Some settings there are tailored to my system but generally it can be used for every computer, except for the AMD GPU specific parts.
There is also the test.zip folder which has tweaks from AlchemyTweaks on YouTube that I currently use.

For the last part I'm going to mention SCEWIN because I find it to be an integral part of latency reduction. You will see a SCEWIN settings collection file and while I run every single setting there without a problem it can make your PC completely unbootlable so be careful.
Last edited by Hyote on 17 Feb 2025, 18:30, edited 3 times in total.

cursed-gamer
Posts: 239
Joined: 16 Aug 2023, 13:07

Re: Very long postinstall guide

Post by cursed-gamer » 16 Oct 2024, 15:07

https://jobs.careers.microsoft.com/glob ... ofessional

Do you have some tweaks for ubuntu? I believe all the various issues are related only to Windows, is it right?

Hyote
Posts: 487
Joined: 09 Jan 2024, 18:08

Re: Very long postinstall guide

Post by Hyote » 16 Oct 2024, 15:39

cursed-gamer wrote:
16 Oct 2024, 15:07
https://jobs.careers.microsoft.com/glob ... ofessional

Do you have some tweaks for ubuntu? I believe all the various issues are related only to Windows, is it right?
I only ever used Arch and Fedora but it's true that I never faced any inconsistency. However I could not make them feel as natural as Windows.

ahead
Posts: 216
Joined: 21 Jun 2023, 02:15

Re: Very long postinstall guide

Post by ahead » 17 Oct 2024, 01:49

DisableTaskMgr prevents users from starting Task Manager. Task Manager is not running in the background by default; it's just a placebo effect.

dermodemon
Posts: 141
Joined: 10 Aug 2023, 12:03

Re: Very long postinstall guide

Post by dermodemon » 17 Oct 2024, 04:53

Well. Shit. Now my pc won't start. After login in windows i have an error
sihost.exe - system failure.
Sorry for my english:
Sihost.exe – System error – The system detected an overrun of a stack based buffer in this application. This overrun could potentially allow a malicious user to gain control of the application.


Okay i fixed it. I pressed alt+ctrl+del, ran a task manager and run regedit
The problem was a regedit tweak:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StateRepository
DO NOT CHANGE IT. Leave it at 2
default setting 2, shitty "tweaked" setting is 4

Hyote
Posts: 487
Joined: 09 Jan 2024, 18:08

Re: Very long postinstall guide

Post by Hyote » 17 Oct 2024, 07:05

dermodemon wrote:
17 Oct 2024, 04:53
Well. Shit. Now my pc won't start. After login in windows i have an error
sihost.exe - system failure.
Sorry for my english:
Sihost.exe – System error – The system detected an overrun of a stack based buffer in this application. This overrun could potentially allow a malicious user to gain control of the application.


Okay i fixed it. I pressed alt+ctrl+del, ran a task manager and run regedit
The problem was a regedit tweak:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StateRepository
DO NOT CHANGE IT. Leave it at 2
default setting 2, shitty "tweaked" setting is 4

Just because something doesn't work for you it isn't shitty. 5 year old throwing a temper tantrum when he doesn't know the possible consequences.
Moderator Added Note wrote:Since we have 150 countries actively participating in this forum, we run different rules around here, buddy. Please follow our forum rule "BE NICE TO NEWBIES".
Image

dermodemon
Posts: 141
Joined: 10 Aug 2023, 12:03

Re: Very long postinstall guide

Post by dermodemon » 17 Oct 2024, 07:49

Hyote wrote:
17 Oct 2024, 07:05
dermodemon wrote:
17 Oct 2024, 04:53
Well. Shit. Now my pc won't start. After login in windows i have an error
sihost.exe - system failure.
Sorry for my english:
Sihost.exe – System error – The system detected an overrun of a stack based buffer in this application. This overrun could potentially allow a malicious user to gain control of the application.


Okay i fixed it. I pressed alt+ctrl+del, ran a task manager and run regedit
The problem was a regedit tweak:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\StateRepository
DO NOT CHANGE IT. Leave it at 2
default setting 2, shitty "tweaked" setting is 4
Just because something doesn't work for you it isn't shitty. 5 year old throwing a temper tantrum when he doesn't know the possible consequences.
more than a half of your "tweaks" are doing literally nothing to input delay/lag

kishichiki
Posts: 5
Joined: 14 May 2024, 20:04

Re: Very long postinstall guide

Post by kishichiki » 17 Oct 2024, 17:16

Hyote wrote:
16 Oct 2024, 14:38


Next, bcdedits. Again depending on the Windows version there are a lot of cominations to use, but for 1803 I highly recommend disabling HPET, along with the entire ISA bus in regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msisadrv
"ErrorControl"=dword:00000001
"Start"=dword:00000004

For 1803 up to 22H2 I recommend these for latency and without HPET. CMD:
bcdedit /set tscsyncpolicy legacy
bcdedit /set hypervisorlaunchtype off
bcdedit /set useplatformclock false
bcdedit /set useplatformtick no
bcdedit /set disabledynamictick yes
bcdedit /set x2apicpolicy disable
bcdedit /set uselegacyapicmode yes

is there a real cause to do this on win 10 iot ltsc 22h2? instead of using a default one ?

Hyote
Posts: 487
Joined: 09 Jan 2024, 18:08

Re: Very long postinstall guide

Post by Hyote » 18 Oct 2024, 01:51

kishichiki wrote:
17 Oct 2024, 17:16
Hyote wrote:
16 Oct 2024, 14:38


Next, bcdedits. Again depending on the Windows version there are a lot of cominations to use, but for 1803 I highly recommend disabling HPET, along with the entire ISA bus in regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msisadrv
"ErrorControl"=dword:00000001
"Start"=dword:00000004

For 1803 up to 22H2 I recommend these for latency and without HPET. CMD:
bcdedit /set tscsyncpolicy legacy
bcdedit /set hypervisorlaunchtype off
bcdedit /set useplatformclock false
bcdedit /set useplatformtick no
bcdedit /set disabledynamictick yes
bcdedit /set x2apicpolicy disable
bcdedit /set uselegacyapicmode yes

is there a real cause to do this on win 10 iot ltsc 22h2? instead of using a default one ?
I used to use it on my ltsc install. Without them and with HPET it feels like running a virtual machine.

kishichiki
Posts: 5
Joined: 14 May 2024, 20:04

Re: Very long postinstall guide

Post by kishichiki » 18 Oct 2024, 04:05

Hyote wrote:
18 Oct 2024, 01:51
kishichiki wrote:
17 Oct 2024, 17:16
Hyote wrote:
16 Oct 2024, 14:38


Next, bcdedits. Again depending on the Windows version there are a lot of cominations to use, but for 1803 I highly recommend disabling HPET, along with the entire ISA bus in regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msisadrv
"ErrorControl"=dword:00000001
"Start"=dword:00000004

For 1803 up to 22H2 I recommend these for latency and without HPET. CMD:
bcdedit /set tscsyncpolicy legacy
bcdedit /set hypervisorlaunchtype off
bcdedit /set useplatformclock false
bcdedit /set useplatformtick no
bcdedit /set disabledynamictick yes
bcdedit /set x2apicpolicy disable
bcdedit /set uselegacyapicmode yes

is there a real cause to do this on win 10 iot ltsc 22h2? instead of using a default one ?
I used to use it on my ltsc install. Without them and with HPET it feels like running a virtual machine.
1. I'll try it ok, but what's the default values for these commands and should I disable HPET in device manager also wit this tweak commands?
2. And one more thing, after I made "true scaling" Step, my wallpapers on desktop are blurry asf, I make a default value like 4 instead of ur 2 and nothing happens.

Post Reply