2023-04-13 15:52:07 +00:00
|
|
|
#!/bin/bash
|
2024-03-09 20:44:18 +00:00
|
|
|
# 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;
|
2023-04-13 15:52:07 +00:00
|
|
|
|
2024-03-09 20:44:18 +00:00
|
|
|
# According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks
|
2024-03-09 10:43:47 +00:00
|
|
|
{
|
|
|
|
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1";
|
|
|
|
echo "options nvidia NVreg_TemporaryFilePath=/var/tmp";
|
|
|
|
} | sudo tee /etc/modprobe.d/nvidia-power-management.conf > /dev/null;
|
|
|
|
|
2023-04-13 15:52:07 +00:00
|
|
|
sudo systemctl enable \
|
|
|
|
nvidia-suspend.service \
|
|
|
|
nvidia-hibernate.service \
|
|
|
|
nvidia-resume.service;
|