Add options for GPU drivers
This commit is contained in:
parent
247e0e1824
commit
150641e21c
@ -103,6 +103,28 @@ echo "$username:$password" | chpasswd
|
|||||||
passwd --lock root
|
passwd --lock root
|
||||||
# Set up sudo so "wheel" group users can do root commands (password required)
|
# Set up sudo so "wheel" group users can do root commands (password required)
|
||||||
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
||||||
|
# Ask if this is being installed as a VM or bare metal, then install appropriate video drivers
|
||||||
|
read -p 'Is this being installed on VMWare Fusion? ' vmyesno
|
||||||
|
case $vmyesno in
|
||||||
|
[yesYesYy]* )
|
||||||
|
echo "Installing VM drivers"
|
||||||
|
pacman -S --noconfirm --needed open-vm-tools
|
||||||
|
cat /proc/version > /etc/arch-release
|
||||||
|
systemctl enable vmware-vmblock-fuse
|
||||||
|
systemctl enable vmtoolsd
|
||||||
|
pacman -S --noconfirm --needed xf86-input-vmmouse xf86-video-vmware mesa
|
||||||
|
;;
|
||||||
|
[noNoNn]* )
|
||||||
|
echo "Installing NVIDIA GPU drivers"
|
||||||
|
pacman -S --noconfirm nvidia-dkms nvidia-utils lib32-nvidia-utils nvidia-settings
|
||||||
|
# Tweak systemd.conf and enable services for proper suspend/resume
|
||||||
|
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" >> /lib/modprobe.d/systemd.conf
|
||||||
|
systemctl enable nvidia-suspend.service
|
||||||
|
systemctl enable nvidia-hibernate.service
|
||||||
|
systemctl enable nvidia-resume.service
|
||||||
|
;;
|
||||||
|
* ) echo "Please answer yes (Yes, y, Y) or no (No, n, N)";;
|
||||||
|
esac
|
||||||
# Required to enable network changes (not sure if this is neccesary)
|
# Required to enable network changes (not sure if this is neccesary)
|
||||||
#sysctl --system
|
#sysctl --system
|
||||||
# Prompt the user to reboot
|
# Prompt the user to reboot
|
||||||
|
Loading…
Reference in New Issue
Block a user