From d9e713648a9ecbaaa922c9490513853c1bc7878f Mon Sep 17 00:00:00 2001 From: DTJW92 <96082560+DTJW92@users.noreply.github.com> Date: Sat, 14 Dec 2024 03:57:28 +0000 Subject: [PATCH 1/5] Update patch.sh --- patch.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/patch.sh b/patch.sh index ee9d638..faf86c9 100755 --- a/patch.sh +++ b/patch.sh @@ -285,16 +285,18 @@ get_supported_versions () { } patch_common () { + if [[ "$manual_driver_version" ]]; then + driver_version="$manual_driver_version" + + echo "Using manually entered Nvidia driver version: $driver_version" + else + 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 cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits" driver_versions_list=$($cmd) || ( @@ -308,7 +310,8 @@ patch_common () { driver_version=$(echo "$driver_versions_list" | head -n 1) 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." From ff838cf8876ce70e26194f6464ffbebce96b82b0 Mon Sep 17 00:00:00 2001 From: DTJW92 <96082560+DTJW92@users.noreply.github.com> Date: Sat, 14 Dec 2024 04:01:44 +0000 Subject: [PATCH 2/5] Update patch.sh --- patch.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/patch.sh b/patch.sh index faf86c9..28428c1 100755 --- a/patch.sh +++ b/patch.sh @@ -285,18 +285,17 @@ get_supported_versions () { } patch_common () { - if [[ "$manual_driver_version" ]]; then + if [[ "$manual_driver_version" ]]; then driver_version="$manual_driver_version" - - echo "Using manually entered Nvidia driver version: $driver_version" - else - + + echo "Using manually entered nvidia driver version: $driver_version" + fi + + else 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) || ( @@ -310,8 +309,7 @@ patch_common () { driver_version=$(echo "$driver_versions_list" | head -n 1) 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." From be27a30dffa3999369adc75f8d28ddcfc36ef3f3 Mon Sep 17 00:00:00 2001 From: DTJW92 <96082560+DTJW92@users.noreply.github.com> Date: Sat, 14 Dec 2024 04:06:34 +0000 Subject: [PATCH 3/5] Update patch.sh --- patch.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/patch.sh b/patch.sh index 28428c1..c70bdd1 100755 --- a/patch.sh +++ b/patch.sh @@ -289,26 +289,28 @@ patch_common () { driver_version="$manual_driver_version" echo "Using manually entered nvidia driver version: $driver_version" - fi - else - 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) || ( - ret_code=$? - echo "Can not detect nvidia driver version." - echo "CMD: \"$cmd\"" - echo "Result: \"$driver_versions_list\"" - echo "nvidia-smi retcode: $ret_code" + # 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 - ) - driver_version=$(echo "$driver_versions_list" | head -n 1) + else + 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 if ! check_version_supported "$driver_version" ; then @@ -357,9 +359,9 @@ patch_common () { done [[ "$dir_found" ]] || { echo "ERROR: cannot detect driver directory"; exit 1; } - } + ensure_bytes_are_valid () { driver_file="$driver_dir/$object.$driver_version" original_bytes=$(awk -F / '$2 { print $2 }' <<< "$patch") From b7dba048bc5b133d2bf34521e76b09c65b77d37c Mon Sep 17 00:00:00 2001 From: DTJW92 <96082560+DTJW92@users.noreply.github.com> Date: Sat, 14 Dec 2024 04:26:00 +0000 Subject: [PATCH 4/5] Update patch-fbc.sh --- patch-fbc.sh | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/patch-fbc.sh b/patch-fbc.sh index 06eb9c0..79401d4 100755 --- a/patch-fbc.sh +++ b/patch-fbc.sh @@ -246,31 +246,34 @@ 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 - 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" + # 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 - ) - driver_version=$(echo "$driver_versions_list" | head -n 1) + else + 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 - + if ! check_version_supported "$driver_version" ; then echo "Patch for this ($driver_version) nvidia driver not found." echo "Patch is available for versions: " From 74337959f0fdaeeb8cde15ac6116b1dea60aa7b5 Mon Sep 17 00:00:00 2001 From: DTJW92 Date: Thu, 19 Dec 2024 19:13:38 +0000 Subject: [PATCH 5/5] Update patch.sh --- patch.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/patch.sh b/patch.sh index c70bdd1..72303be 100755 --- a/patch.sh +++ b/patch.sh @@ -285,11 +285,24 @@ get_supported_versions () { } patch_common () { - if [[ "$manual_driver_version" ]]; then + if [[ "$manual_driver_version" ]]; then driver_version="$manual_driver_version" +<<<<<<< HEAD echo "Using manually entered nvidia driver version: $driver_version" +======= + + echo "Using manually entered Nvidia driver version: $driver_version" + else + + NVIDIA_SMI="$(command -v nvidia-smi || true)" + + if [[ ! "$NVIDIA_SMI" ]] ; then + echo 'nvidia-smi utility not found. Probably driver is not installed.' + exit 1 + +>>>>>>> parent of ff838cf (Update patch.sh) else # Try to detect nvidia-smi, but don't exit if it's not found NVIDIA_SMI="$(command -v nvidia-smi || true)" @@ -309,9 +322,15 @@ patch_common () { ) driver_version=$(echo "$driver_versions_list" | head -n 1) +<<<<<<< HEAD echo "Detected nvidia driver version: $driver_version" fi fi +======= + echo "Detected nvidia driver version: $driver_version" + + fi +>>>>>>> parent of ff838cf (Update patch.sh) if ! check_version_supported "$driver_version" ; then echo "Patch for this ($driver_version) nvidia driver not found."