Skip to content

Commit

Permalink
Enable wakeup for USB input devices which connected via USB Switcher/…
Browse files Browse the repository at this point in the history
…KVM (#896)

Fixes GH-894
  • Loading branch information
kachick authored Oct 28, 2024
1 parent e1e11f5 commit ed4bc89
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion nixos/hosts/algae/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ ... }:
{ lib, ... }:

{
networking.hostName = "algae";
Expand All @@ -21,4 +21,20 @@
};

services.xserver.videoDrivers = [ "amdgpu" ];

# Required to reboot if you want to apply changes
# Prevent GH-894
# https://askubuntu.com/a/1446653
services.udev.extraRules = lib.mkAfter ''
# Enable USB port 3 wakeup
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="2109", ATTRS{idProduct}=="2817", ATTRS{busnum}=="3", ATTR{power/wakeup}="enabled"
# Disable USB Switcher wakeup
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="5411", ATTR{power/wakeup}="disabled"
# Enable trackball - "Kensington SlimBlade Pro Trackball(Wired)" wakeup
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="047d", ATTRS{idProduct}=="80d7", ATTR{power/wakeup}="enabled"
# Enable keyboard - "REALFORCE 87 US" wakeup
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0853", ATTRS{idProduct}=="0146", ATTR{power/wakeup}="enabled"
# Enable keyboard - "ThinkPad Compact USB Keyboard with TrackPoint" wakeup
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6047", ATTR{power/wakeup}="enabled"
'';
}

0 comments on commit ed4bc89

Please sign in to comment.