USB devices disconnecting / touchpad turns off

I have a Toshiba Z20T-C convertible here, running Ubuntu 19.04, Kernel 5.0.0-29. For a couple of days / weeks now the touchpad, keyboard backlight and usb ports in the detachable keyboard dock (bottom part) stopped working almost immediately after booting into the desktop. The touchscreen and keyboard keep working. ALL devices and ports work in the BIOS menus, so I would rule out a hardware defect. When I detach / reattach the dock, the keyboard light flashes briefly and the touchpad works for a couple of seconds, then dies again.
I’ve tried turning off autosuspend for the usbcore (usbcore.autosuspend=-1 in kernel boot parameters and updating grub). This helps until the screen is powered off. After that the touchpad is dead again. Also tried switching power settings for some of the usb devices in powertop, but that didn’t help. Not sure I targeted the correct devices though.
When disconnecting / reconnecting the dock dmesg tells me:

--> disconnect here
[  264.391932] toshiba_acpi: Unknown event received 94
[  264.391955] toshiba_acpi: Unknown event received 86
[  264.392192] ACPI: _SB_.PCI0.DOCK: undocking
--> connect here, touchpad works
[  270.991992] ACPI: _SB_.PCI0.DOCK: docking
[  271.006017] toshiba_acpi: Unknown event received 94
[  271.006038] toshiba_acpi: Unknown event received 86
[  271.008403] battery: ACPI: Battery Slot [BAT2] (battery present)
[  271.567978] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  271.588533] usb 2-3: New USB device found, idVendor=0424, idProduct=5534, bcdDevice=60.80
[  271.588540] usb 2-3: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[  271.588543] usb 2-3: Product: USB5534B
[  271.588546] usb 2-3: Manufacturer: SMSC
[  271.591370] hub 2-3:1.0: USB hub found
[  271.591573] hub 2-3:1.0: 2 ports detected
[  271.715875] usb 1-3: new high-speed USB device number 9 using xhci_hcd
[  271.864417] usb 1-3: New USB device found, idVendor=0424, idProduct=2134, bcdDevice=60.80
[  271.864424] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  271.864427] usb 1-3: Product: USB2134B
[  271.864430] usb 1-3: Manufacturer: SMSC
[  271.865745] hub 1-3:1.0: USB hub found
[  271.866997] hub 1-3:1.0: 2 ports detected
[  272.011929] usb 1-3: USB disconnect, device number 9
[  272.064419] usb 2-3: USB disconnect, device number 5
--> touchpad dead

A full dmesg log is here.

EDIT 1: I’ve used “udevadm monitor” to check what happens when the devices die. It prints:

KERNEL[547.410340] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
KERNEL[547.410579] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
KERNEL[547.411309] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
KERNEL[547.411504] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
UDEV  [547.415427] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
UDEV  [547.417120] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0 (usb)
UDEV  [547.419275] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
UDEV  [547.424835] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-3 (usb)
KERNEL[547.597264] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
KERNEL[547.597446] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
KERNEL[547.598157] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
KERNEL[547.598363] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
UDEV  [547.601256] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
UDEV  [547.606231] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0 (usb)
UDEV  [547.613479] unbind   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
UDEV  [547.618184] remove   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)

So it seems the kernel turns off the hubs

EDIT 2: I’ve tried adding “acpi=off” to the kernel boot mode parameters, and rolling back to kernel 5.0.0-13, but that it didn’t change anything. I also tried adding a UDEV rule file “/etc/udev/rules.d/99-powersave.rules”:

ACTION=="add", SUBSYSTEM=="usb", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{power/autosuspend}="0"
ACTION=="add", SUBSYSTEM=="usb", ATTR{power/autosuspend_delay_ms}="-1"
ACTION=="add", SUBSYSTEM=="usb", ATTR{busnum}=="1", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{busnum}=="2", ATTR{power/control}="on"

But that didn’t help either. I’m pretty clueless what to try next right now.

EDIT 3: I’ve tried kernel version 4.18.20, 5.0.21 and 5.2.21 now, without any luck. It might be a udev / acpi / driver problem, but I’m no sure where to look…

Asked By: Bim

||

This answer has many USB auto-power off settings to check:

After a few days of struggling, I managed to find a solution on Ubuntu 17.10. Hope this works for everyone having problems with the D6000 dock. Below format is markdown (to lazy to convert it)

Instructions for fixing the blanking monitor on dock issue within Ubuntu.

Make sure to reboot after making the changes!

Disable USB AutoSuspend

  • sudo gedit /etc/default/tlp and change the below value from 1 to 0
USB_AUTOSUSPEND=0
  • sudo gedit /etc/udev/rules.d/01-usb-dock.rules. This will create a new file.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1bcf", ATTR{idProduct}=="2b95", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1bcf", ATTR{idProduct}=="0005", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1d6b", ATTR{idProduct}=="0002", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1d6b", ATTR{idProduct}=="0003", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="0143", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04f3", ATTR{idProduct}=="24a1", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0608", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0610", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0620", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="06c4", ATTR{idProduct}=="c411", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="17e9", ATTR{idProduct}=="6006", TEST=="power/control", ATTR{power/control}="on"

Disable Display Power Management

  • sudo gedit /etc/X11/xorg.conf Append the below options to the file.
Section "Monitor"
Identifier "DVI-I-3-2"
Option "DPMS" "false"
EndSection

Section "Monitor"
Identifier "DVI-I-2-1"
Option "DPMS" "false"
EndSection

Disable audio suspend

  • sudo gedit /etc/pulse/default.pa. Comment out the line indicated below.
### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

Disale USB wake in BIOS

Boot into the BIOS by pressing the F12 key as the machine turns on. Under Power Management >> USB Wake Support uncheck both boxes.

Answered By: WinEunuuchs2Unix

In my case it was a hardware defect after all. At some point even the keyboard died, so I replaced the whole keyboard / dock part. Now everything works again, so this was not a Linux problem…

Answered By: Bim

I had problems with my USB 3.5" hard disk case disconnecting randomly.

  1. I found recommendation to turn off USB xHCI Handoff option in BIOS.

  2. I also disabled USB autosuspend with usbcore.autosuspend=-1 kernel parameter (GRUB_CMDLINE_LINUX_DEFAULT="..." in /etc/default/grub, then sudo update-grub)

Neither of the above helped.

  1. Then I added no-usb-handoff kernel parameter,and also
    usbcore.quirks=1234:5678:ben and usb-storage.quirks=1234:5678:t quirks [1],
    where 1234:5678 is the idVendor:idProduct identifier of your device, obtainable with lsusb:
e = USB_QUIRK_RESET (device can't be reset (e.g morph devices), don't use reset);
n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a pause after every control message);
t = NO_ATA_1X (don't allow ATA(12) and ATA(16) commands, uas only);

And that seems to have finally done the trick. No more disconnects.

[1] https://www.kernel.org/doc/html/v5.0/admin-guide/kernel-parameters.html