Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Zevvezi opened this issue Sep 7, 2023 · 1 comment

Comments

@Zevvezi
Copy link

Zevvezi commented Sep 7, 2023

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! ^^

@cuviper
Copy link

cuviper commented Sep 18, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants