amdgpu uses excessive amount of vram and doesn't free vram either on both Linux and Windows when rebar-above4gdecoding is enabled
Brief summary of the problem:
This is a problem that affects the following on both platforms:
- Red Dead Redemption 2 Vulkan renderer ( default of the game )
Affected drivers:
- AMD prop driver for Windows
- AMD Gpu-Pro for Linux
- AMDVLK
- RADV
Temporary solution/workaround:
- Disabling rebar/above 4G decoding in UEFI.
Reports from Windows users as well:
https://community.amd.com/t5/graphics/rx-6000-cards-vram-leak-on-vulkan-rdr2/td-p/498874
I've used Proton Experimental as compatibility layer on Linux.
Hardware description:
-
CPU: Ryzen 7 7800X3D
-
GPU: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] [1002:744c] (rev c8) 12:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb)
-
System Memory: 2x32 GB DDR5 5600
-
Display(s): 1
-
Type of Display Connection: DisplayPort
System information:
System:
Kernel: 6.4.4-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
Desktop: KDE Plasma v: 5.27.6 Distro: EndeavourOS base: Arch Linux
Machine:
Type: Desktop Mobo: Gigabyte model: B650M DS3H v: x.x
serial: <superuser required> UEFI: American Megatrends LLC. v: F6
date: 05/17/2023
CPU:
Info: 8-core model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP arch: Zen 4
rev: 2 cache: L1: 512 KiB L2: 8 MiB L3: 96 MiB
Speed (MHz): avg: 2967 high: 3736 min/max: 3000/5049 boost: enabled cores:
1: 3590 2: 3000 3: 2781 4: 3000 5: 3000 6: 2773 7: 2811 8: 2765 9: 3000
10: 3736 11: 2746 12: 2835 13: 2793 14: 2863 15: 2793 16: 3000
bogomips: 134195
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX] vendor: Sapphire PULSE
driver: amdgpu v: kernel arch: RDNA-3 bus-ID: 03:00.0
Device-2: AMD Raphael vendor: Gigabyte driver: amdgpu v: kernel
arch: RDNA-2 bus-ID: 12:00.0 temp: 41.0 C
Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu,amdgpu
resolution: 2560x1440
API: OpenGL v: 4.6 Mesa 23.1.3 renderer: AMD Radeon RX 7900 XTX (gfx1100
LLVM 15.0.7 DRM 3.52 6.4.4-arch1-1) direct-render: Yes
Audio:
Device-1: AMD driver: snd_hda_intel v: kernel bus-ID: 03:00.1
Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
v: kernel bus-ID: 12:00.1
Device-3: AMD Family 17h/19h HD Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel bus-ID: 12:00.6
API: ALSA v: k6.4.4-arch1-1 status: kernel-api
Server-1: PipeWire v: 0.3.74 status: active
Network:
Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
port: e000 bus-ID: 0e:00.0
IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
v: 0.8 type: USB bus-ID: 7-1.4:5
Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: see --recommends
Drives:
Local Storage: total: 1.82 TiB used: 1.42 TiB (78.0%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 990 PRO 2TB size: 1.82 TiB
temp: 43.9 C
Partition:
ID-1: / size: 1.79 TiB used: 1.42 TiB (79.4%) fs: ext4 dev: /dev/nvme0n1p2
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 48.4 C mobo: N/A
Fan Speeds (RPM): N/A
GPU: device: amdgpu temp: 51.0 C fan: 139 device: amdgpu temp: 41.0 C
Info:
Processes: 359 Uptime: 22m Memory: total: 64 GiB available: 61.96 GiB
used: 6.54 GiB (10.6%) Init: systemd Compilers: gcc: 13.1.1 Packages: 1213
Shell: Bash v: 5.1.16 inxi: 3.3.28
How to reproduce the issue:
- Boot RDR2,go into graphics settings, run the benchmark with SAM/REBAR on the system , do the same with SAM/REBAR off
Attached files:
In case if needed , my settings file.
Retrieved from .steam/steam/steamapps/compatdata/1174180/pfx/drive_c/users/steamuser/Documents/Rockstar Games/Red Dead Redemption 2/Settings
On Windows it would be simply Documents/Rockstar Games/Red Dead Redemption 2/Settings
Screenshots/video files
Screenshots that shows vram usage at the end of benchmark for rebar on and off situations.
Rebar on:
Rebar off:
16.1 GB vs 8.5 GB which 8.5 GB value is also the in game settings menu suggests as it would be using.
Log files (for system lockups / game freezes / crashes)
I grabbed couple of logs from both situations, attaching them as tar files here.