From 941fbef86f558b9a39e6d1460ba5a34ecd72ebd5 Mon Sep 17 00:00:00 2001 From: André-Patrick Bubel Date: Fri, 19 Oct 2018 17:52:25 +0200 Subject: move acpi_call.nix and cpu-throttling-bug.nix to common folder --- lenovo/thinkpad/acpi_call.nix | 10 --------- lenovo/thinkpad/cpu-throttling-bug.nix | 38 ---------------------------------- lenovo/thinkpad/t450s/default.nix | 2 +- lenovo/thinkpad/t480s/default.nix | 4 ++-- lenovo/thinkpad/x1/6th-gen/default.nix | 4 ++-- lenovo/thinkpad/x230/default.nix | 2 +- lenovo/thinkpad/x260/default.nix | 2 +- 7 files changed, 7 insertions(+), 55 deletions(-) delete mode 100644 lenovo/thinkpad/acpi_call.nix delete mode 100644 lenovo/thinkpad/cpu-throttling-bug.nix (limited to 'lenovo') diff --git a/lenovo/thinkpad/acpi_call.nix b/lenovo/thinkpad/acpi_call.nix deleted file mode 100644 index f8c17dcc4901..000000000000 --- a/lenovo/thinkpad/acpi_call.nix +++ /dev/null @@ -1,10 +0,0 @@ -# acpi_call makes tlp work for newer thinkpads - -{ config, ... }: - -{ - boot = { - kernelModules = [ "acpi_call" ]; - extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; - }; -} diff --git a/lenovo/thinkpad/cpu-throttling-bug.nix b/lenovo/thinkpad/cpu-throttling-bug.nix deleted file mode 100644 index a44bb7225d0f..000000000000 --- a/lenovo/thinkpad/cpu-throttling-bug.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, pkgs, ... }: -{ - # Temporary fix for cpu throttling issues visible in the kernel log - # (journalctl -k) by setting the same temperature limits used by - # Window$ - # See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues - systemd.services.cpu-throttling = { - enable = true; - description = "Sets the offset to 3 °C, so the new trip point is 97 °C"; - documentation = [ - "https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues" - ]; - path = [ pkgs.msr-tools ]; - script = "wrmsr -a 0x1a2 0x3000000"; - serviceConfig = { - Type = "oneshot"; - }; - wantedBy = [ - "timers.target" - ]; - }; - - systemd.timers.cpu-throttling = { - enable = true; - description = "Set cpu heating limit to 97 °C"; - documentation = [ - "https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Power_management.2FThrottling_issues" - ]; - timerConfig = { - OnActiveSec = 60; - OnUnitActiveSec = 60; - Unit = "cpu-throttling.service"; - }; - wantedBy = [ - "timers.target" - ]; - }; -} diff --git a/lenovo/thinkpad/t450s/default.nix b/lenovo/thinkpad/t450s/default.nix index 026332e4e9cd..e62337171b9a 100644 --- a/lenovo/thinkpad/t450s/default.nix +++ b/lenovo/thinkpad/t450s/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/intel - ../acpi_call.nix + ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index 2f4b8a9129e3..3e079d5fb060 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -3,8 +3,8 @@ { imports = [ ../../../common/cpu/intel - ../acpi_call.nix - ../cpu-throttling-bug.nix + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/cpu-throttling-bug.nix ../. ]; } diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 4a10a23156ab..9584bc744571 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -7,8 +7,8 @@ { imports = [ ../. - ../../cpu-throttling-bug.nix - ../../acpi_call.nix + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/cpu-throttling-bug.nix ]; # See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery diff --git a/lenovo/thinkpad/x230/default.nix b/lenovo/thinkpad/x230/default.nix index 32e5c13c7da6..58b09f4c5d5f 100644 --- a/lenovo/thinkpad/x230/default.nix +++ b/lenovo/thinkpad/x230/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel - ../acpi_call.nix + ../../../common/pc/laptop/acpi_call.nix ]; boot = { diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index 46530eeb0b9c..d64a53075163 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -1,8 +1,8 @@ { imports = [ ../. - ../acpi_call.nix ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix ]; # https://wiki.archlinux.org/index.php/TLP#Btrfs -- cgit 1.4.1