Question about optimizing for Steam Deck and RHI_Translate?

Hello, I made a simple scene for the game, my unlocked framerate is high on SteamDeck 80-90, but I see microstutters every now and then even with locked fps to 60, so I decided to use insights,

here are the details:

-Doesn’t happen on PC (my PC is overkill tho Ryzen 7800x3D, RTX 4080, 32GB DDR5)

-screenpercentage 100%, vsync on, 60Hz

-ForwardShading

-Tried with development build and shipping, same behaviour.

-I build only for Windows, so Steam Deck is using proton (Experimental) to run the game.

-Don’t have anything to do with shader stutter, because the scene is small and I run it at least couple of times

Now this is how my frametime graph looks on Steam Deck (locked to 60fps):

This is how good frame 16.7ms looks like:

And this is one of the spike frames around 31-33ms each:

I am new to all of this, but for me it looks like RHI_Translate and D3D12_Present takes too much time and thats why the game stutter? Also everytime it stutter its like the same 31-33ms range.

My goal is to achieve stable 60 fps gameplay without stutters on Steam Deck.

I don’t know if its of any help, but this is how the scene looks like now:

https://www.youtube.com/watch?v=yMrMwOqHEy8

After more testing I have some interesting observation. It seems like Steam Deck APU have problem with setting optimal CPU frequency.

Let me explain:

-t.maxfps=0, r.vsync=1, SD frame limiter disabled, 60Hz refresh.

Every CPU core frequency around 1.6GHz = stutter as seen above.

-t.maxfps=0, r.vsync=0, SD frame limiter enabled, 60Hz refresh.

Same as above

-t.maxfps=60, r.vsync=0, SD frame limiter disabled, 60Hz refresh.

Every CPU core set to around 2.5-2.7 GHz, a lot of stutters and uneven frame pacing despite showing 60 fps all the time, completely unplayable experience.

-t.maxfps=0, r.vsync=1, SD frame limiter disabled, 60Hz refresh. CPU frequency set manually to 3.5GHz

This is the best outcome, framerate is smoother, there are some spikes still but fewer.

Edit:

Today I tried to disable RHIThread and see what happens

Commands I used:

r.vsync=1
r.GTSyncType=2
r.OneFrameThreadLag=1
rhi.SyncSlackMS=10
rhi.SyncInterval=1
r.rhicmdbypass=1

no manual CPU settings on Steam deck

Also on game run in bp execute command:

r.RHIThread.Enable 0

This is the result of good 16.7ms frame:

And bad 31.4ms frame:

now everytime the game stutter D3D12_Present takes a lot of time.

I think I found the solution that works for me at least for now.

Commands:

r.Screenpercentage=100
t.maxfps=0
r.vsync=1
r.GTSyncType=0
r.OneFrameThreadLag=0
rhi.SyncSlackMS=0
rhi.SyncInterval=1
r.rhicmdbypass=0

r.OneFrameThreadLag=0 makes the biggest difference. On 1 the game still stutter and on 0 its finally running smooth on steam deck. The downside is a little lower fps when unlocked, its mostly visible on my PC ~350→~260, on steam deck ~90→~75, but as long as I can lock to stable 60fps I’m happy with it :slight_smile:

Now Frametime Graph looks like this:

and one random frame:

Still I don’t think its the best solution, because from what I can see now the game uses less GPU power/resources hence lower fps. If anyone have better solution I’d gladly hear it.