protonscr

Remnant II very high frame times when rendering 3D

vkd3dclosed
HansKristian-Work/vkd3d-proton#1699 · opened 2023-09-13 by sheepguard · updated 2023-09-23 · 7 comments · github
Ssheepguard 2023-09-13 github

The game launches fine, and the 2D splash screen has no performance issues. When it tries to render the main menu (it has a 3d model of your game character in the middle), the average frametime jumps to ~10000 ms (anything from 3-20 seconds), and the whole app becomes very slow; any input takes multiple frames (each maybe 7 seconds long) to process. The game has a feature where it automatically sets the settings on first launch based on either hardware or performance (don't know which), and it set the settings to lowest. The game runs well with no issues on windows (with medium-high settings) on the same machine, and i haven't had this issue in other dx12 games on linux (not that i've played many), or any other game (unreal engine or not) for that matter.

GPU utilization drops to 0% (it's 50-70% in the splash screen), so it seems like it's for some reason using some sort of (singlethreaded) software rendering, explaining the poor performance. All the features listed on the main page should be supported, if vulkaninfo is right. I haven't tried getting in the game world yet, but i doubt anything will change. The issue happens on both wayland and X, so it's not that. This happens with both the integrated and the dedicated gpu.

Output of vulkaninfo and a game screenshot:
vulkaninfo.txt
screenshot_20230913-182827

Software information

Remnant II, on steam. Happens with all launch options i've tried, but currently using gamescope to make the window easier to remove. PROTON_LOG=1 gamescope -e -r 60 -w 1920 -h 1080 mangohud %command%

System information

  • GPU: Radeon RX 6700M (MSI Delta A5EFK) &
  • Driver: Mesa RADV 23.1.7
  • Wine version: All proton versions i've tested behave the same. Currently on Proton Experimental.
  • VKD3D-Proton version: 2.10

Log files

Proton log: steam-1282100.log

Ddoitsujin maintainer 2023-09-20 github

The game generally runs well on RADV, so there's probably some issue specific to your setup. Please check sudo perf top and see if anything sticks out on top of the list, random guess would be either that the system defaults to HPET for some reason or that the kernel constantly moves memory pages around.

It definitely doesn't do software rendering though, we literally have no code for that. The issue is more that it doesn't do any rendering at all and instead wastes huge amounts of time on... unrelated stuff.

Ssheepguard 2023-09-21 github

I see, thanks for the clarification. With some testing i noticed that it was using basically no VRAM when running: 60M baseline, usage at 70M when the game is running, out of the 10 gigs i have. Compared to, for example, the first (less graphically intensive) Remnant game using 3800M. Seeing 0% gpu usage and no vram usage with a small 2-5% jump each time a frame is displayed just made me think that the game is somehow rendered on the cpu and the gpu just displays the frame each time it's ready. But needless waiting could also make sense.

This is what perf top looks like when steam and remnant are running: image
Fresh after a reboot, idle:
image
Steam & firefox are but the game isn't running:
image

There could be a lower level issue as well, as I now have had the exact same problem on a dx11 game (Generation Zero) running with DXVK instead of vkd3d (maybe a problem with radv, or something else totally, it's not using any vram, for example). But that game is playable with wined3d (it uses the gpu and vram), so maybe dxvk and vkd3d have something in common that fails here, for my system specifically? And I haven't seen this in any other dx11/12 games, they all use an expected amount of vram and overall gpu utilization isn't particularly low.

At least with Generation Zero the memory pages might have something to do with it, here at 12% and occasionally 20% overhead (compared to idle where they are below 1%):
image

All that said, Remnant II is suddenly running fine since yesterday night (and the dx11 game is not), even though I don't think I did anything in particular, with 99% gpu usage and 4 gigs VRAM usage. Well, it runs worse than on windows but still around 50fps on low graphics instead of 0.2 fps. Thanks for taking the time to answer even if vkd3d isn't the problem here, it's just a really strange issue, and I still don't know what's causing it for the other game.

Mmbriar 2023-09-22 github

The problem is that your clocksource is hpet instead of tsc, a somewhat common problem on ryzen laptops.
https://wiki.archlinux.org/title/gaming#Improve_clock_gettime_throughput

Ssheepguard 2023-09-22 github

Looking at /sys/devices/system/clocksource/clocksource0/current_clocksource, it's tsc before, during and after launching the game (but it's running fine now as well, and read_hpet isn't showing up on perf top). There's a good chance it was using hpet but somehow fixed itself (I did set tsc enabled with the kernel parameters mentioned on that wiki page afterwards to be sure). In any case, vkd3d isn't at fault in this case, so this can be closed.

Should I make a new issue on DXVK's github about the other game, since it's not lagging (though has visual issues) under wined3d but still is (3-second frametimes even with tsc enabled) under DXVK? Although before I do that, I'd appreciate if you could point me towards information about the memory page issue it seems to have so I can troubleshoot and test more.

Ddoitsujin maintainer 2023-09-22 github

Which game is "the other game"?

Ssheepguard 2023-09-22 github

Generation Zero, a dx11 open world game I'm trying to run with DXVK, which I mentioned in my second comment here. It has the exact same <1 fps + no vram usage issue I had in Remnant II, but it's not because of hpet, it seems like it's related to memory since perf top shows 20% overhead for copy_page when it's running (unlike all other games i've played). A wild guess would be that it can't use the vram for some reason and is then defaulting to system memory and slowing down.

Ssheepguard 2023-09-23 github

Well, after hours of troubleshooting I found the game's settings file and changed a setting there, now it works flawlessly. That's already off-topic and the issue was on my end, so I'm closing this.

Proton versions

Launch options