summaryrefslogtreecommitdiffstats
path: root/lenovo
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2019-07-19 11:03:36 +0100
committerMichael Peyton Jones <me@michaelpj.com>2019-10-16 22:31:05 +0100
commit2bf94227c1efbf47e99f55dacd799fffe87207e8 (patch)
tree570037970903307339c73362bba09b3de86d57c0 /lenovo
parented0d3cc198557b9260295aa8a384dd5080706aee (diff)
Replace ad hoc throttling fix with throttled
`throttled` is a service designed to fix the same CPU throttling bug, but it's an actively maintainted upstream project that we can use.
Diffstat (limited to 'lenovo')
-rw-r--r--lenovo/thinkpad/p53/default.nix5
-rw-r--r--lenovo/thinkpad/t480s/default.nix3
-rw-r--r--lenovo/thinkpad/t490/default.nix5
-rw-r--r--lenovo/thinkpad/x1-extreme/gen2/default.nix3
-rw-r--r--lenovo/thinkpad/x1/6th-gen/default.nix5
5 files changed, 13 insertions, 8 deletions
diff --git a/lenovo/thinkpad/p53/default.nix b/lenovo/thinkpad/p53/default.nix
index 6eadb6e..a499d5c 100644
--- a/lenovo/thinkpad/p53/default.nix
+++ b/lenovo/thinkpad/p53/default.nix
@@ -1,9 +1,10 @@
-{ nixos, pkgs, config, stdenv, ... }:
+{ nixos, pkgs, lib, config, stdenv, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop/acpi_call.nix
- ../../../common/pc/laptop/cpu-throttling-bug.nix
../.
];
+
+ services.throttled.enable = lib.mkDefault true;
}
diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix
index 3e079d5..1a14afa 100644
--- a/lenovo/thinkpad/t480s/default.nix
+++ b/lenovo/thinkpad/t480s/default.nix
@@ -4,7 +4,8 @@
imports = [
../../../common/cpu/intel
../../../common/pc/laptop/acpi_call.nix
- ../../../common/pc/laptop/cpu-throttling-bug.nix
../.
];
+
+ services.throttled.enable = lib.mkDefault true;
}
diff --git a/lenovo/thinkpad/t490/default.nix b/lenovo/thinkpad/t490/default.nix
index 1a4f71d..3578da6 100644
--- a/lenovo/thinkpad/t490/default.nix
+++ b/lenovo/thinkpad/t490/default.nix
@@ -1,9 +1,8 @@
-{ nixos, pkgs, config, stdenv, ... }:
+{ nixos, lib, pkgs, config, stdenv, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop/acpi_call.nix
- ../../../common/pc/laptop/cpu-throttling-bug.nix
../.
];
@@ -26,5 +25,7 @@
LABEL="pulseaudio_end"
'';
+
+ throttled.enable = lib.mkDefault true;
};
}
diff --git a/lenovo/thinkpad/x1-extreme/gen2/default.nix b/lenovo/thinkpad/x1-extreme/gen2/default.nix
index 912cc95..6b0ebbd 100644
--- a/lenovo/thinkpad/x1-extreme/gen2/default.nix
+++ b/lenovo/thinkpad/x1-extreme/gen2/default.nix
@@ -5,7 +5,6 @@ with lib;
{
imports = [
../.
- ../../../../common/pc/laptop/cpu-throttling-bug.nix
];
# Fixes an issue with incorrect battery reporting. See
@@ -44,4 +43,6 @@ with lib;
videoDrivers = [ "intel" ];
})
];
+
+ services.throttled.enable = lib.mkDefault true;
}
diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix
index e8c6f0e..00446b8 100644
--- a/lenovo/thinkpad/x1/6th-gen/default.nix
+++ b/lenovo/thinkpad/x1/6th-gen/default.nix
@@ -5,15 +5,16 @@
#
# Enable the lower-power S3 suspend state by upgrading the BIOS to version >= 1.30,
# then manually selecting Linux in the power management section.
-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
{
imports = [
../.
../../../../common/pc/laptop/acpi_call.nix
- ../../../../common/pc/laptop/cpu-throttling-bug.nix
];
# New ThinkPads have a different TrackPoint manufacturer/name.
# See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/
hardware.trackpoint.device = "TPPS/2 Elan TrackPoint";
+
+ services.throttled.enable = lib.mkDefault true;
}