From 03bfc64552df4599b47df22eddb8f555044d62ba Mon Sep 17 00:00:00 2001 From: VECTORG99 Date: Thu, 20 Aug 2026 17:09:52 -0400 Subject: [PATCH] udev: add rule to keep USB HID input devices out of runtime PM --- README.md | 1 + usr/lib/udev/rules.d/75-usb-hid-pm.rules | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 usr/lib/udev/rules.d/75-usb-hid-pm.rules diff --git a/README.md b/README.md index 0f1fd95..5c3230f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Udev rules automatically apply system configurations upon device detection or st * **I/O Scheduler Assignment**: Dynamically assigns I/O schedulers: `bfq` for HDDs, `mq-deadline` for SATA SSDs and eMMC, and `kyber` for NVMe SSDs. * **HDD Performance Tuning**: Applies `hdparm` settings (`-B 254 -S 0`) to rotational ATA disks. * **NVIDIA Runtime Power Management**: Enables/disables NVIDIA GPU runtime power management on driver bind/unbind events. +* **USB HID Runtime Power Management**: Disables USB runtime PM (autosuspend) for external, removable HID input devices to reduce input latency. * **CPU DMA Latency Access**: Sets permissions for the `cpu_dma_latency` device. * **Wireless Regulatory Domain**: Triggers setting of the wireless regulatory domain when a Wi-Fi device is added. diff --git a/usr/lib/udev/rules.d/75-usb-hid-pm.rules b/usr/lib/udev/rules.d/75-usb-hid-pm.rules new file mode 100644 index 0000000..af5fe89 --- /dev/null +++ b/usr/lib/udev/rules.d/75-usb-hid-pm.rules @@ -0,0 +1,4 @@ +# Disable USB runtime PM (autosuspend) for external removable HID input devices +ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", \ + ATTRS{removable}=="removable", TEST=="../power/control", \ + ATTR{../power/control}="on" \ No newline at end of file