protonscr

Forza Horizon 5; I/O Lag/Stuttering

protonclosed
ValveSoftware/Proton#5639 · opened 2022-03-03 by RPINerd · updated 2022-03-03 · 1 comments · github
RRPINerd 2022-03-03 github

Forza Horizon 5 (1551360)

System Information

GPU: AMD RX 6900 XT
Driver: 4.6 Mesa 21.3.7
Kernel: 5.16.11-arch1-1
inxi (https://gist.github.com/RPINerd/a6fa38ee3fe7024d2ae9acf40e8fe459)
Steam System Info (https://gist.github.com/RPINerd/0cc119e013647c7d9be51b1163f19109)
Proton versions tested on:
- 7.0-1
- 6.3-8
- Experimental
- Experimental [Bleeding Edge]

I confirm:

One report exists but is only for nVidia cards and inability to launch title
System is completely up to date with my distros repos

Proton Log Files

Just an interesting note, enabling logging caused my framerate to cut down to about 1/3 of normal. Approximately 100 seconds of gameplay (plus loading into the game) generated 1.2 Gb of log data and averaged 13MB/s of writing. Might wanna look into that, sounds like a hyper specific debug output was left on lol.
Github is not liking attachments, so heres a link (https://mega.nz/file/kFJ1kYQa#kDVpadDuyg0JbZVuS8h8t09VYBuRHM6Qb8J1nYYE3hk)

Symptoms

Unplayable framerate stuttering/lagging.

More specifically, it's almost a rubber banding like effect. As I am driving, the frame times will suddenly spike severely for a split second. The game freezes up and then within anywhere from a tenth of a second all the way up to nearly two seconds the game resumes playing at hyperspeed to catch up to "real-time". This cycle repeats generally every 10-30 seconds, depending on what I'm doing in the game.

Some quick highlights:

  • Fullscreen/windowed has no effect
  • Disabling compositing has no effect
  • GE proton versions exhibit same behavior
  • Higher graphical settings increase severity and length of spikes* (hypothesis below)
  • No one specific graphical setting appears to cause the issue
  • Tested on windows with same hardware, absolutely no hint of the same issue

Hypothesis/Details

So after many hours of close monitoring, I believe this all comes down to something weird going on with the balancing priorities of I/O (specifically reads) and GPU requests. The spike in frame timing perfectly coincides with the start of a read operation on the disk. I'm running the game off of an nVME SSD so there is no bottleneck in available bandwidth there. Watching the frame time and the gpu clock closely, it's super clear that the cycle goes:

  1. Read request from disk (loading assets, streaming open world, whatever)
  2. GPU clock cut down to idle (~500mHz)
  3. Desired assets from disk finished transfering
  4. GPU boosted back up to normal gaming frequency
  5. Frames that were backlogged during read operation all process at once causing game to go into super speed catchup mode
  6. Cycle repeats on next read request

This explains why the higher graphical settings exacerbate the issue as running the game at 1080p Low means that the 0.5-2 seconds at 500mhz is able to continue churning out frames relatively seamlessly, whereas at 1440p Extreme there is a huge amount of work the GPU just isn't able to crunch at that frequency

This is maybe the second time in my life that I've recorded a computer screen, so hopefully it looks clear on your end!
Video 1 (https://mega.nz/file/ZIInXS7C#30QWNnHLe8m5hX5af-g2O6EqjuXxtVYPGKeF6GHA2f8)
Video 2 (https://mega.nz/file/oFZhRKaQ#Le4Nff-v0f2veOx4gocjDmUQ2vmUrOpmUtSEBwBqL-g)

Kkisak-valve maintainer 2022-03-03 github

Hello @RPINerd, we're using one issue report per unofficially supported game title, so I've gone ahead and transferred this issue report to https://github.com/ValveSoftware/Proton/issues/5285#issuecomment-1058309634.

Upstream links