mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Hardware/Nvidia] allow setting Nvidia registry Dword options
By default, enable PowerMizer and set sane defaults
This commit is contained in:
parent
b3f9af9be1
commit
d14e1dd926
1 changed files with 9 additions and 0 deletions
|
|
@ -42,6 +42,12 @@ in {
|
|||
default = if generalCfg.unsafeOptimizations then "beta" else "stable";
|
||||
example = "unstable_beta";
|
||||
};
|
||||
registryDwords = mkOption {
|
||||
description = "Registry DWORDS to set for Nvidia driver";
|
||||
example = [ "OverrideMaxPerf=0x1" ];
|
||||
default = [ "PowerMizerEnable=0x1" "PerfLevelSrc=0x2222" "PowerMizerDefault=0x3" "PowerMizerDefaultAC=0x1" ];
|
||||
type = with types; listOf str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -90,6 +96,9 @@ in {
|
|||
|
||||
aviallon.programs.nvtop.nvidia = true;
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
option nvidia NVreg_RegistryDwords="${concatStringsSep ";" cfg.proprietary.registryDwords}"
|
||||
'';
|
||||
aviallon.boot.cmdline = {}
|
||||
// {
|
||||
"nvidia-drm.modeset" = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue