-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nvidia-prime): automatic battery-saver specialisation #1414
base: master
Are you sure you want to change the base?
Conversation
This enables a boot option that switches off NVIDIA GPU. Allows for battery saving. @moduon MT-9339
5808a05
to
a807913
Compare
enable = lib.mkOverride 990 true; | ||
enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. | ||
}; | ||
# Hardware should specify the bus ID for intel/nvidia devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like here: https://github.com/NixOS/nixos-hardware/pull/1413/files#diff-0fd91ddb6f4a0caed91c46e554f84c36da109e5b30a68655b45fab12058ebf7fR21
Would you prefer if this were an assertion?
FWIW this comment was already here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, would probably be nice if we asserted this so that it isn't forgotten.
Co-authored-by: Sandro <[email protected]>
IMHO this should be ready to merge. |
enable = lib.mkOverride 990 true; | ||
enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command. | ||
options = { | ||
hardware.nvidia.primeBatterySaverSpecialisation = lib.mkEnableOption "Configure a specialisation which turns on NVIDIA Prime battery saver"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardware.nvidia.primeBatterySaverSpecialisation = lib.mkEnableOption "Configure a specialisation which turns on NVIDIA Prime battery saver"; | |
hardware.nvidia.primeBatterySaverSpecialisation = lib.mkEnableOption "configure a specialisation which turns on NVIDIA Prime battery saver"; |
otherwise the generated option will be named with a capital letter in a random position.
hardware.nvidia.prime.offload.enable = lib.mkForce false; | ||
hardware.nvidia.powerManagement.enable = lib.mkForce false; | ||
hardware.nvidia.powerManagement.finegrained = lib.mkForce false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardware.nvidia.prime.offload.enable = lib.mkForce false; | |
hardware.nvidia.powerManagement.enable = lib.mkForce false; | |
hardware.nvidia.powerManagement.finegrained = lib.mkForce false; | |
hardware.nvidia = { | |
prime.offload.enable = lib.mkForce false; | |
powerManagement = { | |
enable = lib.mkForce false; | |
finegrained = lib.mkForce false; | |
}; | |
}; |
but only a nit
This enables a boot option that switches off NVIDIA GPU. Allows for battery saving.
@moduon MT-9339
Description of changes
Things done
nixos-hardware
andimporting it via
<nixos-hardware>
or Flake input