mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Fix hibernation on new NVidia drivers (#5519)
New drivers don't seem to expose the necessary suspend interface to use `NVreg_PreserveVideoMemoryAllocations`. I explained the issues I experienced on: https://github.com/basecamp/omarchy/discussions/5500 While https://github.com/omacom-io/omarchy-pkgs/pull/84 fixed part of the issue, the default value of `NVreg_PreserveVideoMemoryAllocations` is `2`, which doesn't work.
This commit is contained in:
@@ -24,6 +24,12 @@ if [[ -n $NVIDIA ]]; then
|
||||
# Configure modprobe for early KMS
|
||||
sudo tee /etc/modprobe.d/nvidia.conf <<EOF >/dev/null
|
||||
options nvidia_drm modeset=1
|
||||
EOF
|
||||
|
||||
# Ensure NVreg_UseKernelSuspendNotifiers is used for hibernation
|
||||
sudo tee -a /etc/modprobe.d/nvidia.conf <<EOF >/dev/null
|
||||
options nvidia NVreg_PreserveVideoMemoryAllocations=0
|
||||
options nvidia NVreg_UseKernelSuspendNotifiers=1
|
||||
EOF
|
||||
|
||||
# Configure mkinitcpio for early loading
|
||||
|
||||
Executable
+9
@@ -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 <<EOF >/dev/null
|
||||
options nvidia NVreg_PreserveVideoMemoryAllocations=0
|
||||
options nvidia NVreg_UseKernelSuspendNotifiers=1
|
||||
EOF
|
||||
sudo limine-update
|
||||
fi
|
||||
Reference in New Issue
Block a user