1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

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,9 +24,21 @@
# 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
# -----------------------
#