summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-01-30 00:27:34 +0100
committerlassulus <git@lassul.us>2023-01-30 00:27:34 +0100
commit2adf9ebfcc9ba12c75eb812843c4daa32d5f07d4 (patch)
treedf00265c77af9389e006baea0415c70c871321ab
parente01e296e5d34aa74a4d6edf8203b3dd015a94112 (diff)
l aergia.r: finetune hardware
-rw-r--r--lass/1systems/aergia/physical.nix40
1 files changed, 36 insertions, 4 deletions
diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix
index 800202396..df310e578 100644
--- a/lass/1systems/aergia/physical.nix
+++ b/lass/1systems/aergia/physical.nix
@@ -15,10 +15,20 @@
efiInstallAsRemovable = true;
};
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+
+ boot.kernelParams = [
+ # Enable energy savings during sleep
+ "mem_sleep_default=deep"
+ "initcall_blacklist=acpi_cpufreq_init"
+
+ # 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 = [ "kvm-amd" ];
+ boot.kernelModules = [ "amd-pstate" "kvm-amd" ];
# hardware.cpu.amd.updateMicrocode = true;
@@ -28,13 +38,35 @@
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
- services.logind.lidSwitch = "ignore";
- services.logind.lidSwitchDocked = "ignore";
-
environment.systemPackages = [
+ pkgs.vulkan-tools
pkgs.ryzenadj
+ (pkgs.writers.writeDashBin "set_tdp" ''
+ set -efux
+ watt=$1
+ value=$(( $watt * 1000 ))
+ ${pkgs.ryzenadj}/bin/ryzenadj --stapm-limit="$value" --fast-limit="$value" --slow-limit="$value"
+ '')
];
# textsize
services.xserver.dpi = 200;
+ hardware.video.hidpi.enable = lib.mkDefault true;
+
+ # corectrl
+ programs.corectrl.enable = true;
+ users.users.mainUser.extraGroups = [ "corectrl" ];
+
+ # use newer ryzenadj
+ nixpkgs.config.packageOverrides = super: {
+ ryzenadj = super.ryzenadj.overrideAttrs (old: {
+ version = "unstable-2023-01-15";
+ src = pkgs.fetchFromGitHub {
+ owner = "FlyGoat";
+ repo = "RyzenAdj";
+ rev = "1052fb52b2c0e23ac4cd868c4e74d4a9510be57c"; # unstable on 2023-01-15
+ sha256 = "sha256-/IxkbQ1XrBrBVrsR4EdV6cbrFr1m+lGwz+rYBqxYG1k=";
+ };
+ });
+ };
}