Skip to content

AMD Performance Fixes

ewagner12 edited this page Sep 25, 2024 · 8 revisions

Some people have had performance issues on AMD GPUs that have been fixed by doing one of the following:


Add kernel parameters:

Forcibly tell the amdgpu driver that it should be running at PCIe 3.0 speeds (8 GT/s) instead of reducing speed to PCIe 1.1 speeds (2.5 GT/s). The following should force PCIe 3.0 speed. Depending on your distribution you may need to update your initramfs or these module parameters may need to be added in a different way. Check if you're getting 8 GT/s using sudo lspci -vv.

  • Create a file named: /etc/modprobe.d/amd-pcie-fix.conf with the following content: options amdgpu pcie_gen_cap=0x40000

Note: This PCIe speed issue should be fixed in Linux kernel 6.8+

Force the amdgpu driver to see a small BAR instead of a large BAR/reBAR:

  • Create a file named: /etc/modprobe.d/amd-bar-fix.conf with the following content: options amdgpu vis_vramlimit=256

Adding environment variables: (can be added to /etc/environment)

  • Add RADV_PERFTEST=nosam as an environment variable to disable SAM in the RADV driver. (Should be default in Mesa 23.1+ at PCIe 3.0x4 or less bandwidth)

  • Add RADV_PERFTEST=dmashaders to allow upload shaders to invisible VRAM for non-resizable BAR systems (available on Mesa >= 23.1)

  • Add MESA_VK_DEVICE_SELECT=vid:did where "vid:did" is the vendor and device ids of the GPU (ex. 1002:67DF for an RX 480) to force Vulkan to select that card.


General Performance Recommendations (for all GPUs):

Ensure applications like games are running in fullscreen mode and not windowed for best performance.

If seeing very low (single digit) framerates, check VRAM utilization. Performance may begin to reduce at anywhere above 75% VRAM usage depending on the game. If VRAM allocation is close to the maximum, turn down texture settings or resolution to reduce VRAM usage.


DXVK Specific Issues:

In some certain DX11 games running through DXVK on Linux can cause low performance compared to Windows especially on eGPUs. If seeing low performance in a DX11 game, try adding the following environment variable:

DXVK_CONFIG="d3d11.cachedDynamicResources = a"

See the dxvk.conf for more information (https://github.com/doitsujin/dxvk/blob/master/dxvk.conf#L296).

This should be only applied where it helps performance and may not improve all games. As an example, Shadow of the Tomb Raider (DX11) is one such game where this variable improves performance on an RX 6600 over Thunderbolt 3 at 1080p High from 41 FPS to 61 FPS with a similar +50% improvement in minimum frame rates.