diff --git a/patch.sh b/patch.sh index d4d5907..f7a2142 100755 --- a/patch.sh +++ b/patch.sh @@ -183,9 +183,15 @@ patch_common () { exit 1 fi - if ! driver_version=$("$NVIDIA_SMI" --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then - echo 'Something went wrong. Check nvidia driver' - exit 1 + cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits" + driver_versions_list=$($cmd) + 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 echo "Detected nvidia driver version: $driver_version"