Set modeset parameter in mkinitcpio

This commit is contained in:
Manuel Thalmann 2024-06-19 13:56:37 +02:00
parent c099159759
commit f2414083d6
2 changed files with 2 additions and 7 deletions

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
pushd "${BASH_SOURCE%/*}" > /dev/null; pushd "${BASH_SOURCE%/*}" > /dev/null;
echo "MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)" | sudo tee /etc/mkinitcpio.conf.d/nvidia.conf > /dev/null;
sudo sed -i \ sudo sed -i \
-e "/^HOOKS=(.* kms /{" \ -e "/^HOOKS=(.* kms /{" \
-e "h; s/^/#/; p;" \ -e "h; s/^/#/; p;" \

View file

@ -1,11 +1,4 @@
#!/bin/bash #!/bin/bash
# According to installation guide on Arch Wiki:
# https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
{
echo "options nvidia_drm modeset=1";
# echo "options nvidia_drm fbdev=1";
} | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null;
# According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks # According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks
{ {
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1"; echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1";