corecoding / Vitals

A glimpse into your computer's temperature, voltage, fan speed, memory usage and CPU load.
https://extensions.gnome.org/extension/1460/vitals/
GNU General Public License v2.0
1.48k stars 92 forks source link

Support AMD GPU metrics via sysfs #124

Open whentze opened 4 years ago

whentze commented 4 years ago

Describe the new feature you'd like It would be useful if the extension displayed GPU load and memory usage for AMD GPUs.

Additional context

I know this gets requested a lot, but in the case of new-ish AMD GPUs (i.e. ones supported by the amdgpu open source driver), it is much easier to support. The driver exposes at least the following values via sysfs:

corecoding commented 4 years ago

I think this falls in line with what Vitals is, and as mentioned, that is a non io blocking extension. I think it makes sense to put these in into their own section called Graphics. Assuming cardN is a number, you could iterate from 0 to say 5, and use that number in the human readable text.

Unfortunately, not having this graphics card makes it very hard for me to see if what I coded is working. If you can make the changes and create a PR, I'd be glad to merge it in!

eddie-dunn commented 2 years ago

@corecoding I have an AMD card and could look into it. I know JS/TS like Neo knows kung fu, but I know nothing about gnome extensions.

Can you give me some pointers on where in this code base I should start looking when implementing this feature?

renattele commented 8 months ago

Resources can monitor GPU stats: source, their implementation works for me(integrated AMD GPU + discrete AMD RX GPU). We can use this to implement stats.