vkd3d-proton icon indicating copy to clipboard operation
vkd3d-proton copied to clipboard

Cyberpunk 2077 - different kind of stutter

Open jkrhu opened this issue 1 year ago • 9 comments

Hi!

I've been replaying CP77 on Linux recently and came across some strange hitches or stutters in certain parts of the map. At first I thought it was due to DXR. Perhaps huge amounts of skeletal meshes like vehicles and characters create a bottleneck. But then there would be times where it is absolutely empty and certain places would still exhibit stutters. I want to preface this, that it is not shader compilation stutter, or at least I hope it's not, because I've been visiting the same places many times over and seeing this behavior. I have also barely to no cache to merge at this point between sessions. I have been driving all over the map and luckily managed to find a spot where I'm able to reproduce this stuttering issue. No matter if DXR is on or off. It's right in front of Vs default apartment. Going around in circles produces this very strange hitching. I've tested this on vsynced 30fps while the PC is underutilized as well as with unlocked framerate. Both scenarios show stutter. At this point I'm not sure what might be causing this. Maybe it's related to asset streaming or perhaps theres a unoptimized material/shader type that causes it. Something's definitely not right.

I've prepared 3 clips showcasing this problem:

CP77, Vsync Off, DXR Off - https://youtu.be/cppJJ_YCKqE (here the stutter is really nauseating) CP77, 30fps Cap, DXR Off - https://youtu.be/SsL2ljtq8W4 CP77, 30fps Cap, DXR On - https://youtu.be/6FOOVjmtuNA

I've also captured a log file from the short session showcasing this problem. I'm seeing a lot of these warnings throughout. Could this contribute to this sort of syncing issue?:

warn:d3d12_command_list_OMSetRenderTargets: RTV descriptor 1 is not initialized.
warn:d3d12_fence_signal_event: Failed to release semaphore. Application likely forgot to wait for presentation event.

I'm providing the full "warn" log below: CP77 DXR.log

My specs: Fedora Linux 36 (6.0.5-200.fc36.x86_64) i5 10400 RTX 3060 (520.56.06) 16GB RAM 500GB NVME Gen 3 SSD

Let me know if I can do something else to help you guys out. I think the repro on this particular spot is probably 100%.

jkrhu avatar Nov 05 '22 19:11 jkrhu

Hmm tried also. I do have few stutters there also, but i assume its from the high crowd and vehicle density thats being loaded in and thus being CPU bottlenecked heavily there. Doesn't look as bad as you seem to be getting

CP77, 1440p, High, Vsync Off, DXR Off: https://www.youtube.com/watch?v=8HvT1A43Lpo

Specs: Arch Linux (6.0.6-zen) MATE Desktop, X11 vkd3d-proton v2.7 R7 3700X RTX 3080 (515.49.24) 32GB RAM 2TB SATA SSD

xpander69 avatar Nov 07 '22 12:11 xpander69

I've captured another short gameplay video showcasing this issue. This time I'm displaying all the CPU threads, RAM, VRAM and swap file. Perhaps it is due to some I/O or render thread being full, but it doesn't look like it from the on-screen overlay. All threads look evenly distributed and it doesn't seem like any one of them is bottlenecking the rest.

Link to the video here, I've added chapters for your convenience. - https://youtu.be/EndwPcxndAU

Tried out the new update and found out that DLSS amplifies the stuttering issue. With the new FSR 2.1 it's better, although still happening. Even with static camera movements.

jkrhu avatar Nov 07 '22 23:11 jkrhu

try disabling swap for the test

mazixs avatar Nov 14 '22 23:11 mazixs

try disabling swap for the test

Just tried this out with sudo swapoff -a and unfortunately it did not help. Thank you for the suggestion tho.

jkrhu avatar Nov 15 '22 20:11 jkrhu

I've been playing some more CP77 over the past few days using GE-Proton7-42 with some of the latest changes to VKD3D-Proton. There is an improvement in stuttering during traversal. The trouble spots still exhibit stutter, but it's been much smoother overall.

My specs: Fedora Linux 37 (6.0.10-300.fc37.x86_64) RTX 3060 (520.56.06)

jkrhu avatar Dec 05 '22 13:12 jkrhu

I upgraded my 3700X to 5800X3D and now in the same spot it never drops below 85 fps.. minimums overall are so much better with that cpu.. 525.60.11 drivers.

So my bet is that its still some sort of CPU bottleneck there.

xpander69 avatar Dec 05 '22 14:12 xpander69

I had a bunch of stutters while driving and walking around, thought it was shader caching at first, but i kept happening even after a while.

Fixed it by removing BAR adding VKD3D-CONFIG=no_upload_hvv=1. Edit: forgot to add specs. Ryzen 7 5800H and RX 6600M

LankyFranky89 avatar Dec 29 '22 09:12 LankyFranky89

Fixed it by removing BAR

@LankyFranky89 do you mean disabling Resizable Bar in BIOS?

GrabbenD avatar Aug 26 '23 14:08 GrabbenD

Fixed it by removing BAR

@LankyFranky89 do you mean disabling Resizable Bar in BIOS?

They probably mean this env variable - VKD3D_CONFIG=no_upload_hvv

jkrhu avatar Aug 26 '23 18:08 jkrhu