mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-26 21:09:42 +01:00
Merge pull request #438 from pasqui23/pstate
Adding amd pstate handling
This commit is contained in:
commit
ea3efc80f8
3 changed files with 12 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../../common/cpu/amd
|
../../../common/cpu/amd/pstate.nix
|
||||||
../../../common/gpu/nvidia.nix
|
../../../common/gpu/nvidia.nix
|
||||||
../../../common/pc/laptop
|
../../../common/pc/laptop
|
||||||
../../../common/pc/ssd
|
../../../common/pc/ssd
|
||||||
|
|
10
common/cpu/amd/pstate.nix
Normal file
10
common/cpu/amd/pstate.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -131,6 +131,7 @@
|
||||||
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
|
tuxedo-infinitybook-v4 = import ./tuxedo/infinitybook/v4;
|
||||||
|
|
||||||
common-cpu-amd = import ./common/cpu/amd;
|
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 = import ./common/cpu/intel;
|
||||||
common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix;
|
common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix;
|
||||||
common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;
|
common-cpu-intel-kaby-lake = import ./common/cpu/intel/kaby-lake;
|
||||||
|
|
Loading…
Reference in a new issue