Skip to content

Instantly share code, notes, and snippets.

@hackjutsu
Last active December 26, 2023 03:48
Show Gist options
  • Save hackjutsu/f4f3cea580c7ce822faff64ab25ca69a to your computer and use it in GitHub Desktop.
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.
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.
@hackjutsu
Copy link
Author

hackjutsu commented Dec 26, 2023

In my case, the USB devices are properly powered when connected to a headless linux server (together with a temp monitor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment