Tweak performance and battery optimisation settings

Based on https://github.com/MatthewCroughan/nixcfg and other sources.
This commit is contained in:
Oliver Davies 2024-06-09 20:51:23 +01:00
parent 00d9a75c3e
commit a87750cd30
2 changed files with 26 additions and 2 deletions

View file

@ -26,6 +26,23 @@ in {
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
services.thermald.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
PCIE_ASPM_ON_BAT = "powersupersave";
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_MAX_PERF_ON_AC = "100";
CPU_MAX_PERF_ON_BAT = "30";
STOP_CHARGE_THRESH_BAT1 = "95";
STOP_CHARGE_THRESH_BAT0 = "95";
};
};
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';

View file

@ -5,10 +5,17 @@
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "i8042.reset" ];
boot.kernelParams = [
"i915.modeset=1"
"i915.fastboot=1"
"i915.enable_guc=2"
"i915.enable_psr=1"
"i915.enable_fbc=1"
"i915.enable_dc=2"
];
boot.extraModulePackages = [ ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_zen;
hardware.enableAllFirmware = true;
fileSystems."/" = {