gnome-shell-system-monitor-applet icon indicating copy to clipboard operation
gnome-shell-system-monitor-applet copied to clipboard

Amdgpu reports as card0. However, in the case of integrated gpu being detected; reports as card1.

Open Zevvezi opened this issue 2 years ago • 1 comments

I noticed that the gpu line graph was empty and after some investigating; I found that in the gpu_usage.sh this section ->

elslif lsmod | grep amdgpu > /dev/null; then total=$(cat /sys/class/drm/card0/device/mem_info_vram_total) echo $(($total / 1024 / 1024)) used=$(cat /sys/class/drm/card0/device/mem_info_vram_used) echo $(($used / 1024 / 1024)) cat /sys/class/drm/card0/device/gpu_busy_percent

the card is automatically set to card0. But, in the case of a integrated graphics card being detected, the gpu then becomes card1 which then causes the graph to not display anything. At least that's what I noticed after switching from card0 to card1 as card0 is not present on my system as I have integrated graphics disabled. Easy fix at any rate for those with anyone with a AMD gpu that may have the same issue I did. All I did was edit gpu_usage.sh to report card1 instead of card0 and it seemed to fix the issue for me.

Cheers! ^^

Zevvezi avatar Sep 07 '23 19:09 Zevvezi

Both of my discrete AMD cards (an older RX 550 and a new RX 7800 XT) also show up as card1. (in different machines, of course)

cuviper avatar Sep 18 '23 16:09 cuviper