mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-12-22 21:03:35 +00:00
Update patch-fbc.sh
This commit is contained in:
parent
be27a30dff
commit
b7dba048bc
15
patch-fbc.sh
15
patch-fbc.sh
@ -246,16 +246,18 @@ get_supported_versions () {
|
||||
}
|
||||
|
||||
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
|
||||
driver_version="$manual_driver_version"
|
||||
|
||||
echo "Using manually entered nvidia driver version: $driver_version"
|
||||
|
||||
else
|
||||
# Try to detect nvidia-smi, but don't exit if it's not found
|
||||
NVIDIA_SMI="$(command -v nvidia-smi || true)"
|
||||
|
||||
if [[ ! "$NVIDIA_SMI" ]] ; then
|
||||
echo 'nvidia-smi utility not found. Probably driver is not installed.'
|
||||
exit 1
|
||||
else
|
||||
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
||||
driver_versions_list=$($cmd) || (
|
||||
@ -270,6 +272,7 @@ patch_common () {
|
||||
|
||||
echo "Detected nvidia driver version: $driver_version"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! check_version_supported "$driver_version" ; then
|
||||
echo "Patch for this ($driver_version) nvidia driver not found."
|
||||
|
Loading…
Reference in New Issue
Block a user