usb ports not working after laptop opened

Asked by James Cobban on 2017-10-10

When I open my laptop, running Ubuntu 16.04, if the laptop is not plugged into a power source all of the USB ports are non-functional. Most critically my mouse doesn't work, and does not show up in the output of lsusb. If I pull the plug out and plug it back in again it is not recognized. Is there any way I can give the USB subsystem a kick in the rear end to get it to restart and connect to the plugged in USB devices? Should I report this as a bug? If so what information should I collect when it occurs?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Last query:
2017-11-02
Last reply:
2017-11-02

Does the system have a make and model?

James Cobban (7-webmaster) said : #2

It is a Dell Vostro 3555 with the latest microcode:

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 18
Model: 1
Model name: AMD A8-3520M APU with Radeon(tm) HD Graphics
Stepping: 0
CPU MHz: 1200.000
CPU max MHz: 1600.0000
CPU min MHz: 800.0000
BogoMIPS: 3194.17
Virtualization: AMD-V
L1d cache: 64K
L1i cache: 64K
L2 cache: 1024K
NUMA node0 CPU(s): 0-3
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall arat npt lbrv svm_lock nrip_save pausefilter

$lshw
H/W path Device Class Description
=======================================================
                             system Vostro 3555 (To be filled by O.E.M.)
/0 bus 0K89MF
/0/0 memory 64KiB BIOS
/0/34 processor AMD A8-3520M APU with Radeon(tm) HD Graphics
/0/34/1c memory 4MiB L2 cache
/0/34/1b memory 512KiB L1 cache
/0/10 memory 6GiB System Memory
/0/10/0 memory 4GiB DIMM DDR3 Synchronous 1333 MHz (0.8 ns)
/0/10/1 memory 2GiB DIMM DDR3 Synchronous 1333 MHz (0.8 ns)
/0/100 bridge Family 12h Processor Root Complex
/0/100/1 display BeaverCreek [Radeon HD 6620G]
/0/100/1.1 multimedia BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]
/0/100/4 bridge Family 12h Processor Root Port
/0/100/4/0 eth0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/6 bridge Family 12h Processor Root Port
/0/100/6/0 wlan0 network BCM4313 802.11bgn Wireless Network Adapter
/0/100/10 bus FCH USB XHCI Controller
/0/100/10/0 usb7 bus xHCI Host Controller
/0/100/10/1 usb6 bus xHCI Host Controller
/0/100/10.1 bus FCH USB XHCI Controller
/0/100/10.1/0 usb9 bus xHCI Host Controller
/0/100/10.1/1 usb8 bus xHCI Host Controller
/0/100/10.1/1/2 input HP Link-5 micro dongle
/0/100/11 storage FCH SATA Controller [AHCI mode]
/0/100/12 bus FCH USB OHCI Controller
/0/100/12/1 usb3 bus OHCI PCI host controller
/0/100/12/1/2 communication Dell Wireless 1701 Bluetooth
/0/100/12/1/3 generic VFS5011 Fingerprint Reader
/0/100/12.2 bus FCH USB EHCI Controller
/0/100/12.2/1 usb1 bus EHCI Host Controller
/0/100/13 bus FCH USB OHCI Controller
/0/100/13/1 usb4 bus OHCI PCI host controller
/0/100/13.2 bus FCH USB EHCI Controller
/0/100/13.2/1 usb2 bus EHCI Host Controller
/0/100/13.2/1/3 multimedia Laptop_Integrated_Webcam_FHD
/0/100/14 bus FCH SMBus Controller
/0/100/14.1 storage FCH IDE Controller
/0/100/14.2 multimedia FCH Azalia Controller
/0/100/14.3 bridge FCH LPC Bridge
/0/100/14.4 bridge FCH PCI Bridge
/0/100/14.5 bus FCH USB OHCI Controller
/0/100/14.5/1 usb5 bus OHCI PCI host controller
/0/100/14.7 generic FCH SD Flash Controller
/0/100/15 bridge Hudson PCI to PCI bridge (PCIE port 0)
/0/100/15.1 bridge Hudson PCI to PCI bridge (PCIE port 1)
/0/101 bridge Family 12h/14h Processor Function 0
/0/102 bridge Family 12h/14h Processor Function 1
/0/103 bridge Family 12h/14h Processor Function 2
/0/104 bridge Family 12h/14h Processor Function 3
/0/105 bridge Family 12h/14h Processor Function 4
/0/106 bridge Family 12h/14h Processor Function 6
/0/107 bridge Family 12h/14h Processor Function 5
/0/108 bridge Family 12h/14h Processor Function 7
/0/1 scsi0 storage
/0/1/0.0.0 /dev/sda disk 500GB ST9500325AS
/0/1/0.0.0/1 /dev/sda1 volume 100MiB Windows FAT volume
/0/1/0.0.0/2 /dev/sda2 volume 19GiB Windows NTFS volume
/0/1/0.0.0/3 /dev/sda3 volume 78GiB Windows NTFS volume
/0/1/0.0.0/4 /dev/sda4 volume 367GiB Extended partition
/0/1/0.0.0/4/5 /dev/sda5 volume 5606MiB Linux swap / Solaris partition
/0/1/0.0.0/4/6 /dev/sda6 volume 361GiB Linux filesystem partition
/0/2 scsi1 storage
/0/2/0.0.0 /dev/cdrom disk DVD+-RW DS-8A8SH
/1 power DELL 8NH5524

