summaryrefslogtreecommitdiffstats
path: root/lass/1systems/aergia/physical.nix
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-02-06 12:49:09 +0100
committerlassulus <git@lassul.us>2023-02-08 15:01:04 +0100
commit278e6c354a7f5b19465641144784c5e22a01c4db (patch)
tree93093ce5af545e28763752911ca493be861f226d /lass/1systems/aergia/physical.nix
parent6c982d0487ae438b3766a6cf8a9c96fa2a2398a4 (diff)
l aergia.r: add more power managment stuff
Diffstat (limited to 'lass/1systems/aergia/physical.nix')
-rw-r--r--lass/1systems/aergia/physical.nix49
1 files changed, 43 insertions, 6 deletions
diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix
index de5f7540e..6200bbfc5 100644
--- a/lass/1systems/aergia/physical.nix
+++ b/lass/1systems/aergia/physical.nix
@@ -20,15 +20,37 @@
boot.kernelParams = [
# Enable energy savings during sleep
"mem_sleep_default=deep"
- "initcall_blacklist=acpi_cpufreq_init"
+
+ "amd_pstate=passive"
# for ryzenadj -i
"iomem=relaxed"
];
- # 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.
- boot.kernelModules = [ "amd-pstate" "kvm-amd" ];
+ boot.kernelModules = [
+ # 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.
+ "amd-pstate"
+ "kvm-amd"
+
+ # needed for zenstates
+ "msr"
+
+ # zenpower
+ "zenpower"
+ ];
+
+ boot.extraModulePackages = [
+ (config.boot.kernelPackages.zenpower.overrideAttrs (old: {
+ src = pkgs.fetchFromGitea {
+ domain = "git.exozy.me";
+ owner = "a";
+ repo = "zenpower3";
+ rev = "c176fdb0d5bcba6ba2aba99ea36812e40f47751f";
+ hash = "sha256-d2WH8Zv7F0phZmEKcDiaak9On+Mo9bAFhMulT/N5FWI=";
+ };
+ }))
+ ];
# hardware.cpu.amd.updateMicrocode = true;
@@ -36,7 +58,16 @@
"amdgpu"
];
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "nvme"
+ "thunderbolt"
+ "xhci_pci"
+ "usbhid"
+ ];
+
+ boot.initrd.kernelModules = [
+ "amdgpu"
+ ];
environment.systemPackages = [
pkgs.vulkan-tools
@@ -54,7 +85,13 @@
hardware.video.hidpi.enable = lib.mkDefault true;
# corectrl
- programs.corectrl.enable = true;
+ programs.corectrl = {
+ enable = true;
+ gpuOverclock = {
+ enable = true;
+ ppfeaturemask = "0xffffffff";
+ };
+ };
users.users.mainUser.extraGroups = [ "corectrl" ];
# use newer ryzenadj