From a5820a0b3105f9ea66d79ee4807211cfe2c9874f Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Sun, 29 Mar 2026 02:00:04 +0100 Subject: [PATCH] mmio added to tdp controller --- config/hosts/aspects/doloro-laptop/home.nix | 2 +- config/hosts/aspects/doloro-laptop/host.nix | 8 ++++++++ config/modules/power-management/tdp.nix | 18 ++++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/config/hosts/aspects/doloro-laptop/home.nix b/config/hosts/aspects/doloro-laptop/home.nix index b528240..8886994 100644 --- a/config/hosts/aspects/doloro-laptop/home.nix +++ b/config/hosts/aspects/doloro-laptop/home.nix @@ -22,7 +22,7 @@ modules.quickshell modules.lavd modules.podman - modules.openvivo + # modules.openvivo ]; nixos = { config, pkgs, ... }: diff --git a/config/hosts/aspects/doloro-laptop/host.nix b/config/hosts/aspects/doloro-laptop/host.nix index 8fd8c4d..d0d7faa 100644 --- a/config/hosts/aspects/doloro-laptop/host.nix +++ b/config/hosts/aspects/doloro-laptop/host.nix @@ -19,12 +19,20 @@ long-term = 13; short-term = 7; }; + mmio = { + long-term = 10; + short-term = 7; + }; }; ac = { cpu = { long-term = 120; short-term = 120; }; + mmio = { + long-term = 40; + short-term = 20; + }; }; }) ]; diff --git a/config/modules/power-management/tdp.nix b/config/modules/power-management/tdp.nix index e4232dc..baa2ef9 100644 --- a/config/modules/power-management/tdp.nix +++ b/config/modules/power-management/tdp.nix @@ -8,16 +8,30 @@ ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${ toString (settings.batt.cpu.long-term * 1000000) } - ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${ + ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 1 -l ${ toString (settings.batt.cpu.short-term * 1000000) + } + + ${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 0 -l ${ + toString (settings.batt.mmio.long-term * 1000000) + } + ${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 1 -l ${ + toString (settings.batt.mmio.short-term * 1000000) } ''; ac-tdp = pkgs.writeShellScript "ac-cpu-tdp" '' ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${ toString (settings.ac.cpu.long-term * 1000000) } - ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 0 -l ${ + ${pkgs.powercap}/bin/powercap-set intel-rapl -z 0 -c 1 -l ${ toString (settings.ac.cpu.short-term * 1000000) + } + + ${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 0 -l ${ + toString (settings.batt.mmio.long-term * 1000000) + } + ${pkgs.powercap}/bin/powercap-set intel-rapl-mmio -z 0 -c 1 -l ${ + toString (settings.batt.mmio.short-term * 1000000) } ''; in