Your GeForce runs AI at half speed. This fixes it for 20/30/40 series cards. Up to 2× FP16 / BF16 / TF32 tensor throughput
C
# Put gpu_unlock and its firmware in every image and load it right before
# nvidia, so a display card's screen is blank only from its unlock until
# nvidia-drm takes over. Without nvidia in the image it loads last, still
# before any nvidia loaded from the root filesystem. Named to be read after
# every other drop-in. It does nothing unless gpu_unlock.targets= is on the
# kernel command line.
# The name is plain, not gpu_unlock?: the systemd hook copies MODULES as is
# into modules-load.d, which does not know the ?. A kernel without a build
# of the module gets nothing, so its image still builds.
if modinfo -k "$KERNELVERSION" gpu_unlock &>/dev/null; then
[[ ${MODULES@a} == *a* ]] || read -ra MODULES <<<"$MODULES"
_gu_modules=()
for _gu_module in "${MODULES[@]}"; do
[[ ${_gu_module%\?} == gpu_unlock ]] && continue
[[ ${_gu_module%\?} == nvidia ]] && _gu_modules+=(gpu_unlock)
_gu_modules+=("$_gu_module")
done
[[ " ${_gu_modules[*]} " == *' gpu_unlock '* ]] || _gu_modules+=(gpu_unlock)
MODULES=("${_gu_modules[@]}")
unset _gu_modules _gu_module
fi