From 8dc7bf18d34e2b55436055e39cfd2fac98558d5b Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Mon, 23 Sep 2024 11:48:19 +0530 Subject: [PATCH] chore: remove system76-scheduler and fix resume * system76-scheduler was unused. Or it did not really make much of a difference over the default scheduler. * added `iommu=soft` to kernel param to make the ssd work fine after suspend. This might be related to the pcie_aspm policy we had set before. I need to test if removing the aspm policy has fixed this issue. Signed-off-by: Chinmay D. Pai --- systems/x86_64-linux/thonkpad/default.nix | 3 --- systems/x86_64-linux/thonkpad/hardware.nix | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/systems/x86_64-linux/thonkpad/default.nix b/systems/x86_64-linux/thonkpad/default.nix index 1fed54a..f6abc5a 100644 --- a/systems/x86_64-linux/thonkpad/default.nix +++ b/systems/x86_64-linux/thonkpad/default.nix @@ -25,11 +25,8 @@ fileSystems = ["/"]; }; - services.system76-scheduler.enable = true; - services.system76-scheduler.settings.cfsProfiles.enable = true; # Power management, enable powertop and thermald. powerManagement.powertop.enable = true; - powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil"; services.thermald.enable = true; # TODO: remove, temporary for mongoDB build diff --git a/systems/x86_64-linux/thonkpad/hardware.nix b/systems/x86_64-linux/thonkpad/hardware.nix index 394f63d..fa94c3c 100644 --- a/systems/x86_64-linux/thonkpad/hardware.nix +++ b/systems/x86_64-linux/thonkpad/hardware.nix @@ -20,13 +20,19 @@ "iwlwifi" "xe" ]; - kernelPackages = lib.mkDefault pkgs.linuxPackages_testing; + kernelPackages = lib.mkForce pkgs.linuxPackages_testing; kernelParams = [ # NixOS produces many wakeups per second, which is bad for battery life. # This disables the timer tick on the last 7 cores. "nohz_full=14-21" "i915.force_probe=!7d55" "xe.force_probe=7d55" + "initcall_blacklist=simpledrm_platform_driver_init" + # This solves an issue with resume after suspend where the SSD goes into + # a read-only state. We trust some random, obscure Arch wiki article over + # actually trying to figure out why it might be so. + # ref: https://wiki.archlinux.org/title/Solid_state_drive/NVMe#Controller_failure_due_to_broken_suspend_support + "iommu=soft" # "resume_offset=2465529" ]; # resumeDevice = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";