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...