From 5e9934fa077fb326001972bc4754bf45b33180eb Mon Sep 17 00:00:00 2001 From: paki23 Date: Sat, 30 Jul 2022 18:21:03 +0200 Subject: [PATCH] pstate:init fixup pstate --- common/cpu/amd/pstate.nix | 9 +++++++++ flake.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 common/cpu/amd/pstate.nix diff --git a/common/cpu/amd/pstate.nix b/common/cpu/amd/pstate.nix new file mode 100644 index 0000000..35d8be0 --- /dev/null +++ b/common/cpu/amd/pstate.nix @@ -0,0 +1,9 @@ +{ lib, config, ... }: { + #Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html + + imports = [ ./. ]; + boot = lib.mkIf (!lib.versionOlder config.boot.kernelPackages.kernel.version "5.17") { + kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ]; + kernelModules = [ "amd-pstate" ]; + }; +} diff --git a/flake.nix b/flake.nix index 7337b68..7f02785 100644 --- a/flake.nix +++ b/flake.nix @@ -131,6 +131,7 @@ tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4; common-cpu-amd = import ./common/cpu/amd; + common-cpu-amd-pstate = import ./common/cpu/amd/pstate.nix; common-cpu-intel = import ./common/cpu/intel; common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix; common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;