diff --git a/lenovo/thinkpad/p50/default.nix b/lenovo/thinkpad/p50/default.nix index 4b249bf..04f88cf 100644 --- a/lenovo/thinkpad/p50/default.nix +++ b/lenovo/thinkpad/p50/default.nix @@ -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 # ----------------------- # diff --git a/lenovo/thinkpad/p51/default.nix b/lenovo/thinkpad/p51/default.nix index 0b3d16b..d3de794 100644 --- a/lenovo/thinkpad/p51/default.nix +++ b/lenovo/thinkpad/p51/default.nix @@ -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 # ----------------------- #