Last active
December 26, 2023 03:48
-
-
Save hackjutsu/f4f3cea580c7ce822faff64ab25ca69a to your computer and use it in GitHub Desktop.
[Disable USB power auto suspension] This gist disables the default auto usb power suspension in modern #Ubuntu system. This makes sure the USB mouse and keyboard can be recognized when (re)plugged in under various circunstances.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vi /etc/udev/rules.d/92-usb-input-no-powersave.rules | |
# with content: ACTION=="add", SUBSYSTEM=="input", TEST=="power/control", ATTR{power/control}="on" | |
# reboot | |
# how this works | |
# When you connect an input device, such as a keyboard or mouse, to your system, udev triggers various rules. | |
# If the connected device is recognized as part of the input subsystem and has a power/control attribute, this | |
# rule will set that attribute to "on", effectively disabling USB autosuspend for that device. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my case, the USB devices are properly powered when connected to a headless linux server (together with a temp monitor).