protonscr

Input Lag in Grand Theft Auto IV / Episodes from Liberty City

dxvkclosed d3d9can't reproducewindows
doitsujin/dxvk#2755 · opened 2022-07-25 by MrEWhite · updated 2025-04-16 · 26 comments · github
1 matching comments, n / p to jump
MMrEWhite 2022-07-25 github

If I use DXVK on GTA IV, I get input latency that doesn't occur when running the game without it. It happens if I use v-sync or not, so I have no clue what the issue could be here. Happens with any mixture of settings/resolution/frame rate, and happens with dxgi.maxFrameLatency & d3d9.maxFrameLatency set to 1.

It's not an unbearable amount of input lag, but it's most definitely noticeable when compared to running the game without DXVK.

Software information

Disc version of Grand Theft Auto IV on Patch 1.0.8.0

System information

  • GPU: Nvidia RTX 3090
  • Driver: 516.79
  • DXVK version: v1.10.2
  • Windows 11 Pro

Log files

GTAIV_d3d9.log

KK0bin maintainer 2022-07-25 github

I can't really tell you anything except that it feels perfectly fine on my system.

Make sure you don't have any Vulkan layers like overlays or recording tools installed. Those could mess things up.

MMrEWhite 2022-07-25 github

I can't really tell you anything except that it feels perfectly fine on my system.

Make sure you don't have any Vulkan layers like overlays or recording tools installed. Those could mess things up.

I don't have anything like that installed.

EEvernow 2022-08-01 github

Does it also occur on Linux?

DDaveACG 2022-09-09 github

Can second this. DXVK produces a significant amount of input lag compared to DX9 in GTA IV.

EEvernow 2022-09-09 github

Can second this. DXVK produces a significant amount of input lag compared to DX9 in GTA IV.

Did you observe this on Linux?

DDaveACG 2022-09-09 github

Can second this. DXVK produces a significant amount of input lag compared to DX9 in GTA IV.

Did you observe this on Linux?

Whoops no, Windows. My error, forgot that dxvk on Windows is more of an 'off label' usage of it. :)

MMrEWhite 2022-09-09 github

Does it also occur on Linux?

Sorry I forgot to reply to this, but I don't have a Linux install, so I couldn't test it.

FFNsi 2023-07-02 github

I have a strong input lag in fallout4/ Skyrim in linux...

Nnetborg-afps 2023-07-02 github

I have a strong input lag in fallout4/ Skyrim in linux...

Do you have v-sync enabled? Which causes a few frames to get rendered ahead if the cpu is faster than the gpu/v-sync limit. You should definitely try setting dxgi.maxFrameLatency & d3d9.maxFrameLatency to 1, default is 3.

FFNsi 2023-07-03 github

You should definitely try setting dxgi.maxFrameLatency & d3d9.maxFrameLatency to 1, default is 3.

How can I set dxvk.conf in heroic game launcher? It's not working by putting dxvk.conf to the game fold, either the system32/wow64...

Nnetborg-afps 2023-07-03 github

You should definitely try setting dxgi.maxFrameLatency & d3d9.maxFrameLatency to 1, default is 3.

How can I set dxvk.conf in heroic game launcher? It's not working by putting dxvk.conf to the game fold, either the system32/wow64...

I only got one game to test there, but it was working out to put the dxvk.conf into the folder where the game exe is. Alternatively you can set the environment variable DXVK_CONFIG_FILE=/xxx/dxvk.conf in the Heroic launcher settings. Using DXVK_LOG_LEVEL=info and DXVK_LOG_PATH=/some/directory might help to see if it's loading the config.

Also I just found out that you probably want newest graphics driver and bleeding edge dxvk, the latency control was added after v.2.2.

FFNsi 2023-07-03 github

Also I just found out that you probably want newest graphics driver and bleeding edge dxvk, the latency control was added after v.2.2.

That only happens in Bethesda games, I have no clue for it...

Mmirh 2023-07-04 github

What if you tinker with dxgi.numBackBuffers & d3d9.numBackBuffers?

Nnetborg-afps 2023-07-05 github

What if you tinker with dxgi.numBackBuffers & d3d9.numBackBuffers?

I have been measuring this, it's not doing much anymore, at least after the recent addition of latency objects.

