protonscr

NVAPI causing huge constant stuttering regression

vkd3dopen
HansKristian-Work/vkd3d-proton#2253 · opened 2024-12-12 by ethanh20009 · updated 2025-06-27 · 29 comments · github
Eethanh20009 2024-12-12 github

Running any DX12 title with
PROTON_LOG=1 LD_PRELOAD="" PROTON_HIDE_NVIDIA_GPU=0 PROTON_ENABLE_NVAPI=1 mangohud %command%
now results in a huge amount of stuttering. On my VA panel, it causes my screen to flicker with VRR.
Had no issues before on ProtonGE 18 (the most recent version without this issue).

With stutter:

https://github.com/user-attachments/assets/9f873147-d271-4d88-a3e9-eea07cf9fc8d

Without (using protonge18):

https://github.com/user-attachments/assets/0906fcf4-468e-4a31-8715-28dbb75cc40d

I can fix stutters by PROTON_HIDE_NVIDIA_GPU=1 or by using older version.

Software information

Marvel Rivals (for example)
Ultra settings,
No frame gen
Dlss quality

System information

  • GPU: Nvidia 4080
  • Driver: 565.77
  • Wine version: 680d20a
  • VKD3D-Proton version: 45e4453

Log files

steam-2767030.log

From looking at the logs I see a likely culprit being spammed...
dxvk-nvapi:<-NvAPI_D3D12_SetAsyncFrameMarker: No implementation

Eethanh20009 2024-12-12 github

Using VKD3D_DISABLE_EXTENSIONS=VK_NV_low_latency2
Does not fix the issue

Jjp7677 2024-12-12 github

Do you have LatencyFlex set up on your system?
(Currently on mobile, I haven’t looked in the logs yet)

Jjp7677 2024-12-12 github

Could you also switch to normal Proton Experimental and see what happens using that?

Eethanh20009 2024-12-12 github

Could you also switch to normal Proton Experimental and see what happens using that?

Tried using proton experimental just now, same issue.

Do you have LatencyFlex set up on your system? (Currently on mobile, I haven’t looked in the logs yet)

I haven't set up anything extra so if it's not setup by proton automatically or by kernel / cachy tweaks I don't think I have it.
Will try see if I've got it set up, if not install it and see.

Eethanh20009 2024-12-12 github

I installed https://aur.archlinux.org/packages/latencyflex-proton-ge-custom
and ran with that protonge.
Still getting the stutter.

Also tried with reflex setting ingame enabled and disabled and same result either way.

SSaancreed 2024-12-12 github

Friendly reminder that if you're on Proton 9+, PROTON_ENABLE_NVAPI variable does not exist and PROTON_HIDE_NVIDIA_GPU=0 is already the default.

I have a few things for you to try (preferably while running Proton Experimental):

  • First, DXVK_NVAPI_GPU_ARCH=GA100.
  • If that doesn't help, try DXVK_NVAPI_DISABLE_ENTRYPOINTS=NvAPI_D3D_GetLatency.
  • If that also doesn't change anything try the nuclear option: DXVK_NVAPI_DISABLE_ENTRYPOINTS=NvAPI_D3D_Sleep,NvAPI_D3D_SetSleepMode,NvAPI_D3D_GetSleepStatus,NvAPI_D3D_GetLatency,NvAPI_D3D_SetLatencyMarker,NvAPI_D3D12_SetAsyncFrameMarker,NvAPI_D3D12_NotifyOutOfBandCommandQueue (possibly combined with DXVK_NVAPI_GPU_ARCH=GA100 from first attempt) but be aware it will also make Reflex nonfunctional.
Eethanh20009 2024-12-12 github

Thanks, DXVK_NVAPI_GPU_ARCH=GA100 worked,
but now there's no frame generation support.

Jjp7677 2024-12-12 github

I installed https://aur.archlinux.org/packages/latencyflex-proton-ge-custom and ran with that protonge.

Sorry, I didn’t wanted you to install lfx, I just wanted to be sure that haven’t set it up. Please remove lfx if you have it installed now. You don’t need it with an NVIDIA gpu.

Thanks, DXVK_NVAPI_GPU_ARCH=GA100 worked, but now there's no frame generation support.

Yes, this is expected. This switch lets your GPU appear as Ampere generation which doesn’t support frame generation.

Eethanh20009 2024-12-12 github

Sorry, I didn’t wanted you to install lfx, I just wanted to be sure that haven’t set it up. Please remove lfx if you have it installed now. You don’t need it with NVIDIA gpu.

Cool, uninstalled

Yes, this is expected. This switch lets your GPU appear as Ampere generation which doesn’t support frame generation.

Yes, makes sense.
So when appearing as 4000 series, I'll always get the stuttering on new versions of vkd3d-proton.
This is even without frame generation enabled.
Trying to find a best case solution where I can use dlss frame generation without the stuttering and flickering.

SSaancreed 2024-12-12 github

Thanks, DXVK_NVAPI_GPU_ARCH=GA100 worked,
but now there's no frame generation support.

