diff --git a/install/config/hardware/nvidia.sh b/install/config/hardware/nvidia.sh index 5fb37232..e5605cae 100644 --- a/install/config/hardware/nvidia.sh +++ b/install/config/hardware/nvidia.sh @@ -24,6 +24,12 @@ if [[ -n $NVIDIA ]]; then # Configure modprobe for early KMS sudo tee /etc/modprobe.d/nvidia.conf </dev/null options nvidia_drm modeset=1 +EOF + + # Ensure NVreg_UseKernelSuspendNotifiers is used for hibernation + sudo tee -a /etc/modprobe.d/nvidia.conf </dev/null +options nvidia NVreg_PreserveVideoMemoryAllocations=0 +options nvidia NVreg_UseKernelSuspendNotifiers=1 EOF # Configure mkinitcpio for early loading diff --git a/migrations/1777018591.sh b/migrations/1777018591.sh new file mode 100755 index 00000000..1649b6ab --- /dev/null +++ b/migrations/1777018591.sh @@ -0,0 +1,9 @@ +echo "Ensure NVreg_UseKernelSuspendNotifiers is used for hibernation" + +if [[ -f /etc/modprobe.d/nvidia.conf ]] && ! grep -q "NVreg_PreserveVideoMemoryAllocations" /etc/modprobe.d/nvidia.conf; then + sudo tee -a /etc/modprobe.d/nvidia.conf </dev/null +options nvidia NVreg_PreserveVideoMemoryAllocations=0 +options nvidia NVreg_UseKernelSuspendNotifiers=1 +EOF + sudo limine-update +fi