From 0aaa5addfb8ad428bc31c23da24fea8996f853ca Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Thu, 10 Sep 2020 06:59:32 +0200 Subject: [PATCH] nixos/thermald: add adaptive mode thermald >=2.3 supports the adaptive DPTF mode, in conjunction with kernel 5.8. --- nixos/modules/services/hardware/thermald.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/modules/services/hardware/thermald.nix b/nixos/modules/services/hardware/thermald.nix index ecb529e9bf01..b7be0e89d0c6 100644 --- a/nixos/modules/services/hardware/thermald.nix +++ b/nixos/modules/services/hardware/thermald.nix @@ -23,6 +23,15 @@ in { default = null; description = "the thermald manual configuration file."; }; + + adaptive = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable adaptive mode, only working on kernel versions greater than 5.8. + Thermald will detect this itself, safe to enable on kernel versions below 5.8. + ''; + }; }; }; @@ -39,6 +48,7 @@ in { --no-daemon \ ${optionalString cfg.debug "--loglevel=debug"} \ ${optionalString (cfg.configFile != null) "--config-file ${cfg.configFile}"} \ + ${optionalString cfg.adaptive "--adaptive"} \ --dbus-enable ''; };