btop icon indicating copy to clipboard operation
btop copied to clipboard

[BUG] GPU config disappears permanently when GPU is hot-unplugged

Open lapsio opened this issue 1 year ago • 1 comments

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

  1. Add gpu0 gpu1 to system with 2 GPUs.
  2. Unbind second GPU from driver / remove second GPU from system.
  3. 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

lapsio avatar Aug 08 '24 04:08 lapsio

Tbf in general multi-GPU support is quite... lacking. CPU status display shows first GPU load,

image

GPU gpu-pwr-totals don't show any unit so you kinda don't know how much power they draw anyways

image

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.

lapsio avatar Aug 08 '24 04:08 lapsio