Add scripts for installing nvidia drivers
This commit is contained in:
parent
05e62d5aa1
commit
6966387b8b
2 changed files with 30 additions and 0 deletions
9
scripts/Arch/Software/nvidia-dkms/install.sh
Executable file
9
scripts/Arch/Software/nvidia-dkms/install.sh
Executable 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;
|
21
scripts/Common/Config/nvidia-dkms/install.sh
Executable file
21
scripts/Common/Config/nvidia-dkms/install.sh
Executable 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;
|
Loading…
Reference in a new issue