mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Hardware/Intel] Add throttled and thermald to improve performance and reduce thermal issues
This commit is contained in:
parent
127117d52e
commit
c6008b5387
1 changed files with 13 additions and 0 deletions
|
|
@ -2,10 +2,23 @@
|
|||
with lib;
|
||||
let
|
||||
generalCfg = config.aviallon.general;
|
||||
throttledService = "lenovo_fix";
|
||||
in {
|
||||
config = mkIf (generalCfg.cpuVendor == "intel") {
|
||||
aviallon.boot.cmdline = {
|
||||
"intel_pstate" = "passive";
|
||||
};
|
||||
|
||||
services.throttled.enable = generalCfg.unsafeOptimizations;
|
||||
services.thermald.enable = !generalCfg.unsafeOptimizations;
|
||||
|
||||
systemd.services.${throttledService} = {
|
||||
bindsTo = [ "ac-power.target" ];
|
||||
conflicts = [ "thermald.service" ];
|
||||
};
|
||||
|
||||
systemd.services.thermald = {
|
||||
wantedBy = [ "battery-power.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue