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 = [
# 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