mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-12-22 12:53:35 +00:00
Merge branch 'master' of https://github.com/DTJW92/nvidia-patch
This commit is contained in:
commit
d2f0370f35
37
patch-fbc.sh
37
patch-fbc.sh
@ -246,31 +246,34 @@ get_supported_versions () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
patch_common () {
|
patch_common () {
|
||||||
NVIDIA_SMI="$(command -v nvidia-smi || true)"
|
|
||||||
if [[ ! "$NVIDIA_SMI" ]] ; then
|
|
||||||
echo 'nvidia-smi utility not found. Probably driver is not installed.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$manual_driver_version" ]]; then
|
if [[ "$manual_driver_version" ]]; then
|
||||||
driver_version="$manual_driver_version"
|
driver_version="$manual_driver_version"
|
||||||
|
|
||||||
echo "Using manually entered nvidia driver version: $driver_version"
|
echo "Using manually entered nvidia driver version: $driver_version"
|
||||||
|
|
||||||
else
|
else
|
||||||
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
# Try to detect nvidia-smi, but don't exit if it's not found
|
||||||
driver_versions_list=$($cmd) || (
|
NVIDIA_SMI="$(command -v nvidia-smi || true)"
|
||||||
ret_code=$?
|
|
||||||
echo "Can not detect nvidia driver version."
|
if [[ ! "$NVIDIA_SMI" ]] ; then
|
||||||
echo "CMD: \"$cmd\""
|
echo 'nvidia-smi utility not found. Probably driver is not installed.'
|
||||||
echo "Result: \"$driver_versions_list\""
|
|
||||||
echo "nvidia-smi retcode: $ret_code"
|
|
||||||
exit 1
|
exit 1
|
||||||
)
|
else
|
||||||
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
||||||
|
driver_versions_list=$($cmd) || (
|
||||||
|
ret_code=$?
|
||||||
|
echo "Can not detect nvidia driver version."
|
||||||
|
echo "CMD: \"$cmd\""
|
||||||
|
echo "Result: \"$driver_versions_list\""
|
||||||
|
echo "nvidia-smi retcode: $ret_code"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
||||||
|
|
||||||
echo "Detected nvidia driver version: $driver_version"
|
echo "Detected nvidia driver version: $driver_version"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! check_version_supported "$driver_version" ; then
|
if ! check_version_supported "$driver_version" ; then
|
||||||
echo "Patch for this ($driver_version) nvidia driver not found."
|
echo "Patch for this ($driver_version) nvidia driver not found."
|
||||||
echo "Patch is available for versions: "
|
echo "Patch is available for versions: "
|
||||||
|
Loading…
Reference in New Issue
Block a user