nokyan / resources

Keep an eye on system resources
GNU General Public License v3.0
611 stars 47 forks source link

Nothing is displayed for Nvidia GPUs #198

Open flyrobot27 opened 2 months ago

flyrobot27 commented 2 months ago

Is there an existing issue for this?

Current Behavior

When an Nvidia GPU is used, nothing is displayed other than the GPU usage:

image

Expected Behavior

Memory usage, GPU frequency, etc. should be displayed other than N/A.

Steps To Reproduce

  1. Install Resources
  2. Install Nvidia Drivers 535. The video card used is a Tesla P100 12GB
  3. Open Application and navigate to GPU

Environment

App Version 1.3.0

uname -a output:
Linux cuda-server 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

NVIDIA-SMI 535.161.07  Driver Version: 535.161.07  CUDA Version: 12.2

GPU1: Radeon Pro WX 2100 (Used for display output)
GPU2: Nvidia Tesla P100 12GB

Anything else?

nvtop have no issues accessing the values:

image

nokyan commented 2 months ago

Hi, can you run Resources from the terminal and send me the output?

flyrobot27 commented 2 months ago

What is the command for running it?

flyrobot27 commented 2 months ago

Nvm I found the command. Here is the debug output:

INFO resources::application > Resources (net.nokyan.Resources) INFO resources::application > Version: 1.3.0 () INFO resources::application > Datadir: /app/share/resources DEBUG resources::application::imp > GtkApplication::startup DEBUG resources::application::imp > GtkApplication::activate DEBUG resources::utils > Running as Flatpak DEBUG resources::utils::memory > Memory information obtained using udevadm DEBUG resources::utils::app > Detecting installed applications… DEBUG resources::utils::app > Detected 154 applications DEBUG resources::utils::pci > Parsing pci.ids… DEBUG resources::utils::pci > Successfully parsed pci.ids DEBUG resources::utils::gpu > Found GPU "AMD Radeon Pro WX 2100" (PCI slot: 0000:03:00.0 · PCI ID: 1002:6995 · Category: AMD) WARN resources::utils::gpu::nvidia > Connection to NVML failed, reason: a libloading error occurred: libnvidia-ml.so: cannot open shared object file: No such file or directory DEBUG resources::utils::gpu > Found GPU "GP100GL [Tesla P100 PCIe 12GB]" (PCI slot: 0000:04:00.0 · PCI ID: 10de:15f7 · Category: NVIDIA) DEBUG resources::ui::window > A drive has been added (or turned visible): /sys/block/sda DEBUG resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/wlp7s0 DEBUG resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/vmnet1 DEBUG resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/vmnet8 DEBUG resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/enp6s0 DEBUG resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/enp8s0

(resources:2): Gtk-WARNING **: 22:52:02.106: Failed to load icon /home/user/ubuntusoftware: Error opening file /home/user/ubuntusoftware: No such file or directory

nokyan commented 2 months ago

Could you try running flatpak install org.freedesktop.Platform.GL.nvidia-535-161-07 org.freedesktop.Platform.GL32.nvidia-535-161-07 and then viewing your NVIDIA GPU in Resources again?

flyrobot27 commented 2 months ago

Hey, sorry for the late reply. I've tried your command but unfortunately nothing changed.

One difference is that the P100 requires Nvidia's Server driver and needs to have ReBAR enabled. Maybe that's messing something up? I don't know

nokyan commented 2 months ago

The server driver thing might be related to it, reBAR likely not. I don't know too much about NVIDIA's professional GPUs, sorry. I think it might be related to Flatpak, because nvtop works and Resources show the GPU load, which, if NVML fails, will be calculated from individual per-process GPU usage. Per-process GPU usage is gathered by a companion process which is spawned outside Flatpak's sandbox. I'll see if I can find something.