mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-08-30 18:32:50 +00:00
Add new driver check code to path-fbc.sh
This commit is contained in:
parent
9f7e57c3a8
commit
eb68dacd63
11
patch-fbc.sh
11
patch-fbc.sh
@ -111,8 +111,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'
|
||||
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 ]] ; then
|
||||
echo "Can not detect nvidia driver version."
|
||||
echo "CMD: \"$cmd\""
|
||||
echo "Result: \"$driver_versions_list\""
|
||||
echo "nvidia-smi retcode: $ret_code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user