From fd5196a2ceb64214fac18ee157493fdb157b539a Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 3 May 2025 04:29:06 +0300 Subject: [PATCH] udev: Disabled USB autosuspend for PiKVM devices --- configs/os/udev/common.rules | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/configs/os/udev/common.rules b/configs/os/udev/common.rules index 5abb1aa7..97525df5 100644 --- a/configs/os/udev/common.rules +++ b/configs/os/udev/common.rules @@ -1,4 +1,15 @@ # Here are described some bindings for PiKVM devices. # Do not edit this file. -KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="eda3", SYMLINK+="kvmd-hid-bridge" -KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="1080", SYMLINK+="kvmd-switch" + +ACTION!="remove", KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="eda3", SYMLINK+="kvmd-hid-bridge" +ACTION!="remove", KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="1080", SYMLINK+="kvmd-switch" + +# Disable USB autosuspend for critical devices +ACTION!="remove", SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="eda3", GOTO="kvmd-usb" +ACTION!="remove", SUBSYSTEM=="usb", ATTR{idVendor}=="2e8a", ATTR{idProduct}=="1080", GOTO="kvmd-usb" +GOTO="end" + +LABEL="kvmd-usb" +ATTR{power/control}="on", ATTR{power/autosuspend_delay_ms}="-1" + +LABEL="end"