From 1ebe2d8a34fa4cbc2f88decc2fd054a16067152c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 13 Jul 2026 18:36:22 -0300 Subject: [PATCH] monolith: fix suspend wakeup from kb, disable from mouse --- hosts/monolith/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 0dbc10a..ba480d6 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -120,9 +120,14 @@ in virtualisation.virtualbox.host.enable = true; services.udev.extraRules = '' + # Arm all USB root hubs (vendor 1d6b) so any USB device can wake the system. + # Wakeup only fires if the device on the end also has wakeup enabled, so we still + # disable it individually for devices that must NOT wake the system (see below). + ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="1d6b" ATTR{power/wakeup}="enabled" # Fix broken suspend with Logitech USB dongle + # The mouse/mousepad receiver wakes the system right after suspend, so disable its wakeup. # `lsusb | grep Logitech` will return "vendor:product" - ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled" + ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c53a" ATTR{power/wakeup}="disabled" # Force all disks to use kyber scheduler # For some reason "noop" is used by default which is kinda bad when io is saturated ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="kyber"