The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 10,340β€…    Votes:  9β€…    βœ… Solution
Tags: usb   18.04  
Link: πŸ” See Original Answer on Ask Ubuntu πŸ”—

URL: https://askubuntu.com/q/1056420
Title: USB ports not working after resume from sleep on Ubuntu 18.04
ID: /2018/07/15/USB-ports-not-working-after-resume-from-sleep-on-Ubuntu-18.04
Created: July 15, 2018    Edited:  December 19, 2020
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


This answer from Unix & Linux Stack Exchange (slightly enhanced here) has a solution.

  1. Edit /etc/default/grub and find the line containing LINUX_DEFAULT. Change the line from:
   GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

   GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"
  1. Save the file, run sudo update-grub, and reboot.

  2. After using this, you will find:

   $ cat /sys/module/usbcore/parameters/autosuspend
   -1

The default value is 2. The kernel parameter changes this value.

Setting the kernel parameter helped me. Now my mouse works again when resuming from suspend.

Suggestion: When USB devices don’t work after suspend, you can also reload the driver using the following commands as root:

modprobe -r uhci_hcd
modprobe uhci_hcd

and/or:

modprobe -r ehci_hcd
modprobe ehci_hcd
⇧ Force Xorg to use CPU not GPU how to tell GRUB to show the user preferred names of OS'es. Ubuntu 18.04  β‡©