Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use nvidia-smi for NVIDIA GPUs #1031

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StasE9o
Copy link

@StasE9o StasE9o commented Jun 14, 2018

Description

On systems with multiple NVIDIA GPUs neofetch returns inaccurate results (even number of GPUs). It is possible to list GPUs using nvidia-smi instead if it's installed.

@StasE9o StasE9o force-pushed the use-nvidia-smi-for-nvidia-gpus branch from 7cbd207 to 4cb8d69 Compare June 14, 2018 18:10
@hykilpikonna
Copy link

On my machine with 3060 Ti LHR, using this would print NVIDIA NVIDIA GeForce RTX 3060 Ti

The existing method prints NVIDIA GeForce RTX 3060 Ti Lite Hash Rate, which has more information,

image

nv_gpu_cmd="$nv_smi_cmd --query-gpu=name --format=csv,noheader"
IFS=$'\n' read -d "" -ra nv_gpus <<< "$($nv_gpu_cmd)"
for nv_gpu in "${nv_gpus[@]}"; do
gpu="NVIDIA $nv_gpu"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nvidia-smi command already has "NVIDIA" in it, so we don't need to add NVIDIA here

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants