From 0f3a2e0e52f2701c0327922fbe988a60115ca90c Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sun, 25 Aug 2024 20:15:26 +0200 Subject: [PATCH] lifebook: fix s0 suspend --- hosts/lifebook/default.nix | 3 +-- hosts/lifebook/hardware-configuration.nix | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hosts/lifebook/default.nix b/hosts/lifebook/default.nix index 4651557..c589441 100644 --- a/hosts/lifebook/default.nix +++ b/hosts/lifebook/default.nix @@ -66,8 +66,7 @@ }; services = { - logind.lidSwitch = "hibernate"; # Laptop does not go to sleep when lid is closed - #auto-cpufreq.enable = true; + logind.lidSwitch = "suspend"; # Laptop does not go to sleep when lid is closed blueman.enable = true; printing = { # Printing and drivers for TS5300 enable = true; diff --git a/hosts/lifebook/hardware-configuration.nix b/hosts/lifebook/hardware-configuration.nix index 13d3711..2c34d2f 100644 --- a/hosts/lifebook/hardware-configuration.nix +++ b/hosts/lifebook/hardware-configuration.nix @@ -42,6 +42,12 @@ zramSwap.enable = true; + powerManagement = { + powerDownCommands = "rmmod intel_lpss_pci"; + resumeCommands = "modprobe intel_lpss_pci"; + }; + + services = { btrfs.autoScrub = { enable = true;