Terrible framerates with an eGPU? Try disableing reBAR!

I’ve got an RX 7600XT eGPU in a TB4 enclosure connected to my ryzen AI 350 framework 13 over USB4, and have had very erratic performance in cyberpunk with my setup on linux using proton-ge. Got a pretty smooth 50/60 FPS on medium in some areas, but when moving quickly it frequently dropped below 30 FPS which is really pretty unacceptable with this hardware.

Turns out it’s because vkd3d’s use of resizable BAR is extremely latency sensitive! Disabling reBAR/SAM in DX12 titles with VKD3D_CONFIG=no_upload_hvv totally cured those FPS dips from fast movements and I’m getting a stable 50-60 FPS even when driving fast now on the same settings. Literally doubled my FPS during fast movement.

I know there’s a good number of linux + eGPU users on these forums, so hopefully this helps someone else who’s been banging their heads against this :slight_smile:

3 Likes

It’s not just this specific implementation.

The whole concept of what ReBAR is used for is extremely latency sensitive. Because it’s all about direct vs. indirect data transfers, which is just a giant trade off.

For this you essentially always need a heuristic when it’s worth it to use the direct transfers that ReBAR enables for classic GPUs. This heuristic is typically in the driver and can easily be wrong if the PCIe bandwidth and latency Is not what is expected for a specific GPU model.

And the less CPU time is available (on the core initiating the transfer), the more any direct transfers will hurt. And the only benefit direct transfers provide is less latency. If the discrepancy between direct and indirect is negligible compared to the transfer latency of the PCIe bus itself, there are no benefits to be gained, only penalties.

Sadly, we do not have measurements for eGPU (better USB4 PCIe) latencies, so we are still learning where that line is.