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

This commit is contained in:
Chris McDonough 2022-07-12 20:01:42 -04:00
parent 20530b31ef
commit 6261a28429
2 changed files with 26 additions and 4 deletions

View file

@ -1,5 +1,4 @@
{ lib, pkgs, ... }:
{
{ lib, config, ... }: {
imports = [
../../../common/gpu/nvidia.nix
../../../common/cpu/intel
@ -25,6 +24,18 @@
# required to make wireless work
hardware.enableAllFirmware = lib.mkDefault 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;
};
# throttled vs. thermald
# -----------------------
#

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{ config, lib, ... }: {
imports = [
../../../common/gpu/nvidia.nix
../../../common/cpu/intel
@ -26,6 +25,18 @@
# required to make wireless work
hardware.enableAllFirmware = lib.mkDefault 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;
};
# throttled vs. thermald
# -----------------------
#