Skip to content

Instantly share code, notes, and snippets.

@thiagozs
Created July 10, 2024 13:42
Show Gist options
  • Save thiagozs/e608e3a111f64322d6246b0df83ec699 to your computer and use it in GitHub Desktop.
Save thiagozs/e608e3a111f64322d6246b0df83ec699 to your computer and use it in GitHub Desktop.
Ubuntu disable USB autosuspend

Disabling USB Auto-Suspend on Ubuntu

These days Linux supports a lot of devices. However, occasionally you will find a device that works but only for a while, requiring a reboot to work again. This is often due to the device itself not behaving according to the USB standard, and that's more often than not caused by misbehaving USB suspend.

The proper way of fixing this would be either a workaround in the driver or, God forbid, a fix in the device's firmware. But quite often nobody does anything, so what's left is to do the improper. And the easiest improper fix is to disable USB autosuspend.

For the command line, just add usbcore.autosuspend=-1 to GRUB_CMDLINE_LINUX_DEFAULT:

sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[a-z ]*/& usbcore.autosuspend=-1/' /etc/default/grub
sudo update-grub2
reboot

Once the system is up, you can check that the value is indeed -1 (disabled).

cat /sys/module/usbcore/parameters/autosuspend
@nukhes
Copy link

nukhes commented Jul 9, 2025

thank you, with this i can use my usb bluetooth adapter without issues in ubuntu

@willemijns
Copy link

willemijns commented Jul 23, 2025

FYI some USB chipsets hardware can be of poor quality after a while and stops for random reasons after XX minutes.

  • Internal bad solders chip at long-term ?
  • Internal heating chip troubles so the device stops = "fuse itself" to work by security ?
  • Bad USB contacts at long-term ?

Do not forget this side effect if your USB mouse/HD/keyboard disconnects itself after a certain amount of minutes of utilization !!!

It was my case and autosusupend kernel changes does not help...

Do not spend so much times on the internet to find alternates/additionals answers !

===> Go to rubbish was my only solution.

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