Ricks-Lab / gpu-utils

A set of utilities for monitoring and customizing GPU performance
GNU General Public License v3.0
139 stars 23 forks source link

Wrong GTT% for RX 570 cards #118

Closed csecht closed 2 years ago

csecht commented 3 years ago

gpu-mon is giving a wrong GTT% for my RX 570 cards because the AMDGPU info for GTT total is actually the VRAM total (with AMDGPU 21.10 drivers). GTT% and totals are correct for my RX 5600 XT card.

The GTT total memory should be the same as the system total, not the VRAM total. From my RX 570 system:

$ cat /sys/class/drm/card1/device/mem_info_gtt_total
4294967296
$ cat /sys/class/drm/card1/device/mem_info_vram_total
4294967296
$ free -b
              total        used        free      shared  buff/cache   available
Mem:    16635121664  5139062784  3848486912   318304256  7647571968 10830524416 ...etc..

System info: Ubuntu 20.04.2 LTS, kernel 5.8 AMDGPU ver. 21.10 rickslab-gpu-utils ver. 3.6.1

I've vaguely noticed something amiss for a while, but only just now investigated it, so I don't know if this issue was in the prior AMDGPU driver. Has anyone loaded the newest AMD drivers, 21.20, who can test whether the GTT total bug for "legacy cards" (Polaris, Ellesmere) has been corrected? If the bug is still there, perhaps a fix could be to use the system total memory from something like the 'free' command in lieu of the mem_info_gtt_total content?