From 5f104d82e647b02aa1808eb7d6fe02c6e10e1586 Mon Sep 17 00:00:00 2001 From: Lgmrszd Date: Fri, 27 Jun 2025 02:25:08 +0400 Subject: [PATCH] laptop: enable nvidia power management --- hosts/laptop/configuration.nix | 4 +++- hosts/laptop/hardware-configuration.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index f417177..72c6361 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -129,8 +129,10 @@ in open = false; # Enable the nvidia settings menu nvidiaSettings = true; + powerManagement.enable = true; + powerManagement.finegrained = false; # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; + package = config.boot.kernelPackages.nvidiaPackages.beta; }; # NVIDIA diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index bb94530..5138656 100644 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -16,7 +16,7 @@ in boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "ahci" "nvme" "usbhid" "uas" "usb_storage" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-intel" ]; - boot.kernelParams = [ "i915.enable_psr=0" ]; + boot.kernelParams = [ "i915.enable_psr=0" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ]; boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; fileSystems."/" =