diff options
| author | Hilton Chain <hako@ultrarare.space> | 2026-02-05 10:53:41 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2026-02-05 11:48:05 +0800 |
| commit | 6c0ea215e0bd089bf3b2097e5c59dd726fbbe304 (patch) | |
| tree | a9fc2182955bd82b76784a91b8a3ef47bf255e21 | |
| parent | 4e97b393a43ba9d64ace37e467fdd625e536cb45 (diff) | |
transformations: nvidia: Support S0ix-based power management.
* nonguix/transformations.scm (nonguix-transformation-nvidia)
[#:s0ix-power-management?]: New argument.
* README.org (System setup): Update
| -rw-r--r-- | README.org | 6 | ||||
| -rw-r--r-- | nonguix/transformations.scm | 12 |
2 files changed, 13 insertions, 5 deletions
@@ -234,6 +234,7 @@ Procedure =nonguix-transformation-nvidia= is defined in the #+begin_example nonguix-transformation-nvidia [#:driver nvda] [#:open-source-kernel-module? #f] + [#:s0ix-power-management? #f] [#:kernel-mode-setting? #t] [#:configure-xorg? #f] @@ -243,6 +244,9 @@ Procedure =nonguix-transformation-nvidia= is defined in the OPEN-SOURCE-KERNEL-MODULE? (default: #f) only supports Turing and later architectures and is expected to work with 'linux-lts'. + S0IX-POWER-MANAGEMENT? (default: #f) improves suspend and hibernate on systems + with supported graphics cards. + KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg support. @@ -251,8 +255,6 @@ Procedure =nonguix-transformation-nvidia= is defined in the Use 'replace-mesa', for application setup out of the operating system declaration. - - TODO: Power management. #+end_example For example, assuming the follow operating system declaration, defined as diff --git a/nonguix/transformations.scm b/nonguix/transformations.scm index bb5b72a..e4a5c22 100644 --- a/nonguix/transformations.scm +++ b/nonguix/transformations.scm @@ -101,6 +101,7 @@ and INITRD (default: microcode-initrd)." (define* (nonguix-transformation-nvidia #:key (driver nvda) (open-source-kernel-module? #f) + (s0ix-power-management? #f) (kernel-mode-setting? #t) (configure-xorg? #f)) "Return a procedure that transforms an operating system, setting up @@ -109,6 +110,9 @@ DRIVER (default: nvda) for NVIDIA graphics card. OPEN-SOURCE-KERNEL-MODULE? (default: #f) only supports Turing and later architectures and is expected to work with 'linux-lts'. +S0IX-POWER-MANAGEMENT? (default: #f) improves suspend and hibernate on systems +with supported graphics cards. + KERNEL-MODE-SETTING? (default: #t) is required for Wayland and rootless Xorg support. @@ -116,9 +120,7 @@ CONFIGURE-XORG? (default: #f) is required for Xorg display managers. Currently this argument configures the one used by '%desktop-services', GDM or SDDM. Use 'replace-mesa', for application setup out of the operating system -declaration. - -TODO: Power management." +declaration." (define %presets `((,nvda . ,(service nvidia-service-type (nvidia-configuration @@ -142,6 +144,10 @@ TODO: Power management." (kernel-arguments (delete-duplicates `("modprobe.blacklist=nouveau" + ,@(if s0ix-power-management? + '("mem_sleep_default=s2idle" + "nvidia.NVreg_EnableS0ixPowerManagement=1") + '()) ,(if kernel-mode-setting? "nvidia_drm.modeset=1" "nvidia_drm.modeset=0") |
