The articles, @Valiante has linked won't really solve the root issue and here is why:
Postpone app suspension with extended execution:
API → ExtendedExecutionSession
This simply postpones app suspension, doesn't prevent or disable it entirely. To fix the root issue, we want to disable this behavior entirely.
Run in the background indefinitely:
API → ExtendedExecutionForegroundSession
This does what we exactly want, prevent app suspension. Only problem? Apps that use this capability can't be submitted onto the Microsoft Store.
These APIs were introduced in Build 10240. So this issue could have been fixed very early on but it wasn't due to the reasons mentioned above.
The only way to prevent app suspension is put the package into debug mode using [IPackageDebugSettings::EnableDebugging|https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ipackagedebugsettings-enabledebugging]
.
As for what this method does:
Optionally enables debugger attach on activation.
Disables activation timeouts.
Disables automatic process suspension.
Disables automatic process termination.
Disables automatic process resumption.
This solves our issue but only problem is that it needs a Desktop app.
If the fix needs to be integrated then following can be done:
Create a desktop app that calls IPackageDebugSettings::EnableDebugging
on the invoking package.
Launch this desktop app using FullTrustProcessLauncher
, unlike ExtendedExecutionForegroundSession,
apps using this API can be submitted onto the Microsoft Store.
This effectively fixes the issue as a whole.
Only issue is now if an app doing something like this will be accepted onto the Microsoft Store. Apps need to certified before being submitted.
If not possible then migrating from UWP to Win32 would be an alternative solution and this has been done with Minecraft: Education Edition.
New Solution!
I found this by messing with RTSS' Settings!
Do the following:
1. Download RTSS
https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html
2. Add the MCBE Executable.
C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.16.21005.0_x64__8wekyb3d8bbwe
Add Minecraft.Windows.exe
3. Select Minecraft.Windows.exe
4. Now in the Scanline Sync input box, enter any negative value.
(Ensure VSync is disabled in the options.txt)
5. In my case I have entered -400.
6. And you are done! The input lag issue should be gone!
Here's a list of solutions you can try.
Before you begin;
1. Make sure you are using 1.16.20x or 1.16.2xx
2. All GPU Drivers updated to their latest versions.
Solutions:
1. Disable VSync.
This is solution seems to be effective on systems with a DGPU but might also work on an iGPU.
Steps:
1. Navigate to this file path:
%LocalAppdata%\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftpe
2. Open the options.txt file.
3. Change "gfx_vsync:1" to "gfx_vsync:0"
This is will disable VSync ingame.
4. Now open up your graphics control panel.
5. And set VSync to Off.
Note:
This solution worked for me on MCBE 1.16.210
Solution 2:
Works with any GPU.
Framerate = Refresh Rate - 1
Here you limit our framerate to our monitor's refresh rate but also offset by -1.
Steps:
1. Download RTSS
https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html
2. Add the MCBE Executable.
C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.16.21005.0_x64__8wekyb3d8bbwe
Add Minecraft.Windows.exe
3. Now select Minecraft.Windows.exe in RTSS and set your framerate limit to your monitor's refresh rate but offset it by -1 meaning if you have a 60Hz Monitor enter 59.
[media]6. Enable the Start with Windows option.
I used rivatuner to limit my mcbe fps to 59 which fixed the input lag issue
For those you want to try out demonstrated fix, please check out Stonecutter which is available on my GitHub.
I recommend going through the source code for "src/DllMain.c" which contains the V-Sync fix.
I am hopeful Mojang goes out of their way & fixes this V-Sync issue once & for all.