Sven-Hendrik Haase pushed to branch main at Arch Linux / Packaging / Packages / 
nvidia-utils


Commits:
d9271f38 by Vitamina Cé at 2025-12-13T15:38:33+00:00
nvidia-utils: Enable nvidia-suspend-then-hibernate
- - - - -


1 changed file:

- nvidia-utils.install


Changes:

=====================================
nvidia-utils.install
=====================================
@@ -1,26 +1,26 @@
 post_install() {
-  # Enable NVIDIA Services at first installation
+  # Enable NVIDIA services at first installation
   # The services are mandatory, see under systemd configuration
-  # 
https://download.nvidia.com/XFree86/Linux-x86_64/560.35.03/README/powermanagement.html#SystemdConfigur74e29
-  # This is also an requirement to have sleep working together with 
PreserveAllocations
+  # 
https://download.nvidia.com/XFree86/Linux-x86_64/570.86.16/README/powermanagement.html#SystemdConfigur74e29
+  # This is also a requirement to have sleep working together with 
PreserveAllocations
   # 
https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/commit/55644f78820fd382fbdf283b1fd7f08e6b7c22d7
   # 
https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/merge_requests/16
-  systemctl enable nvidia-resume nvidia-hibernate nvidia-suspend
+  systemctl enable nvidia-resume nvidia-hibernate nvidia-suspend 
nvidia-suspend-then-hibernate
 }
 
 post_upgrade() {
-  # Only enable the services for the 560.35.03-16 version
-  # This avoids, that the services are automatically enabled in every upgrade
-  if (( $(vercmp $2 560.35.03-16) < 0)); then
-    for service in nvidia-resume nvidia-hibernate nvidia-suspend; do
-        if ! systemctl is-enabled --quiet $service; then
-            echo "Enabling $service..."
-            systemctl enable $service
-        fi
+  # Enable services only for versions prior to 570.86.16-1
+  # This prevents services from being automatically enabled on every update
+  if (( $(vercmp $2 570.86.16-1) < 0)); then
+    for service in nvidia-resume nvidia-hibernate nvidia-suspend 
nvidia-suspend-then-hibernate; do
+      if ! systemctl is-enabled --quiet $service; then
+        echo "Enabling $service..."
+        systemctl enable $service
+      fi
     done
   fi
 }
 
 pre_remove() {
-  systemctl disable nvidia-resume nvidia-hibernate nvidia-suspend
-}
+  systemctl disable nvidia-resume nvidia-hibernate nvidia-suspend 
nvidia-suspend-then-hibernate
+}
\ No newline at end of file



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/commit/d9271f38578a7aba06f3c2259875367b1699b710

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/commit/d9271f38578a7aba06f3c2259875367b1699b710
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to