But I would assume, the Bethesda games might use internal buffering on top. Have never played the games you mentioned, but in Quake Champions, this seems also to be the case, one (or two?) extra frame(s) of latency cause of the engine (I have measured this in Windows), maybe cause they have GPU memory transfer somewhere, or what do I know.

In case this would be an engine-thing, the only thing that helps reducing latency, is to up the frame rate.

FFNsi 2023-07-05 github

Thanks for help!
More information might concern:
1.the mouse is working well without input latency...

2.in windows all good.

3.I am using igpu. (Amd 680m) which could run the ultra settings in 2k/27~40fps in windows.

4.I didn't test the buffer setting yet, but I will.

5.interval setting is not working.

I think the problem is the memory transferring...

Nnetborg-afps 2023-07-05 github

Like I said, you probably want to get a bleeding-edge dxvk, possibly proton-GE-8-10 or compile it yourself. Also newest graphics drivers? Then setting dxgi.maxFrameLatency & d3d9.maxFrameLatency to 1 should do wonders.

iGPU should not have any issues with memory transfer?! I just thought maybe their engines would put a "pipeline-step" in there to account for such things.

FFNsi 2023-07-05 github

iGPU should not have any issues with memory transfer?! I just thought maybe their engines would put a "pipeline-step" in there to account for such things.

I mean, there must be multi copies in that special case, I am using wine-ge-proton8-8, also wine 8.0, lutris-ge-proton8-7, none of those working fine in both games.

But obviously what I mentioned does not happened in windows, with or without dxvk, they are working fine to play around even with tons of mods.

Or it's amd driver problem if intel igpu working fine in Linux?

Nnetborg-afps 2023-07-05 github

Hmm, I'm still a bit new to this, but wine-ge-proton doesn't include dxvk? You need a newest dxvk (2.2 is too old for this to work).

I've been invested a bit into this latency topic. From what I gathered, on Windows drivers reduce latency while they won't on linux?! (I have nvidia) But you can improve latency like discussed above.

FFNsi 2023-07-05 github

I've been invested a bit into this latency topic. From what I gathered, on Windows drivers reduce latency while they won't on linux?! (I have nvidia) But you can improve latency like discussed above.

yep I am using 2.2 dxvk.
No much clue😅

KK0bin maintainer 2023-07-05 github

FYI Skyrim and Fallout 4 don't use DXGI waitable objects, so I'm not sure whether new DXVK versions make any difference there.

FFNsi 2023-07-05 github

FYI Skyrim and Fallout 4 don't use DXGI waitable objects, so I'm not sure whether new DXVK versions make any difference there.

That proofed what I said...

But obviously what I mentioned does not happened in windows, with or without dxvk, they are working fine to play around even with tons of mods.

Nnetborg-afps 2023-07-05 github

You can compile newest dxvk from master, or look where you can find it precompiled.
I am sure this helps if you are using v-sync, even when the game doesn't use waitable objects.
For non-v-sync I have not tested yet.

MMrEWhite 2023-07-05 github

GTA IV certainly feels a bit better with the latest DXVK from the master branch (from actions). Not better than native mind you, but less latency.

FFNsi 2023-07-14 github

Guys today I did increase my igpu vram to 8g, the lag is nearly disappeared. I have a wide guess: it's due to the copies from ram to vram. Which shouldn't happen in igpu.

Nnetborg-afps 2025-02-20 github

@MrEWhite I just tested my newest low-latency frame pacing on the scene when entering the game:
d3d9.maxFrameLatency = 1: 342 fps, 5.7 ms render latency
dxvk.lowLatencyAllowCpuFramesOverlap = True: 326 fps, 4.6 ms render latency
dxvk.lowLatencyAllowCpuFramesOverlap = False: 326 fps, 3.7 ms render latency

So yes, even if you aren't in the GPU limit, the CSThread is creating input lag in GTA4 which you currently can negate by using this config variable. For one of the next versions, I'll try to sync this automatically with less constrains and more fps.

https://github.com/netborg-afps/dxvk/releases

BBlisto91 2025-03-14 github

@MrEWhite If you are still around then try the 2.6 release along with dxvk.latencySleep = True in a config file

Proton versions

Launch options