From 1fb1fe06fa58e6ad85d7d801021e1fa1cbee54b8 Mon Sep 17 00:00:00 2001 From: Nikkuss Date: Tue, 21 Apr 2026 11:55:48 +0400 Subject: [PATCH] power tuning: s2idle, usb runtime pm, blacklist qcom_battmgr + qcrypto --- boot.nix | 6 ++++++ hardware.nix | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/boot.nix b/boot.nix index 49ed0a4..ddb6b2f 100644 --- a/boot.nix +++ b/boot.nix @@ -62,6 +62,12 @@ "clk_ignore_unused" "pd_ignore_unused" "iomem=relaxed" + "mem_sleep_default=s2idle" + ]; + + blacklistedKernelModules = [ + "qcom_battmgr" + "qcrypto" ]; supportedFilesystems = { diff --git a/hardware.nix b/hardware.nix index 60a1208..cd636a7 100644 --- a/hardware.nix +++ b/hardware.nix @@ -15,6 +15,11 @@ in config = { nixpkgs.hostPlatform = "aarch64-linux"; + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="platform", DRIVER=="dwc3-qcom-legacy", ATTR{power/control}="auto" + ACTION=="add", SUBSYSTEM=="usb", ATTR{power/control}="auto" + ''; + hardware = { enableRedistributableFirmware = lib.mkForce true; enableAllFirmware = lib.mkForce true;