Merge pull request #438 from pasqui23/pstate

Adding amd pstate handling
This commit is contained in:
Jörg Thalheim 2022-08-01 13:14:34 +01:00 committed by GitHub
commit ea3efc80f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:
{
imports = [
../../../common/cpu/amd
../../../common/cpu/amd/pstate.nix
../../../common/gpu/nvidia.nix
../../../common/pc/laptop
../../../common/pc/ssd

10
common/cpu/amd/pstate.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib, config, ... }: {
# Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html
# On recent AMD CPUs this can be more energy efficient.
imports = [ ./. ];
boot = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.17") {
kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ];
kernelModules = [ "amd-pstate" ];
};
}

View file

@ -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;