mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-06 09:58:47 +08:00
conditionally turn on power management and modesetting when we are in sync mode
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, config, ... }: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/gpu/nvidia.nix
|
../../../common/gpu/nvidia.nix
|
||||||
../../../common/cpu/intel
|
../../../common/cpu/intel
|
||||||
@@ -25,6 +24,18 @@
|
|||||||
# required to make wireless work
|
# required to make wireless work
|
||||||
hardware.enableAllFirmware = lib.mkDefault true;
|
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
|
# throttled vs. thermald
|
||||||
# -----------------------
|
# -----------------------
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ lib, ... }:
|
{ config, lib, ... }: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/gpu/nvidia.nix
|
../../../common/gpu/nvidia.nix
|
||||||
../../../common/cpu/intel
|
../../../common/cpu/intel
|
||||||
@@ -26,6 +25,18 @@
|
|||||||
# required to make wireless work
|
# required to make wireless work
|
||||||
hardware.enableAllFirmware = lib.mkDefault true;
|
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
|
# throttled vs. thermald
|
||||||
# -----------------------
|
# -----------------------
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user