gpu: stop the miner profile failing on a supported memory clock #35

Merged
grenade merged 1 commits from fix/gpu-profile-sigpipe into main 2026-10-12 13:34:07 +00:00
+4 -1
View File
@@ -119,7 +119,10 @@ while IFS=',' read -r idx name; do
echo "gpu ${idx} (${name# }): refusing memory clock ${WANT_MEM} MHz — 405 puts the card in a low-power state" >&2
exit 1
fi
if ! nvidia-smi -i "$idx" -q -d SUPPORTED_CLOCKS | grep -qE "Memory\s+: ${WANT_MEM} MHz"; then
# Not grep -q: it exits on the first match, nvidia-smi then dies of SIGPIPE
# writing the rest, and pipefail reports a supported clock as unsupported.
# Whether it does depends on timing, so it can pass at boot and fail later.
if ! nvidia-smi -i "$idx" -q -d SUPPORTED_CLOCKS | grep -E "Memory\s+: ${WANT_MEM} MHz" >/dev/null; then
echo "gpu ${idx} (${name# }): memory clock ${WANT_MEM} MHz is not a supported state; supported: $(nvidia-smi -i "$idx" -q -d SUPPORTED_CLOCKS | grep -E '^\s+Memory\s+:' | grep -oE '[0-9]+ MHz' | sort -un | tr '\n' ' ')" >&2
exit 1
fi