[BUG] GPU config disappears permanently when GPU is hot-unplugged
Describe the bug
Adding gpuX to displayed boxes will make it downgrade to stock shown_boxes = "cpu mem net proc" if said GPU is not currently registered by driver (eg. it's temporarily bound to VFIO driver to pass-through to VM)
To Reproduce
- Add
gpu0 gpu1to system with 2 GPUs. - Unbind second GPU from driver / remove second GPU from system.
- Observe that all GPUs are missing from displayed boxes
Expected behavior
Btop should preserve configuration and skip temporarily missing GPUs runtime-level, without hard-adjusting config to temporary environmental change.
Info (please complete the following information):
- btop++ version:
btop version: 1.3.2 - Binary: from repo
- Architecture: x86_64
- Platform: Linux
- (Linux) Kernel:
6.10.1-arch1-1 - Terminal used: Konsole
- Font used: dunno
Tbf in general multi-GPU support is quite... lacking. CPU status display shows first GPU load,
GPU gpu-pwr-totals don't show any unit so you kinda don't know how much power they draw anyways
These are obviously not very critical bugs but I'd simply like to point out that this area of btop has quite severe practicality issues. My use case is that NVidia GPUs require manually re-applying Persistence mode after being detached from guest VM so that they don't idle at 120w. I'd like to monitor power draw of all GPUs that are currently not passed-through to KVM guests (aka all GPUs that are registered in host OS but subset of those GPUs changes dynamically depending on which guests are running and which GPUs are they getting assigned by KVM.