diff --git a/scripts/Arch/Software/nvidia-dkms/install.sh b/scripts/Arch/Software/nvidia-dkms/install.sh new file mode 100755 index 00000000..f7628a91 --- /dev/null +++ b/scripts/Arch/Software/nvidia-dkms/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; + +yay --noconfirm -Syu \ + nvidia-dkms \ + lib32-nvidia; + +. ../../../Common/Config/nvidia-dkms/install.sh; +popd > /dev/null; diff --git a/scripts/Common/Config/nvidia-dkms/install.sh b/scripts/Common/Config/nvidia-dkms/install.sh new file mode 100755 index 00000000..34889332 --- /dev/null +++ b/scripts/Common/Config/nvidia-dkms/install.sh @@ -0,0 +1,21 @@ +#!/bin/bash +echo "options nvidia_drm modeset=1" | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null; + +{ + echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1"; + echo "options nvidia NVreg_TemporaryFilePath=/var/tmp"; +} | sudo tee /etc/modprobe.d/nvidia-power-management.conf > /dev/null; + +sudo sed -i \ + -e "/^HOOKS=(/{" \ + -e "h; s/^/#/; p;" \ + -e "g; s/ kms / /" \ + -e "}" \ + /etc/mkinitcpio.conf; + +sudo mkinitcpio -P; + +sudo systemctl enable \ + nvidia-suspend.service \ + nvidia-hibernate.service \ + nvidia-resume.service;