Create separate script for configuring nvidia on Arch
This commit is contained in:
parent
9a1a238514
commit
def176c089
3 changed files with 16 additions and 10 deletions
15
scripts/Arch/Config/nvidia-dkms/install.sh
Normal file
15
scripts/Arch/Config/nvidia-dkms/install.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
|
||||
sudo sed -i \
|
||||
-e "/^HOOKS=(.* kms /{" \
|
||||
-e "h; s/^/#/; p;" \
|
||||
-e "g; s/ kms / /" \
|
||||
-e "}" \
|
||||
/etc/mkinitcpio.conf;
|
||||
|
||||
sudo mkinitcpio -P;
|
||||
|
||||
. "../../../Common/Config/nvidia-dkms/install.sh";
|
||||
|
||||
popd > /dev/null;
|
|
@ -8,5 +8,5 @@ yay --noconfirm -Syu \
|
|||
nvidia-dkms \
|
||||
lib32-nvidia-utils;
|
||||
|
||||
. ../../../Common/Config/nvidia-dkms/install.sh;
|
||||
. ../../Config/nvidia-dkms/install.sh;
|
||||
popd > /dev/null;
|
||||
|
|
|
@ -6,15 +6,6 @@
|
|||
# echo "options nvidia_drm fbdev=1";
|
||||
} | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null;
|
||||
|
||||
sudo sed -i \
|
||||
-e "/^HOOKS=(.* kms /{" \
|
||||
-e "h; s/^/#/; p;" \
|
||||
-e "g; s/ kms / /" \
|
||||
-e "}" \
|
||||
/etc/mkinitcpio.conf;
|
||||
|
||||
sudo mkinitcpio -P;
|
||||
|
||||
# According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks
|
||||
{
|
||||
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1";
|
||||
|
|
Loading…
Reference in a new issue