Increase power saving measures

This commit is contained in:
coolneng 2023-01-19 12:52:49 +01:00
parent 9034cd6f3c
commit e9bcb7bfdf
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 14 additions and 2 deletions

View File

@ -12,9 +12,12 @@ with pkgs;
"workqueue.power_efficient=y"
"nohibernate"
"ipv6.disable=1"
"ahci.mobile_lpm_policy=3"
"pcie_aspm=force"
"nmi_watchdog=0"
];
kernelModules = [ "i915" ];
blacklistedKernelModules = [ "btusb" ];
blacklistedKernelModules = [ "btusb" "bluetooth" ];
supportedFilesystems = [ "zfs" ];
zfs = {
requestEncryptionCredentials = true;

View File

@ -12,9 +12,11 @@
};
};
# Suspend when the battery is critical
# Suspend when the battery is critical and autosuspend USB and PCI
services.udev.extraRules = ''
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{model_name}=="01AV405", ATTR{capacity}=="[0-5]", RUN+="${config.systemd.package}/bin/systemctl suspend -i"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="pci", TEST=="power/control", ATTR{power/control}="auto"
'';
# Undervolt CPU and GPU
@ -26,4 +28,11 @@
# Prevent overheating of the CPU
services.thermald.enable = true;
# Provide power management support to programs
services.upower.enable = true;
# Turn off keyboard backlight when unused
services.tp-auto-kbbl.enable = true;
}