diff options
Diffstat (limited to 'modules/nixos-hardware/common/pc')
-rw-r--r-- | modules/nixos-hardware/common/pc/laptop/cpu-throttling-bug.nix | 38 | ||||
-rw-r--r-- | modules/nixos-hardware/common/pc/ssd/default.nix | 2 |
2 files changed, 2 insertions, 38 deletions
diff --git a/modules/nixos-hardware/common/pc/laptop/cpu-throttling-bug.nix b/modules/nixos-hardware/common/pc/laptop/cpu-throttling-bug.nix deleted file mode 100644 index a44bb7225d0f..000000000000 --- a/modules/nixos-hardware/common/pc/laptop/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/modules/nixos-hardware/common/pc/ssd/default.nix b/modules/nixos-hardware/common/pc/ssd/default.nix index af0b49568cd1..00922e649938 100644 --- a/modules/nixos-hardware/common/pc/ssd/default.nix +++ b/modules/nixos-hardware/common/pc/ssd/default.nix @@ -4,4 +4,6 @@ boot.kernel.sysctl = { "vm.swappiness" = lib.mkDefault 1; }; + + services.fstrim.enable = lib.mkDefault true; } |