Try running:
sudo gedit /etc/default/grub

Change the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

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

Save the new file, close gedit, then update your grub config by running:
sudo update-grub

Reboot to test

Manfred Hampl (m-hampl) said : #4

What do you mean with "open my laptop"?
Are you referring to waking it up again after suspend?

James Cobban (7-webmaster) said : #5

I have my laptop set to suspend when the lid closes, so opening the laptop resumes.

My concern with setting usbcore.autosuspend=-1 is that my laptop is already consuming too much power when suspended, so I can only suspend on battery for a couple of hours before it drains completely and I have to reboot from scratch in a situation where the file system is corrupted because LInux does not take the time to secure the file systems when it suspends.

Furthermore the issue is clearly not with suspend, because the laptop resumes correctly if it is plugged into a power source. The problem is that somewhere in the resume logic, possibly as a result of a flaw in the power management microcode on my laptop, the USB subsystem is not being waked up if the lap top is not plugged in. That is there is some small piece of the resume logic that is executed if the laptop is plugged in but not executed if it is not plugged in. All I want to do is execute the small piece of logic to wake the USB subsystem up if resume fails to do its job.

Furthermore the problem only occurs on 17.04, not on previous Ubuntu releases.

Manfred Hampl (m-hampl) said : #6

Maybe you can create script that runs at wake-up as described in https://askubuntu.com/questions/226278/run-script-on-wakeup

James Cobban (7-webmaster) said : #7

Thank you Manfred, but I do not know what command to issue to wake up the USB subsystem.

Launchpad Janitor (janitor) said : #8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

James Cobban (7-webmaster) said : #9

On 2017-11-01 05:04 AM, Launchpad Janitor wrote:
> Your question #659239 on unity in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/unity/+question/659239
>
> Status: Open => Expired
>
> Launchpad Janitor expired the question:
> This question was expired because it remained in the 'Open' state
> without activity for the last 15 days.
>
I am still having this problem.

All I want is to be told the command to issue to wake up the USB devices
without re-booting the system.

--

James Cobban <email address hidden>
<contactAuthor.php?subject=Email%20Message>
Web-site: www.jamescobban.net <http://www.jamescobban.net/>
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438

Manfred Hampl (m-hampl) said : #10

One of the results for doing a web search for "Ubuntu usb reset" or similar terms suggests a script like

#! /bin/sh
modprobe -r uhci_hcd
sleep 5s
modprobe uhci_hcd

(Remark: I have not tried that myself.)

Can you help with this problem?

Provide an answer of your own, or ask James Cobban for more information if necessary.

To post a message you must log in.