Skip to content

Commit

Permalink
Merge pull request #115 from michaelpj/imp/throttled
Browse files Browse the repository at this point in the history
Replace ad hoc throttling fix with throttled
  • Loading branch information
Mic92 authored Oct 21, 2019
2 parents ed0d3cc + 2bf9422 commit 1ea7efa
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 47 deletions.
38 changes: 0 additions & 38 deletions common/pc/laptop/cpu-throttling-bug.nix

This file was deleted.

3 changes: 2 additions & 1 deletion dell/xps/13-9370/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
../../../common/cpu/intel/kaby-lake
../../../common/pc/laptop
../../../common/pc/laptop/acpi_call.nix
../../../common/pc/laptop/cpu-throttling-bug.nix
];

# Force S3 sleep mode. See README.wiki for details.
boot.kernelParams = [ "mem_sleep_default=deep" ];

# touchpad goes over i2c
boot.blacklistedKernelModules = [ "psmouse" ];

services.throttled.enable = lib.mkDefault true;
}
5 changes: 3 additions & 2 deletions lenovo/thinkpad/p53/default.nix
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 2 additions & 1 deletion lenovo/thinkpad/t480s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 3 additions & 2 deletions lenovo/thinkpad/t490/default.nix
Original file line number Diff line number Diff line change
@@ -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
../.
];

Expand All @@ -26,5 +25,7 @@
LABEL="pulseaudio_end"
'';

throttled.enable = lib.mkDefault true;
};
}
3 changes: 2 additions & 1 deletion lenovo/thinkpad/x1-extreme/gen2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ with lib;
{
imports = [
../.
../../../../common/pc/laptop/cpu-throttling-bug.nix
];

# Fixes an issue with incorrect battery reporting. See
Expand Down Expand Up @@ -44,4 +43,6 @@ with lib;
videoDrivers = [ "intel" ];
})
];

services.throttled.enable = lib.mkDefault true;
}
5 changes: 3 additions & 2 deletions lenovo/thinkpad/x1/6th-gen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 1ea7efa

Please sign in to comment.