btop icon indicating copy to clipboard operation
btop copied to clipboard

[BUG] GPU monitoring not working on nobara

Open vsey opened this issue 1 year ago • 1 comments

Describe the bug I compiled btop with GPU support, but the gpu stats aren't visible, because btop cant find libnvidia-ml.so

[A clear and concise description of what the bug is.] The reason for this that the libnvidia-ml.so library is called libnnvidia-ml.so.1 or libnvidia-ml.so.535.104.05 on my system

To Reproduce Compile btop with gpu support on nobara

Info (please complete the following information):

  • btop++ version: 1.3.0
  • Binary: self compiled
  • (If compiled) Compiler and version: Red Hat 13.2.1-1
  • Architecture: x86_64
  • Platform: Linux Nobara
  • (Linux) Kernel: 6.5.6-200
  • Terminal used: kitty
  • GPU: gtx 1070
  • gpu driver: 535.104.05

Additional context I recompile it with the only difference being the change of the library name from libnvidia-ml.so to libnvidia-ml.so.1 in src/linux/btop_collect.cpp and it starts working. I made a pull request with the change, but I don't know if this works in general, so I marked it as a draft for now, my idea was otherwise to replace libnvidia-ml.so with a glob something like this libnvidia-ml.so.* to catch all driver versions

Contents of ~/.config/btop/btop.log: 2023/12/25 (19:05:11) | ===> btop++ v.1.3.0 2023/12/25 (19:05:11) | DEBUG: Starting in DEBUG mode! 2023/12/25 (19:05:11) | INFO: Logger set to DEBUG 2023/12/25 (19:05:11) | DEBUG: Using locale en_IE.utf8 2023/12/25 (19:05:11) | INFO: Running on /dev/pts/1 2023/12/25 (19:05:11) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so: cannot open shared object file: No such file or directory 2023/12/25 (19:05:11) | DEBUG: Failed to load librocm_smi64.so, AMD GPUs will not be detected: librocm_smi64.so: cannot open shared object file: No such file or directory 2023/12/25 (19:05:11) | DEBUG: Shared::init() : Initialized. 2023/12/25 (19:05:11) | DEBUG: Loading theme file: /home/peter/.config/btop/themes/catppuccin_mocha.theme

vsey avatar Dec 25 '23 18:12 vsey

@vsey Added check for alternative library names in commit ad14554f32cc9c19f3cdc8e28ea6012a974a533a

aristocratos avatar Dec 26 '23 18:12 aristocratos