Severe framedrops with older AMD GPU when overlay is active
Describe the bug When using Mangohud with my old Radeon Fury X, every other second the framerate drops significantly. This does only happen when the overlay is visible. When turned off with SHIFT_R+F12, the game/application runs smoothly. This issue does not occur with newer GPUs (see details below)
List relevant hardware/software information
- Linux Distribution: Tested on Bazzite and Secureblue (Both Fedora Atomic), both with Kernel 6.15.9
- MangoHud version: 0.8.1
- GPU: AMD Radeon Fury X
To Reproduce Steps to reproduce the behavior:
- Start any application with Mangohud enabled.
- Watch the framerate drop significantly every other second.
Expected behavior No framedrops. The same setup works flawlessly with other cards. Tested with NVIDIA GeForce RTX 2060 Super and AMD RX 7900 XTX.
Screenshots
Additional context Screenshot 1: OpenJK on Bottles. Screenshot 2: Grim Dawn on Bottles. Ignore the "3080 Ti" label, the real GPU that's being used is shown below. Notice the frametimes. There you can observe the framedrops.
Likely causing a stutter when reading some sysfs nodes. We'd want to figure out which one(s) are causing it
Likely causing a stutter when reading some sysfs nodes. We'd want to figure out which one(s) are causing it
Hmm, I see. I'll test them one after another this weekend and report back.
Likely causing a stutter when reading some sysfs nodes. We'd want to figure out which one(s) are causing it
I've done some testing on a fresh installation with Mangohud and Mangojuice, and it seems to me like whenever gpu_stats is set to on, the framedrops occur.
try setting gpu_power=0
I have same issue with R9 390.
Does gpu_power=0 change anything?
No, same behavior. Turning on any GPU stats does what person above described.
For old AMDGPUs we touch sysfs nodes. Namely gpu_busy_percent mem_info_vram_total mem_info_vram_used and mem_info_gtt_used.
Try accessing them each with time cat gpu_busy_percent etc and post the result here.
They are in /sys/class/drm/card0/device/, or card1 etc depending on your setup
time cat /sys/class/drm/card1/device/gpu_busy_percent
0
real 0m0.002s
user 0m0.000s
sys 0m0.002s
time cat /sys/class/drm/card1/device/mem_info_vram_total
8589934592
real 0m0.001s
user 0m0.000s
sys 0m0.001s
time cat /sys/class/drm/card1/device/mem_info_vram_used
568184832
real 0m0.002s
user 0m0.001s
sys 0m0.000s
time cat /sys/class/drm/card1/device/mem_info_gtt_used
102166528
real 0m0.002s
user 0m0.000s
sys 0m0.002s
Nice those look fine. We also poke some hwmon nodes.
/sys/class/drm/card1/device/hwmon/*/temp1_input
/sys/class/drm/card1/device/hwmon/*/temp2_input
/sys/class/drm/card1/device/hwmon/*/temp3_input
/sys/class/drm/card1/device/hwmon/*/freq1_input
/sys/class/drm/card1/device/hwmon/*/in0_input
/sys/class/drm/card1/device/hwmon/*/freq2_input
time cat /sys/class/drm/card1/device/hwmon/*/temp1_input
59000
real 0m0.001s
user 0m0.000s
sys 0m0.001s
time cat /sys/class/drm/card1/device/hwmon/*/temp2_input
cat: '/sys/class/drm/card1/device/hwmon/*/temp2_input': No such file or directory
real 0m0.002s
user 0m0.000s
sys 0m0.002s
time cat /sys/class/drm/card1/device/hwmon/*/temp3_input
cat: '/sys/class/drm/card1/device/hwmon/*/temp3_input': No such file or directory
real 0m0.001s
user 0m0.000s
sys 0m0.002s
time cat /sys/class/drm/card1/device/hwmon/*/freq1_input
300090000
real 0m0.002s
user 0m0.000s
sys 0m0.002s
time cat /sys/class/drm/card1/device/hwmon/*/in0_input
1118
real 0m0.002s
user 0m0.000s
sys 0m0.002s
time cat /sys/class/drm/card1/device/hwmon/*/freq2_input
150000000
real 0m0.002s
user 0m0.001s
sys 0m0.001s