1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-15 07:29:41 +01:00

framework: Fix kernel version comparison for preventWakeOnAC

The comparison previously used the default kernel's version instead of the selected kernel's version.
This commit is contained in:
Miklós Tóth (Mike) 2024-11-10 18:13:24 +01:00
parent e1cc1f6483
commit f3049523c0
No known key found for this signature in database

View file

@ -27,7 +27,7 @@ in
config = { config = {
# Workaround applied upstream in Linux >=6.7 (on BIOS 03.03) # Workaround applied upstream in Linux >=6.7 (on BIOS 03.03)
# https://github.com/torvalds/linux/commit/a55bdad5dfd1efd4ed9ffe518897a21ca8e4e193 # 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: # 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 # 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" ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"