From f3049523c09dbcffdebb281a3bbaec33fec60089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th=20=28Mike=29?= Date: Sun, 10 Nov 2024 18:13:24 +0100 Subject: [PATCH] framework: Fix kernel version comparison for preventWakeOnAC The comparison previously used the default kernel's version instead of the selected kernel's version. --- framework/13-inch/7040-amd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index 73aad22eb..6841d68b2 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -27,7 +27,7 @@ in config = { # Workaround applied upstream in Linux >=6.7 (on BIOS 03.03) # https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193 - services.udev.extraRules = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7" && cfg.preventWakeOnAC) '' + services.udev.extraRules = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7" && cfg.preventWakeOnAC) '' # Prevent wake when plugging in AC during suspend. Trade-off: keyboard wake disabled. See: # https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128/45 ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"