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


Commits:
55644f78 by Peter Jung at 2024-10-03T18:24:00+00:00
nvidia-utils: Enable PreserveVideoMemoryAllocations and TemporaryFilePath

Signed-off-by: Peter Jung <[email protected]>

- - - - -
eb1e0135 by Peter Jung at 2024-10-03T18:24:00+00:00
nvidia-utils: Add info about nvidia services on wayland

Signed-off-by: Peter Jung <[email protected]>

- - - - -


4 changed files:

- .SRCINFO
- PKGBUILD
- + nvidia-sleep.conf
- nvidia-utils.install


Changes:

=====================================
.SRCINFO
=====================================
@@ -11,6 +11,7 @@ pkgbase = nvidia-utils
        source = nvidia.rules
        source = systemd-homed-override.conf
        source = systemd-suspend-override.conf
+       source = nvidia-sleep.conf
        source = 
https://us.download.nvidia.com/XFree86/Linux-x86_64/560.35.03/NVIDIA-Linux-x86_64-560.35.03.run
        source = make-modeset-fbdev-default.patch
        source = 6.11-fbdev.patch
@@ -19,6 +20,7 @@ pkgbase = nvidia-utils
        sha512sums = 
f8f071f5a46c1a5ce5188e104b017808d752e61c0c20de1466feb5d693c0b55a5586314411e78cc2ab9c0e16e2c67afdd358da94c0c75df1f8233f54c280762c
        sha512sums = 
a0183adce78e40853edf7e6b73867e7a8ea5dabac8e8164e42781f64d5232fbe869f850ab0697c3718ebced5cde760d0e807c05da50a982071dfe1157c31d6b8
        sha512sums = 
55def6319f6abb1a4ccd28a89cd60f1933d155c10ba775b8dfa60a2dc5696b4b472c14b252dc0891f956e70264be87c3d5d4271e929a4fc4b1a68a6902814cee
+       sha512sums = 
b1234bc34dbc94064d4f2825d9ac37e650f659d2665fcb21504ff413ae511ad3b6131e7ebe0c108400555c6b33b61d669d09589a7b6d5668742382483c1aee99
        sha512sums = 
97137160b64928ff84fd6145a0ebc209c045d6a07ccc53ec6df6ba1fda2ad72038eda7ecdc0a0178a2628aa4e18819a9b3ff3b693b22bdc9de543be0a968f8aa
        sha512sums = 
73a3734aa0dd4df3cfba9dd7153f9b82981c4a4e86df0c804fb966280c02af8c39ad649bfa3d4119b82709974a40eaab67d357c586b2414c66113929a47628e9
        sha512sums = 
d37aa56ed937c596340106138a80c38ef5cc703cdc270dea6189fda20bcf369b11badd662bd0c0799ec1282428ca64d3dc137289fa1951905a10fd4cba6dd9b0


=====================================
PKGBUILD
=====================================
@@ -18,6 +18,7 @@ source=('nvidia-drm-outputclass.conf'
         'nvidia.rules'
         'systemd-homed-override.conf'
         'systemd-suspend-override.conf'
+        'nvidia-sleep.conf'
         
"https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run";
         "make-modeset-fbdev-default.patch"
         "6.11-fbdev.patch")
@@ -26,6 +27,7 @@ 
sha512sums=('de7116c09f282a27920a1382df84aa86f559e537664bb30689605177ce37dc50677
             
'f8f071f5a46c1a5ce5188e104b017808d752e61c0c20de1466feb5d693c0b55a5586314411e78cc2ab9c0e16e2c67afdd358da94c0c75df1f8233f54c280762c'
             
'a0183adce78e40853edf7e6b73867e7a8ea5dabac8e8164e42781f64d5232fbe869f850ab0697c3718ebced5cde760d0e807c05da50a982071dfe1157c31d6b8'
             
'55def6319f6abb1a4ccd28a89cd60f1933d155c10ba775b8dfa60a2dc5696b4b472c14b252dc0891f956e70264be87c3d5d4271e929a4fc4b1a68a6902814cee'
+            
'b1234bc34dbc94064d4f2825d9ac37e650f659d2665fcb21504ff413ae511ad3b6131e7ebe0c108400555c6b33b61d669d09589a7b6d5668742382483c1aee99'
             
'97137160b64928ff84fd6145a0ebc209c045d6a07ccc53ec6df6ba1fda2ad72038eda7ecdc0a0178a2628aa4e18819a9b3ff3b693b22bdc9de543be0a968f8aa'
             
'73a3734aa0dd4df3cfba9dd7153f9b82981c4a4e86df0c804fb966280c02af8c39ad649bfa3d4119b82709974a40eaab67d357c586b2414c66113929a47628e9'
             
'd37aa56ed937c596340106138a80c38ef5cc703cdc270dea6189fda20bcf369b11badd662bd0c0799ec1282428ca64d3dc137289fa1951905a10fd4cba6dd9b0')
@@ -277,5 +279,9 @@ package_nvidia-utils() {
     echo "blacklist nouveau" | install -Dm644 /dev/stdin 
"${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
     echo "nvidia-uvm" | install -Dm644 /dev/stdin 
"${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
 
+    # Enable PreserveVideoMemoryAllocations and TemporaryFilePath
+    # Fixes Wayland Sleep, when restoring the session
+    install -Dm644 "${srcdir}/nvidia-sleep.conf" 
"${pkgdir}/usr/lib/modprobe.d/nvidia-sleep.conf"
+
     create_links
 }


=====================================
nvidia-sleep.conf
=====================================
@@ -0,0 +1,7 @@
+# 
https://download.nvidia.com/XFree86/Linux-x86_64/560.35.03/README/powermanagement.html#PreserveAllVide719f0
+# Save and restore all video memory allocations.
+options nvidia NVreg_PreserveVideoMemoryAllocations=1
+#
+# The destination should not be using tmpfs, so we prefer
+# /var/tmp instead of /tmp
+options nvidia NVreg_TemporaryFilePath=/var/tmp


=====================================
nvidia-utils.install
=====================================
@@ -1,6 +1,7 @@
 post_upgrade() {
   echo "If you run into trouble with CUDA not being available, run 
nvidia-modprobe first."
   echo "If you use GDM on Wayland, you might have to run systemctl enable 
--now nvidia-resume.service"
+  echo "If you use sleep on wayland, you might have to run systemctl enable 
nvidia-resume nvidia-hibernate nvidia-suspend"
 }
 # For the latter nore, see also https://gitlab.gnome.org/GNOME/gdm/-/issues/784
 



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/compare/3a2973638847c4bf6d8c213cc144fcd9478ea472...eb1e0135eb83c5ed5f2e4198a9e9892d7e85f9c7

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


Reply via email to