about summary refs log tree commit diff
path: root/lenovo
diff options
context:
space:
mode:
authorAndré-Patrick Bubel <code@andre-bubel.de>2018-10-19 17:52:25 +0200
committerJörg Thalheim <joerg@thalheim.io>2018-10-23 09:28:07 +0100
commit941fbef86f558b9a39e6d1460ba5a34ecd72ebd5 (patch)
tree152d0fe4d5154f573cd48698215bc4564177cd49 /lenovo
parentd4a430fef28b584bfcf580a681cd63330a232241 (diff)
downloadnixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar.gz
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar.bz2
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar.lz
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar.xz
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.tar.zst
nixlib-941fbef86f558b9a39e6d1460ba5a34ecd72ebd5.zip
move acpi_call.nix and cpu-throttling-bug.nix to common folder
Diffstat (limited to 'lenovo')
-rw-r--r--lenovo/thinkpad/acpi_call.nix10
-rw-r--r--lenovo/thinkpad/cpu-throttling-bug.nix38
-rw-r--r--lenovo/thinkpad/t450s/default.nix2
-rw-r--r--lenovo/thinkpad/t480s/default.nix4
-rw-r--r--lenovo/thinkpad/x1/6th-gen/default.nix4
-rw-r--r--lenovo/thinkpad/x230/default.nix2
-rw-r--r--lenovo/thinkpad/x260/default.nix2
7 files changed, 7 insertions, 55 deletions
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