Waybar
Waybar copied to clipboard
GPU usage
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.
I've created a guide to do just that, I've also linked it on the wiki page for custom module
@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.
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!
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
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).