Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

GPU usage

Open bernharl opened this issue 3 years ago • 3 comments

Similar to CPU usage, it would be nice to have a module for GPU usage. Maybe one would have to set something akin to hwmon_path to know which file to track. Also, I don't know how this would work with Nvidia's proprietary driver (Yes, I have an Nvidia GPU in addition to my RX 6800 XT, lol), but I don't see why Nvidia should be a priority anyway.

bernharl avatar Apr 25 '21 22:04 bernharl

I've created a guide to do just that, I've also linked it on the wiki page for custom module

yonatan8070 avatar May 16 '21 08:05 yonatan8070

@yonatan8070 Along these lines, the custom GPU temperature thread link can be adapted to Nvidia cards with one of the nvidia-smi commands listed in the top answer here: https://askubuntu.com/questions/34449/how-to-see-the-video-card-temperature-nvidia-ati-intel

This could be a useful note to add in the wiki.

BlakeGerard avatar Jun 17 '22 01:06 BlakeGerard

I'm a bit busy at the moment so I don't have time to add it myself, you're more than welcome to add it yourself if you have the time!

yonatan8070 avatar Jun 17 '22 05:06 yonatan8070

I made this tool to display ALL GPU stats on the bar

See an usage example on my dotfiles

For Nvidia: the config states that nvidia-smi is required, in reality only NVML library should be installed (which should come with the driver AFAIK). For AMD: The tool reads directly from sysfs, should be working without installing anything.

EDIT: Now even AMDs cards are supported

PolpOnline avatar Aug 29 '23 19:08 PolpOnline

If anyone wants you could implement the usage of NVML API directly inside Waybar, unfortunately my C++ knowledge is too limited to do that. An example of usage can be found in nvtop (written in C).

PolpOnline avatar Aug 29 '23 20:08 PolpOnline