l aergia.r: add more power managment stuff

This commit is contained in:
lassulus 2023-02-06 12:49:09 +01:00
parent 6c982d0487
commit 278e6c354a

View File

@ -20,15 +20,37 @@
boot.kernelParams = [ boot.kernelParams = [
# Enable energy savings during sleep # Enable energy savings during sleep
"mem_sleep_default=deep" "mem_sleep_default=deep"
"initcall_blacklist=acpi_cpufreq_init"
"amd_pstate=passive"
# for ryzenadj -i # for ryzenadj -i
"iomem=relaxed" "iomem=relaxed"
]; ];
boot.kernelModules = [
# Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html # 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. # On recent AMD CPUs this can be more energy efficient.
boot.kernelModules = [ "amd-pstate" "kvm-amd" ]; "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; # hardware.cpu.amd.updateMicrocode = true;
@ -36,7 +58,16 @@
"amdgpu" "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 = [ environment.systemPackages = [
pkgs.vulkan-tools pkgs.vulkan-tools
@ -54,7 +85,13 @@
hardware.video.hidpi.enable = lib.mkDefault true; hardware.video.hidpi.enable = lib.mkDefault true;
# corectrl # corectrl
programs.corectrl.enable = true; programs.corectrl = {
enable = true;
gpuOverclock = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
users.users.mainUser.extraGroups = [ "corectrl" ]; users.users.mainUser.extraGroups = [ "corectrl" ];
# use newer ryzenadj # use newer ryzenadj