How can we disable USB autosuspend on Ubuntu 18.04 for all USB devices and/or specific ones?

Previous questions on this subject are outdated (How can I disable usb-autosuspend for a specific device? and How to disable auto power off of usb devices like usb mouse?)

Edit: This question is completely unrelated to Two USB ports stopped working because my USB ports have not stopped working completely, but apparently and momentarily suspended for just a few (mili)seconds


This reference seems to be authoritative on disabling usb autosuspend.

Although the USB autosuspend is a feature designed to preserve battery life, its' 18.04 default is "enabled", whether or not the device Ubuntu is being installed on even has a battery.

Further, in order for autosuspend to be more help than harm, it appears that the USB device's driver needs to support autosuspend. Hence all the posts- yours' included- seeking to disable the "feature".

In 18.04 on my device, I scripted disabling autosuspend persistently in /etc/default/grub like so:

sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/&usbcore.autosuspend=-1 /' /etc/default/grub


systemctl reboot

The sed expression just prepends "usbcore.autosuspend=-1" with a trailing space after the initial quote mark to ensure it always matches whatever your particular GRUB_CMDLINE_LINUX_DEFAULT options look like.

If you execute cat /sys/module/usbcore/parameters/autosuspend after a reboot, you'll remark the "-1" preference (disabled) is retained.

Anyhoo, hope this helped you out-

  • This simply did not work for me. My USB device (Yamaha eletric piano) still quits after about 30 seconds. The referenced article, while informative, does not make clear how to disable autosuspend altogether. – Paul A. Oct 24 at 13:07
  • @PaulA. I’m using the above solution to disable autosuspend on a Linux router running 18.04. Are you running 18.04? – F1Linux Oct 24 at 13:37
  • I'm running 18.04, but with the 19,04 backports. Where is the description of the settings for usbcore.autosuspend? The referenced authoritative writeup is from 2013. – Paul A. Oct 24 at 14:49
  • @PaulA.Idea: If you've followed my instructions above, to exclude there's nothing funky related to the hardware itself, I'd suggest connecting a USB hard drive to it and seeing if that behaves correctly (doesn't auto-suspend). Also, try the Yamaha and the external hard drive on different USB ports on your Linux host to ensure the port itself is correct and has no faults. Give that a go and let me know the results bud- – F1Linux Oct 24 at 18:35
  • 1
    The fact that the piano works fine in Windows 10 (same machine) and recovers briefly after a reboot certainly indicates that the fault does not lie with the piano. I believe that autosuspend can be done selectively -- which might have something to do with the fact that the USB hard drive doesn't autosuspend but the piano apparently does. I also read somewhere that enablement of autosuspend was only recently set to default to enabled. – Paul A. Oct 26 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.