mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-08-30 18:32:50 +00:00
Add more descriptive info about driver version detection failure #267
This commit is contained in:
parent
aed35c3902
commit
6a30fa54df
12
patch.sh
12
patch.sh
@ -183,9 +183,15 @@ patch_common () {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! driver_version=$("$NVIDIA_SMI" --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then
|
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
||||||
echo 'Something went wrong. Check nvidia driver'
|
driver_versions_list=$($cmd)
|
||||||
exit 1
|
ret_code=$?
|
||||||
|
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
||||||
|
if [ $ret_code -ne 0 ] && [ -nz driver_version ] ; then
|
||||||
|
echo "Can not detect nvidia driver version."
|
||||||
|
echo "CMD: \"$cmd\""
|
||||||
|
echo "Result: \"$driver_versions_list\""
|
||||||
|
echo "nvidia-smi retcode: $ret_code"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Detected nvidia driver version: $driver_version"
|
echo "Detected nvidia driver version: $driver_version"
|
||||||
|
Loading…
Reference in New Issue
Block a user