diff options
Diffstat (limited to 'system/nvidia.nix')
| -rw-r--r-- | system/nvidia.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/system/nvidia.nix b/system/nvidia.nix index d9818e0..566da5d 100644 --- a/system/nvidia.nix +++ b/system/nvidia.nix @@ -9,7 +9,13 @@ in { config = mkIf cfg.enable { # kernel modules - boot.blacklistedKernelModules = ["nouveau"]; + boot = { + blacklistedKernelModules = ["nouveau"]; + kernelParams = [ + "nvidia.NVreg_PreserveVideoMemoryAllocations=1" + "nvidia.NVreg_TemporaryFilePath=/var/tmp" + ]; + }; services.xserver.videoDrivers = ["modesetting" "nvidia"]; # nvidia driver @@ -17,7 +23,7 @@ in { modesetting.enable = true; powerManagement = { enable = true; - finegrained = true; + finegrained = false; }; prime = cfg.primeBusIds @@ -32,6 +38,11 @@ in { package = config.boot.kernelPackages.nvidiaPackages.latest; }; + # NVIDIA Reflex + hardware.graphics.extraPackages = with pkgs; [ + low-latency-layer + ]; + # cuda environment = mkIf cfg.cuda.enable { systemPackages = with pkgs; [ @@ -44,6 +55,9 @@ in { NVIDIA_DRIVER_CAPABILITIES = "compute,utility"; CUDA_VISIBLE_DEVICES = 0; CUDA_PATH = "${pkgs.cudatoolkit}"; + # NVIDIA Reflex + LOW_LATENCY_LAYER = "1"; + LOW_LATENCY_LAYER_REFLEX = "1"; }; }; nix.settings = mkIf cfg.cuda.enable { |