AstraExt / astra-monitor

Resource Monitor for GNOME shell
GNU General Public License v3.0
281 stars 14 forks source link

TypeError: gpuInfo.processes.process_info is not iterable #150

Open veldenb opened 2 hours ago

veldenb commented 2 hours ago

Description

A TypeError is logged and the nvidia module doesn't update when only one process is using the gpu.

Steps to Reproduce

  1. Login to Gnome
  2. Make sure nvidia-smi shows only 1 process:
    
    Sun Sep 29 21:09:56 2024       
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 560.35.03              Driver Version: 560.35.03      CUDA Version: 12.6     |
    |-----------------------------------------+------------------------+----------------------+
    | 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 GeForce RTX 3080        On  |   00000000:0B:00.0  On |                  N/A |
    |  0%   37C    P8             20W /  320W |     630MiB /  10240MiB |      0%      Default |
    |                                         |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 48719 G /usr/bin/gnome-shell 351MiB | +-----------------------------------------------------------------------------------------+


## Environment

<!-- Please complete the following information -->

-   **Astra Monitor Version**: 28
-   **GNOME Version**: 47
-   **Operating System and Version**: Ubuntu 24.10
-   **Other Relevant System Information**: -

## Logs

TypeError: gpuInfo.processes.process_info is not iterable updateNvidiaGpu@file:///home/veldenb/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/gpu/gpuMonitor.js:982:43 readOutput/</<@file:///home/veldenb/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/continuousTaskManager.js:136:37 readOutput/<@file:///home/veldenb/.local/share/gnome-shell/extensions/monitor@astraext.github.io/src/utils/continuousTaskManager.js:135:40 @resource:///org/gnome/shell/ui/init.js:21:20 Astra Monitor ERROR: Error updating Nvidia GPU

veldenb commented 2 hours ago

Added a PR for a possible solution: https://github.com/AstraExt/astra-monitor/pull/151