PortValhalla/scripts/Common/Config/nvidia-dkms/install.sh

19 lines
649 B
Bash
Raw Normal View History

#!/bin/bash
# According to installation guide on Arch Wiki:
# https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
2024-03-08 23:18:55 +00:00
{
echo "options nvidia_drm modeset=1";
2024-03-10 02:06:15 +00:00
# echo "options nvidia_drm fbdev=1";
2024-03-08 23:18:55 +00:00
} | sudo tee /etc/modprobe.d/nvidia.conf > /dev/null;
# According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks
{
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 systemctl enable \
nvidia-suspend.service \
nvidia-hibernate.service \
nvidia-resume.service;