How to stop USB autosuspend on ubuntu

For Ubuntu and Debian, usbcore is compiled in the kernel, so create entries on /etc/modprobe.d will NOT work: we need to change the kernel boot parameters.

Edit the /etc/default/grub file and change the GRUB_CMDLINE_LINUX_DEFAULT line to add the usbcore.autosuspend=-1 option:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"

Note that quit splash were already present options. So keep other options you have too.

After save the file, update grub:

sudo update-grub

And reboot.

Now check autosuspend value:

cat /sys/module/usbcore/parameters/autosuspend

And it should display -1.

In the kernel documentation is stated that someday in the future this param will change to autosuspend_delay_ms (instead of autosuspend).

猜你喜欢

转载自blog.csdn.net/alex_mianmian/article/details/83616095