enkore / i3pystatus

A complete replacement for i3status
https://i3pystatus.readthedocs.io/
MIT License
445 stars 188 forks source link

utils/gpu: fix nvidia-smi parsing for new nvidia-smi that uses (N/A) when unsupported #776

Closed hasB4K closed 4 years ago

hasB4K commented 4 years ago

When upgrading my nvidia drivers to , I noticed that the output nvidia-smi changed:

$ nvidia-smi --query-gpu=memory.total,memory.free,memory.used,temperature.gpu,fan.speed,utilization.gpu,utilization.memory --format=csv,noheader,nounits 
2004, 2004, 0, 44, [N/A], 0, 0

instead of the old:

gpu=memory.total,memory.free,memory.used,temperature.gpu,fan.speed,utilization.gpu,utilization.memory --format=csv,noheader,nounits 
2004, 2004, 0, 44, [Not Supported], 0, 0

This PR fix this issue.

enkore commented 4 years ago

Thanks!