Add nouveau option for old NVIDIA GPUs in Arch Server install (#1293)
Co-authored-by: Pinak Dhabu <thepinak503@users.noreply.github.com>
This commit is contained in:
@@ -536,6 +536,21 @@ fi
|
|||||||
|
|
||||||
gpu_type=$(lspci | grep -E "VGA|3D|Display")
|
gpu_type=$(lspci | grep -E "VGA|3D|Display")
|
||||||
|
|
||||||
|
select_nvidia_driver() {
|
||||||
|
if echo "${gpu_type}" | grep -qE "NVIDIA|GeForce"; then
|
||||||
|
echo ""
|
||||||
|
echo "NVIDIA GPU detected. Select driver:"
|
||||||
|
options=("nvidia-lts (proprietary)" "nouveau (open-source, skip nvidia-lts)")
|
||||||
|
select_option "${options[@]}"
|
||||||
|
case $? in
|
||||||
|
0) NVIDIA_DRIVER="nvidia-lts" ;;
|
||||||
|
1) NVIDIA_DRIVER="" ;;
|
||||||
|
esac
|
||||||
|
export NVIDIA_DRIVER
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
select_nvidia_driver
|
||||||
|
|
||||||
arch-chroot /mnt /bin/bash -c "KEYMAP='${KEYMAP}' /bin/bash" <<EOF
|
arch-chroot /mnt /bin/bash -c "KEYMAP='${KEYMAP}' /bin/bash" <<EOF
|
||||||
|
|
||||||
echo -ne "
|
echo -ne "
|
||||||
@@ -608,8 +623,12 @@ echo -ne "
|
|||||||
"
|
"
|
||||||
# Graphics Drivers find and install
|
# Graphics Drivers find and install
|
||||||
if echo "${gpu_type}" | grep -E "NVIDIA|GeForce"; then
|
if echo "${gpu_type}" | grep -E "NVIDIA|GeForce"; then
|
||||||
echo "Installing NVIDIA drivers: nvidia-lts"
|
if [ -n "${NVIDIA_DRIVER}" ]; then
|
||||||
pacman -S --noconfirm --needed nvidia-lts
|
echo "Installing NVIDIA drivers: ${NVIDIA_DRIVER}"
|
||||||
|
pacman -S --noconfirm --needed "${NVIDIA_DRIVER}"
|
||||||
|
else
|
||||||
|
echo "Skipping proprietary NVIDIA driver. Using kernel nouveau + modesetting."
|
||||||
|
fi
|
||||||
elif echo "${gpu_type}" | grep 'VGA' | grep -E "Radeon|AMD"; then
|
elif echo "${gpu_type}" | grep 'VGA' | grep -E "Radeon|AMD"; then
|
||||||
echo "Installing AMD drivers: xf86-video-amdgpu"
|
echo "Installing AMD drivers: xf86-video-amdgpu"
|
||||||
pacman -S --noconfirm --needed xf86-video-amdgpu
|
pacman -S --noconfirm --needed xf86-video-amdgpu
|
||||||
|
|||||||
Reference in New Issue
Block a user