Files
omarchy/migrations/1766942230.sh
2026-01-08 15:28:56 -05:00

20 lines
720 B
Bash

echo "Migrate legacy NVIDIA GPUs to nvidia-580xx driver (if needed)"
# Only migrate GTX 9xx or 10xx (Pascal/Maxwell)
NVIDIA="$(lspci | grep -i 'nvidia')"
if echo "$NVIDIA" | grep -qE "GTX 9|GTX 10"; then
if ! pacman -Qq | grep -qE '^linux(-[a-z0-9]+)?-headers$'; then
echo "Skipping: no linux headers package installed (required for DKMS drivers)"
exit 1
fi
# Piping yes to override existing packages
yes | sudo pacman -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils
# Verify packages were installed
if ! pacman -Qq nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils &>/dev/null; then
echo "Error: NVIDIA 580xx driver packages failed to install"
exit 1
fi
fi