Add scripts for installing nvidia drivers

This commit is contained in:
Manuel Thalmann 2023-04-13 17:52:07 +02:00
parent 05e62d5aa1
commit 6966387b8b
2 changed files with 30 additions and 0 deletions

View file

@ -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;

View file

@ -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;