[RADV] Performance loss after few game restarts
Description
Hello,
I get on Overwatch a big performance loss after one or few game restart(s): instead of having a stable 250fps, my game runs around 160fps instead (smaller difference in the training range, where I took the videos I attached bellow). I have been having this issue for a few months now and several versions of the kernel/wine/dxvk/mesa didn't solve this issue.
Video files
Please have a look at the following demonstrative videos
-
Good frame rate, that I usually only have when freshly (re)started
- mesa RADV: mesa-radv-good-framerate.mkv
- amdgpu-pro: amdgpu-pro-good-framerate.mkv
-
Bad frame rate, usually it happens after restarting my game only once (whether I kill all wine processes or not). Sometimes it needs more than one restart. If my computer is running for a while, a single restart is enough to reproduce this.
- mesa RADV: mesa-radv-bad-framerate.mkv
- amdgpu-pro: amdgpu-pro-bad-framerate.mkv
Small analysis
From looking at these videos, it looks like the frame rate drops coincide with the fact that the GPU's frequency (SCLK) runs lower and dips to few hundred MHz instead of usually staying around ~2Ghz. Although in normal performance and frame rate I have noticed the frequency does still dip to 800Mhz (but not 200Mhz)
- I tried playing with the power profiles but to no avail:
- Doing
echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level
followed byecho "3" > /sys/class/drm/card0/device/pp_power_profile_mode
, where"3"
corresponds to the3D_FULL_SCREEN
mode did not make any difference. - Same goes for
"echo "performance" > /sys/class/drm/card0/device/power_dpm_state
- Doing
Log files (for system lockups / game freezes / crashes)
-
Output of
dmesg
: dmesg -
Hang reports: I did run overwatch with
RADV_DEBUG=hang
but no folder is in$HOME/radv_dumps_*/
, although interestingly the GPU's frequency (SCLK) is capped and stable at ~2000Mhz, the frame rate stable at ~130fps, see mesa-radv-bad-frameare-debug-hang.mkv
Steps to reproduce
- Start Overwatch, go to training range and check frame rate on character selection, after choosing one and when showing the scoreboard (see attached videos for a demo)
- close Overwatch, kill wine processes
- redo step 1. and 2. till the frame rate is lower.
System information
System:
Host: leyantoo Kernel: 5.17.3-tkg-lto x86_64 bits: 64 compiler: clang
v: 14.0.0, Desktop: LXQt 1.0.0 wm: Openbox dm: GDM
Distro: Gentoo Base System release 2.8
CPU:
Info: 16-core model: AMD Ryzen 9 5950X bits: 64 type: MT MCP arch: Zen 3
rev: 0 cache: L1: 1024 KiB L2: 8 MiB L3: 64 MiB
Speed (MHz): avg: 3737 high: 4684 min/max: 2200/5083 boost: enabled
cores: 1: 3599 2: 3597 3: 3596 4: 3599 5: 3599 6: 3599 7: 3597 8: 3592
9: 3790 10: 3807 11: 3694 12: 3650 13: 3763 14: 4684 15: 4128 16: 3848
17: 3599 18: 3598 19: 3890 20: 3607 21: 3596 22: 3598 23: 3597 24: 3597
25: 3686 26: 3858 27: 3837 28: 3598 29: 3766 30: 4115 31: 3912 32: 3606
bogomips: 217631
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
vendor: Tul driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16 ports:
active: DP-1 empty: DP-2,DP-3,HDMI-A-1 bus-ID: 0c:00.0 chip-ID: 1002:731f
Display: x11 server: X.Org v: 21.1.3 driver: X: loaded: amdgpu
gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96
Monitor-1: DisplayPort-0 mapped: DP-1 model: Dell AW2521HF res: 1920x1080
dpi: 90 diag: 623mm (24.5")
OpenGL:
renderer: AMD Radeon RX 5700 XT (navi10 LLVM 13.0.1 DRM 3.44 5.17.3-tkg-lto)
v: 4.6 Mesa 22.0.1 direct render: Yes
If applicable
- Xserver version:
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
Current Operating System: Linux leyantoo 5.17.3-tkg-lto #1 TKG SMP PREEMPT Sat Apr 16 14:19:41 CEST 2022 x86_64
Kernel command line: intel_pstate=passive BOOT_IMAGE=/linux-os/gentoo/boot/vmlinuz-5.17.3-tkg-lto root=UUID=e33a55b0-0046-46cc-a105-95d256e216f6 ro rootflags=subvol=linux-os/gentoo init=/usr/lib/systemd/systemd quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_level=3 random.trust_cpu=on mi_watchdog=0 nowatchdog mitigations=off amdgpu.ppfeaturemask=0xffffffff
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
- I tried several other kernel versions
- DXVK version: v1.10.1-8-g95a34139 (Tried other versions too)
- Wine/Proton version: 6.8 (that I usually use because it gives me the best performance, I tried other versions)
Further information (optional)
- Switching from
ACO
toLLVM
throughRADV_DEBUG=llvm
doesn't revert the performance loss. -
Did it used to work in a previous Mesa version?
I used to not have this issue few months ago, I can try to bisect this🤔 - I usually run with
RADV_PERFTEST=nggc,sam
, disabling that does not fix the issue. - When the performance loss happens after a game restart, the AMDGPU-PRO driver does not change the outcome : the frame rate remains lower than usual.
- I do not set any of the variables
ACO_DEBUG
,RADV_DEBUG
.
Thank you for your time and for your help.