i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

nvidia_gpu block: failed to parse nvidia-smi output

Open nwildner opened this issue 2 years ago • 6 comments

Sup folks.

Since the migration from 0.22 to 0.30, I'm only seeing this message on the statusbar for this specific block: failed to parse nvidia-smi output

It is a Laptop RTX3070, with optimus-manager. GPU IDs remain the same, updated kernel + drivers + i3status-rust just as usual.

image

If I click on the nvidia_gpu block, the following message appears: failed to parse nvidia-smi output. (Cause: bad property: fan_speed. (Cause: invalid digit found in string)).

image

Current block is pretty minimal because I'm in the process of refactoring the config file to be compatible with the new release:

#NVIDIA
[[block]]
block = "nvidia_gpu"
interval = 30

nvidia-smi output:

[nwildner@sandworm ~]$ nvidia-smi 
Thu Feb 23 23:54:34 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   40C    P8    13W /  80W |    707MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

i3status-rust version:

[nwildner@sandworm ~]$ pacman -Q i3status-rust
i3status-rust 0.30.2-1

No significant changes were made to the system, and it used to work on 0.22.

Please let me know if any additional information is needed to investigate this.

nwildner avatar Feb 23 '23 23:02 nwildner

nvidia-smi --query-gpu=name,memory.total,utilization.gpu,memory.used,temperature.gpu,fan.speed,clocks.current.graphics,power.draw

Can you post the output of this?

ammgws avatar Feb 24 '23 03:02 ammgws

You've missed the format line: --format=csv,noheader,nounits I have the same issue, here's my output (with the --format line): NVIDIA GeForce GTX 650 Ti BOOST, 1991, [N/A], 289, 43, 32, [N/A], [N/A]

Menelkir avatar Feb 24 '23 19:02 Menelkir

Oh, values can be optional...

MaxVerevkin avatar Feb 25 '23 16:02 MaxVerevkin

I am using a temporary workaround—put an nvidia-smi shell script ahead of /usr/bin/ in the path (/usr/local/sbin/ in my case):

#!/bin/bash

/usr/bin/nvidia-smi ${@} | sed 's/\[N\/A\]/0/g'

electronybble avatar Feb 26 '23 11:02 electronybble

nvidia-smi --query-gpu=name,memory.total,utilization.gpu,memory.used,temperature.gpu,fan.speed,clocks.current.graphics,power.draw

Sure thing

[nwildner@sandworm ~]$ nvidia-smi --query-gpu=name,memory.total,utilization.gpu,memory.used,temperature.gpu,fan.speed,clocks.current.graphics,power.draw \
       --format=csv,noheader,nounits
NVIDIA GeForce RTX 3070 Laptop GPU, 8192, 3, 291, 33, [N/A], 210, 12.72

nwildner avatar Feb 26 '23 22:02 nwildner

Sort of fixed this in e473555. [N/A] will be shown as 0.

MaxVerevkin avatar Feb 27 '23 09:02 MaxVerevkin