Right, I've seen a very similar issue with Ghost of Tsushima before which prompted me to apply the same workaround there: https://github.com/jp7677/dxvk-nvapi/pull/186, but that was before Proton had Frame Generation so nothing of value was lost anyway when we disabled reporting Ada GPUs for this game.

But the thing with GoT is that it was bugged only when DLFG would be nonfunctional anyway. Now that Proton supports it, this workaround was reverted and GoT does not exhibit this problem anymore. Can you try removing the variable, enabling Frame Generation, and checking then if the issue still persists? If yes, please get me a log from such a run.

(And please restart the game after enabling DLFG, it's known to behave quite… janky otherwise.)

Eethanh20009 2024-12-12 github

Okay so did with Cyberpunk (marvel rivals just gives me a black screen with frame generation)
Stutter persists.

Log was getting spammed, so had to only have a run for like 20 seconds.

steam-1091500.log

Eethanh20009 2024-12-12 github

Actually got Marvel Rivals frame generation to work, but the stutter still exists.
Restarted game then tested as recommended.

Log here:

steam-2767030.log

SSaancreed 2024-12-12 github

Welp. That's… not good, but also not something that I'd consider actionable for us, after all we're just forwarding the calls to Nvidia driver. If you are okay with losing DLFG, you can keep using the environment variable but it's not a good long term solution by any mean.

I guess we should try to have someone reproduce your findings, and with enough points of data attract some attention from Nvidia engineers.

Eethanh20009 2024-12-12 github

Thanks for your help. And yes sounds good. I'm happy to provide any more info if you need help reproducing.

Jjp7677 2024-12-13 github

Note that there is still something specific for your setup. Especially CP2077 gets a lot of attention and should just work just fine with all whistles and bells on your GPU generation.

Eethanh20009 2024-12-13 github

Any thoughts on what it could be or things I could try?
I've attached my log for Cyberpunk.

I've tried different kernels, switching from Nvidia open to closed and then turning off GSP.

Jjp7677 2024-12-13 github

Did you already tried with the most basic setup and a well known title (e.g. CP2077)? So e.g. a plain Gnome Desktop (X11 or Wayland) without tweaks (e.g starting without VRR or tearing), with regular Proton (Experimental) with a clean prefix, no overlays, no configuration settings, fresh restart (thus no resume from suspend) etc? Once this gives desired results, you could work forward one step at a time and hopefully detect what introduced your issue.

PS: Very likely unrelated, but i want to mention this one as well: https://github.com/doitsujin/dxvk/issues/4436#issuecomment-2466646597

Eethanh20009 2024-12-13 github

Just tried starting as clean as possible:

  • Tearing disabled
  • VRR disabled
  • No environment variables (e.g. removed __GL_VRR_ALLOWED,1)
  • Removed and regenerated Cyberpunk's wine prefix folder
  • Used proton experimental
  • No overlays
  • Fresh runs

Still not getting the desired results.
I've tried in the past running KDE plasma and I got the same behavior there too.

PS: Very likely unrelated, but i want to mention this one as well: https://github.com/doitsujin/dxvk/issues/4436#issuecomment-2466646597

Thanks for this, I used this to get mangohud and LD_PRELOAD="" to work together.
I've had issues with some games lagging after extended periods (a separate issue) which this fixed.

Jjp7677 2025-01-27 github

@ethanh20009 You might give the linked PR a try.

Eethanh20009 2025-01-28 github

I tried to give it a look. This was my first time manually compiling and using vkd3d proton so please let me know if I've done a step wrong and I can test again.

What I did when testing PR fix

Compile using
./package-release.sh frog ./build --no-package
Then copy the dlls into /home/ethan/.local/share/Steam/steamapps/common/Proton - Experimental/files/lib/wine/vkd3d-proton and vise versa for protonge-23

initial findings:

On nvidia 570 drivers, with proton bleeding edge

Overall, I've found the PR to make no difference. However newer versions of proton and vkd3d-proton (main branch) seem to have eliminated stuttering on marvel rivals without frame gen for 4000 series (no steam flags). It stutters like before (when previously I did not enable frame gen) but this time exclusively when frame gen is enabled.

On cyberpunk with frame gen enabled, I don't have stutters anymore, but frames are displayed in an inconsistent order.
I suspect frame gen frame is not being shown in between the two frames it was generated from. Hence, it appears to me as seeing double as it jumps between past and present frames. On high enough fps, this weirdness goes away weirdly, and is perfect like experience on windows native. Latency seems lower than when I tested on older versions when I initially made PR.

With fix:
still getting errors spammed:

4934.925:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.925:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.925:06b0:05b0:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 308830000 <= 308830000.
4934.936:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.936:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.936:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.937:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.937:06b0:05b0:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 308840000 <= 308840000.
4934.947:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.947:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.947:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.947:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.947:06b0:05b0:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 308850000 <= 308850000.
4934.958:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.958:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.958:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.959:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.959:06b0:05b0:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 308860000 <= 308860000.
4934.998:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.998:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.998:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.999:06b0:05b0:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE.
4934.999:06b0:05b0:warn:vkd3d-proton:d3d12_low_latency_device_SetLatencyMarker: PRESENT_START_NV is non-monotonic 308870000 <= 308870000.
Jjp7677 2025-01-28 github

Instead of building yourself, you can also grab an artifact from GitHub CI here: https://github.com/HansKristian-Work/vkd3d-proton/actions/runs/12994911507 The logs should show the exact version at the start, this confirms that you are running the correct build (or not).

Edit: This PR https://github.com/jp7677/dxvk-nvapi/pull/244 should fix the PRESENT_START_NV is non-monotonic log message, not sure yet if this fixes anything besides the log spam, but would be cool if you could include this version when testing.

Eethanh20009 2025-01-29 github

Split the logs using VKD3D_LOG_FILE=/cyberpunkvklog.txt

Error spam is gone, but frame jumping issue remains.

I took a slow mo to show.
https://github.com/user-attachments/assets/11b6eef5-fe64-4a1e-b8c4-cf3c03e750c6

steam-1091500.log

cyberpunkvklog.txt

Ran with the PR, confirmed using PR by build id. Got it to work by moving dlls next to cyberpunk exe.

No difference.

Weirdly, I had one run running main version (without PR) and it worked perfectly once.
Never managed to reproduce, so assume its a race condition (extremely rare to get the one that works 😆)

BBlisto91 2025-01-29 github

Is that the same issue? In your original post with videos i focused on the frametime bumps in mangohud since that is all i can notice is off in it. That is what the vkd3d-proton PR above should handle

Edit: Or did i misunderstand that there isn't only one issue reported here?

Eethanh20009 2025-01-30 github

You're right, there are multiple issues.

Using latest on main however the issue is no longer present anyway with frame time spikes without frame gen.

There is a separate issue now where frames on CP 2077 with frame gen display in wrong order. Pr does not fix.

I need to test marvel rivals with frame gen with the fix. At the moment it stutters only when frame gen is enabled. (This is better than original issue where it stuttered regardless on 4000 series)

Eethanh20009 2025-03-01 github

Just tested again after giving it a break for a while and issue is still present. Lots of frametime stutters on any dx12 game. Keeps causing my monitor to flicker from vrr to make it really noticeable.

Edit: https://github.com/HansKristian-Work/vkd3d-proton/pull/2317 fixes it. But requires me to use an old build for each dx12 game and manually copy files over each time.

Sshelterx 2025-03-06 github

I assume why #2317 isn't merged is because it's a quite dirty workaround? It does seem to help to fix stutter on my end too when i use FG. But is it a driver or implementation bug?

Rrmmh 2025-04-05 github

DXVK_NVAPI_GPU_ARCH=GA100 fixed persistent major stuttering (up to several seconds) in Monster Hunter Wilds on my RTX 5070 Ti, with Proton: 1743617450 experimental-9.0-20250402.

PROTON_LOG during the stuttering has a couple instances of 31051.947:0128:0164:warn:vkd3d-proton:d3d12_resource_QueryInterface: {6b3b2502-6e51-45b3-90ee-9884265e8df3} not implemented, returning E_NOINTERFACE. and several hundred repeats of 31051.952:0128:0164:warn:vkd3d-proton:d3d12_command_list_QueryInterface: {5b2662fb-eb28-4aec-819e-1c1b4de060f6} not implemented, returning E_NOINTERFACE. for the duration of the stutter.

Eethanh20009 2025-05-22 github

But is it a driver or implementation bug?

From my understanding its an Nvidia driver bug, VkWaitSemaphores does not yield in a consistent manner when frame gen is enabled, resulting in the uneven frame pacing.

Busy waiting as a workaround means getting the cpu to constantly ask over and over if the GPU is ready, instead of using the semaphore, resulting in a lot of unnecessary cpu usage.

I think the only way forward is to get this to Nvidia's attention, so they can do a proper fix in the driver.

SShochraos 2025-06-27 github

I am getting absurdly long loading times in Final Fantasy Rebirth with Proton Experimental and Proton 9.0.4

During these loading times my CPU usage ramps up to 100% and then down to normal usage 3 times per load. The loading screens usually last 3-5 minutes.

Ryzen 7 7800x3D
NVIDIA Geforce RTX 4090
32GB 6000 CL30
Lexar NM790 SSD (I am running on an SSD)

The proton log repeatedly prints the following sequence for around 1000 lines until the loading finishes:

10047.985:015c:0260:warn:vkd3d-proton:d3d12_command_queue_QueryInterface: {db6f6ddb-ac77-4e88-8253-819df9bbf140} not implemented, returning E_NOINTERFACE.

10047.989:015c:0278:warn:vkd3d-proton:vkd3d_native_sync_handle_release: Failed to release semaphore (#12a).

10047.989:015c:0278:warn:vkd3d-proton:dxgi_vk_swap_chain_wait_worker: Failed to increment swapchain semaphore. Did application forget to acquire?

So the errors are not only appearing during your stuttering issues but also during my loading issues which affect loading times of the game negatively for me.