conditionally turn on power management and modesetting when we are in sync mode

This commit is contained in:
Chris McDonough 2022-07-12 20:02:44 -04:00
parent fd08b05aed
commit e8e0e7dc37

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{ lib, config, ... }: {
imports = [
../../../common/gpu/nvidia.nix
../../../common/cpu/intel
@ -25,8 +24,20 @@
# required to make wireless work
hardware.enableAllFirmware = lib.mkDefault true;
# fix suspend/resume screen corruption
#hardware.nvidia.powerManagement.enable = true;
# fix suspend/resume screen corruption in sync mode
hardware.nvidia.powerManagement =
lib.mkIf config.hardware.nvidia.prime.sync.enable {
enable = lib.mkDefault true;
};
# fix screen tearing in sync mode
hardware.nvidia.modesetting =
lib.mkIf config.hardware.nvidia.prime.sync.enable {
enable = lib.mkDefault true;
};
# silence ACPI "errors" at boot shown before NixOS stage 1 output (default is 4)
#boot.consoleLogLevel = 3;
# throttled vs. thermald
# -----------------------