Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Btop 1.4.0 No longer shows AMD or Nvidia GPU on High core count CPU #954

Open
awptechnologies opened this issue Oct 23, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@awptechnologies
Copy link

Describe the bug
Before the update i had a gpu bar under the cpu cores. It showed the usage as well as the temp. As you see in the screenshots it no longer does.

To Reproduce
Just type btop in terminal

Expected behavior
I Expect to see the gpu under the cpu cores like i did before update to 1.4.0

Screenshots
Screenshot From 2024-10-22 23-47-48
Screenshot From 2024-10-22 23-48-01

[If applicable, add screenshots to help explain your problem.]

Info (please complete the following information):

  • btop++ version: btop --version
  • Architecture: x86_64
  • Platform: Linux
  • (Linux) Kernel: 6.11.5-zen1-1-zen
  • (OSX/FreeBSD) Os release version: Arch Linux
  • Terminal used: gnome-termianl, guake
  • Font used: Firacode Nerd font
@awptechnologies awptechnologies added the bug Something isn't working label Oct 23, 2024
@logicalbhanu
Copy link

at present i am able to get the graph, by first hiding all the graphs(using 1, 2, 3 and 4), and then bringing back cpu graph at first(pressing 1) and then all other graphs(2,3 and 4).
image

@reukiodo
Copy link

reukiodo commented Jan 3, 2025

1, 2, 3, 4, then 1, 2, 3, 4 workaround did not work for me to bring back the GPU display in a server with 4x A100s in this server with EPYC 7413 (24core *2 hyperthreading)

2025-01-03 13:57:29 root@ads-vs18:~# nvidia-smi 
Fri Jan  3 13:57:36 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.127.08             Driver Version: 550.127.08     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA A100 80GB PCIe          Off |   00000000:01:00.0 Off |                    0 |
| N/A   37C    P0             64W /  300W |       1MiB /  81920MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA A100 80GB PCIe          Off |   00000000:41:00.0 Off |                    0 |
| N/A   37C    P0             65W /  300W |       1MiB /  81920MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   2  NVIDIA A100 80GB PCIe          Off |   00000000:81:00.0 Off |                    0 |
| N/A   37C    P0             61W /  300W |       1MiB /  81920MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   3  NVIDIA A100 80GB PCIe          Off |   00000000:C1:00.0 Off |                    0 |
| N/A   36C    P0             62W /  300W |       1MiB /  81920MiB |      3%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
2025-01-03 13:57:39 root@ads-vs18:~# 

@charles-cai
Copy link

Not working either, extracted the release versions, none worked (1.3.0, 1.3.1, 1.3.2, 1.4.0).

However Ubuntu 24.04 apt install btop which installs a 1.3.0 btop version which does have GPU display.

RTX2060 on Intel NUC i7 Gen 11. Ubuntu 22.04 and 24.04 (as LXC under Proxmox) both tested.

@charles-cai
Copy link

Just make/make install the source code (main, v1.3.2, v1.4.0) on Debian(Proxmox) Host and LxC (Ubuntu 22.04/24.04), all working with GPU display without any problem. On host, it can even display Intel i915 iGPU! so it's simply the release version not having GPU enabled? weird as default is GPU_SUPPORT=true in Makefile.

For those wanting to debug at source code level,

  1. Inside ~/.config/btop/btop.conf you can turn on LOG_LEVEL="DEBUG", then in the same folder, there will be btop.log
  2. Very easy to debug on Windows 11, using WSL using Visual Studio Code; you will need to apt install gdb, and also pass on DEBUG=true to make, generated binary is in <git local source dir>/bin/btop. In VS Code, generate a launch.json, similar to this one below, then Run -> Debug will give provide you source code level debugging, of course set some breakpoints in btop_collector.cpp under namespace Nvml:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/bin/btop",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${workspaceFolder}",
            "environment": [
                { 
                    "name": "LD_LIBRARY_PATH",
                    "value": "/usr/lib/x86_64-linux-gnu:${env:LD_LIBRARY_PATH}"
                }
            ],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        }

    ]
}
  1. btop GPU support in WSL / Windows 11 won't work as it doesn't have NVIDIA GPU driver loaded. Even if you have a working nvidia-smi. btop requires both NVIDIA GPU driver + nvidia-ml dynamic library installed.
  2. On both Debian and both LTS Ubuntu, it's here:
> ll /usr/lib/x86_64-linux-gnu/libnvidia-ml*
/usr/lib/x86_64-linux-gnu/libnvidia-ml.so -> libnvidia-ml.so.1*
/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 -> libnvidia-ml.so.550.144.03*
/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.550.144.03*
  1. Note that official NVIDIA driver won't update LD_LIBRARY_PATH, that's why we added that environment variable in launch.json above for btop to search for libnvidia-ml.so when debugging; however, once complied and make install deployed, it doesn't seem to need that environment variable any more. Note: the default target location for make install is /usr/local/bin, which is not in default Debian/Ubuntu PATH, so you will need to: ln -s /usr/local/bin/btop /usr/bin/btop (app remove btop first, if you have stock btop installed).
  2. A few command line helping checking the driver and NVML dynamic library: ldconfig -p | grep libnvidia-ml find NVIDIA management library location, check dependencies: ldd /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.
  3. Finally a new problem: custom compiled version doesn't seem to have proper theming working, despite correct btop.config and all theme files are correctly deploy. Will find time to figure out what's going on there.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants