nokyan / resources

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

Nothing is displayed for Nvidia GPUs #198

Open flyrobot27 opened 7 months ago

flyrobot27 commented 7 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 7 months ago

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

flyrobot27 commented 7 months ago

What is the command for running it?

flyrobot27 commented 7 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 7 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 7 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 7 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.

MythicByte commented 3 days ago

I would like to report that with my NVIDIA card, some things show 0%. Additionally, there are some properties that can be displayed, but others show nothing. Screenshot From 2024-11-29 18-56-19

chris-gputrader commented 2 days ago

I get the same as above, NVIDIA GPU is always showing 0%, if I check with nvtop it shows correct utilz %

nokyan commented 2 days ago

Does per-process GPU usage in the Processes view work? Does encoder/decoder utilization work? Can you send me the output of running Resources from the terminal using flatpak run --env=RUST_LOG=resources=debug net.nokyan.Resources?

chris-gputrader commented 2 days ago
flatpak run --env=RUST_LOG=resources=debug net.nokyan.Resources
 DEBUG resources::utils > Running as Flatpak
 INFO  resources::application > Resources (net.nokyan.Resources)
 INFO  resources::application > Version: 1.7.0 ()
 INFO  resources::application > Datadir: /app/share/resources

Per process looks like it reporting GPU% but not in the right for the right gpu maybe? I haven't seen anything in Encoder or Decoder Usage, GPU Memory does seem to be reporting correctly.

chris-gputrader commented 2 days ago

Screenshot From 2024-11-29 22-11-46

MythicByte commented 2 days ago

flatpak run --env=RUST_LOG=resources=debug net.nokyan.Resources

flatpak run --env=RUST_LOG=resources=debug net.nokyan.Resources DEBUG resources::utils > Running as Flatpak INFO resources::application > Resources (net.nokyan.Resources) INFO resources::application > Version: 1.7.0 () INFO resources::application > Datadir: /app/share/resources

nokyan commented 2 days ago

Is this the complete output? It should usually look something like this and go on for quite a while: image

MythicByte commented 2 days ago

flatpak run --env=RUST_LOG=resources=debug net.nokyan.Resources

I have the answer for this. If the app is open, this small output appears. However, when the application is launched via the command, then your output appears.

MythicByte commented 2 days ago

i have cut the things from other Apps. DEBUG resources::utils > Running as Flatpak INFO resources::application > Resources (net.nokyan.Resources) INFO resources::application > Version: 1.7.0 () INFO resources::application > Datadir: /app/share/resources DEBUG resources::utils::gpu > Searching for GPUs… DEBUG resources::utils::pci > Parsing pci.ids… INFO resources::utils::pci > Successfully parsed pci.ids within 15.85ms (vendors: 2405, devices: 18949, subdevices: 16455) DEBUG resources::utils::gpu::nvidia > Successfully connected to NVML INFO resources::utils::gpu > Found GPU "NVIDIA GeForce GTX 1050 Ti" (PCI slot: 0000:07:00.0 · PCI ID: 10de:1c82 · Category: NVIDIA) DEBUG resources::utils::gpu > 1 GPUs found DEBUG resources::utils::app > Detecting installed apps DEBUG resources::utils::app > Using the following directories for app detection: ["/app/share/applications", "/usr/share/applications", "/usr/share/runtime/share/applications", "/run/host/user-share/applications", "/run/host/usr/share/applications", "/run/host/share/applications", "/app/local/share/applications", "/usr/local/share/applications", "/usr/local/share/runtime/share/applications", "/run/host/usr/local/share/applications", "/run/host/local/share/applications", "/var/lib/flatpak/exports/share/applications", "/home/user/.local/share/flatpak/exports/share/applications", "/var/lib/snapd/desktop/applications", "/home/user/.local/share/applications"] DEBUG resources::utils::app > Using the following locales for app names and descriptions: ["en_US.UTF-8", "en_US", "en"] DEBUG resources::utils::app > Found native app "Resources" (ID: "net.nokyan.Resources") at /app/share/applications/net.nokyan.Resources.desktop with commandline resources (detected executable name: resources) INFO resources::utils::app > Detected 148 apps within 23.60ms DEBUG resources::utils::memory > Memory information obtained using udevadm DEBUG resources::utils::gpu > Searching for GPUs… INFO resources::utils::gpu > Found GPU "NVIDIA GeForce GTX 1050 Ti" (PCI slot: 0000:07:00.0 · PCI ID: 10de:1c82 · Category: NVIDIA) DEBUG resources::utils::gpu > 1 GPUs found DEBUG resources::utils::npu > Searching for NPUs… DEBUG resources::utils::npu > 0 NPUs found DEBUG resources::utils::cpu > CPU temperature sensor located at /sys/class/hwmon/hwmon0/temp1_input (k10temp) DEBUG resources::utils::process > Spawning resources-processes in Flatpak mode (/var/lib/flatpak/app/net.nokyan.Resources/x86_64/stable/cc8e7a601c122f9f8c68c198b54f0a5355fa115be63a0ced08f15581e4079b65/files/libexec/resources/resources-processes)

D DEBUG resources::utils::app > Associating process 506904 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506912 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506913 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506917 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506918 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506963 with app "Resources" (ID: "net.nokyan.Resources") based on process cgroup matching with app ID DEBUG resources::utils::app > Associating process 506967 with app "Resources" (ID: "net.nokyan.Resources") based on match in KNOWN_EXECUTABLE_NAME_EXCEPTIONS INFO resources::ui::window > A drive has been added (or turned visible): /sys/block/sdb INFO resources::ui::window > A drive has been added (or turned visible): /sys/block/sdc INFO resources::ui::window > A drive has been added (or turned visible): /sys/block/sda INFO resources::ui::window > A network interface has been added (or turned visible): /sys/class/net/enp3s0