xhci_hcd module turns off usb host controller on boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Confirmed
|
Medium
|
|||
linux (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
So we know this xhci_kcd was always shit in that it turns off the console usb keyboard for long running computers and that it on abrupt termination of Linux puts usb in a 12x slower mode. It is buggy, it was always buggy, and its getting worse.
With Linux 4.8.0-37, this crappy software decides to halt the host controller on boot, ie. turn off the console keyboard preventing any boot. I cannot think of any situation where anyone would want their host controller halted.
This is MacBook Pro 2015. So, it's already broken in UEFI-grub as it always was, ie. every key press takes 8 seconds, but you only need two, so you can boot in 16 s.
I tried to disable the xhci_kcd crap by using kernel parameter noxhci_port_switch or modprobe.
Because it has crap in UEFI, the computer will not boot any external hard drive or usb fob. The only thing that works is Apple rescue that gets rid of the xhci garbage, and the boot os x immediately after that.
So the log output
xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command.
- and a bit later:
xhci_hcd 0000:00:14.0: Assuming host is dying, halting host.
xhci_hcd 0000:00:14.0: HC died; cleaning up
This clown programming of Linux has to stop. Why would anyone ever want their host controller halted?
---
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CurrentDesktop: GNOME
DistroRelease: Ubuntu 16.10
HibernationDevice: RESUME=
MachineType: Apple Inc. MacBookPro12,1
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.161.1
Tags: yakkety
Uname: Linux 4.8.0-39-generic x86_64
UpgradeStatus: Upgraded to yakkety on 2016-11-16 (108 days ago)
UserGroups: adm docker libvirt libvirtd sudo
_MarkForUpload: True
dmi.bios.date: 10/26/2015
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP121.
dmi.board.name: Mac-E43C1C25D48
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro12,1
dmi.chassis.type: 9
dmi.chassis.vendor: Apple Inc.
dmi.chassis.
dmi.modalias: dmi:bvnAppleInc
dmi.product.name: MacBookPro12,1
dmi.product.
dmi.sys.vendor: Apple Inc.
summary: |
- xhci_kcd module turns off usb host controller on boot + xhci_hcd module turns off usb host controller on boot |
Changed in linux: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Created attachment 211371
Dmesg output with broken usb
I have a Apple Inc. MacBookPro11,1 (with the most recent 'bios': BIOS MBP111. 88Z.0138. B16.1509081438 09/08/2015).
At the beginning, USB worked normally. After a while (and after newer kernel versions released by debian?) things started to act strangely. For one, the bios/efi boot takes a very long time (probably due to the same reason I describe later) just to get to the bootloader/grub. Likley resetting and probing for USB ports/mass storage. When grub finally pops up, I can use the (internal USB based keyboard) normally to select a grub entry etc.
Booting the kernel then works reasonably fine, until it loads the xhci module.
It spews some messages in dmesg (taking some 15 seconds) and only then, the keyboard starts to work again.
The log is filled with messages like:
[ 7.248479] xhci_hcd 0000:00:14.0: Command completion event does not match command
[ 7.248495] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 12.256347] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[ 12.256363] usb 1-2: hub failed to enable device, error -62
[ 17.264166] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
(followed by USB hub/device enumeration)
I've tried several combinations and quirks, updating to the latest rc kernels since 3.16 (am on 4.5.0 right now) and it only seems to get worse.
Last year, on the 3.x series of kernels occasionally after a reboot the 'bios' would go through quickly and fine and also no problems loading the module and logging in. But now it always fails.
Additionally it (may or may not) seems to cause the internal usb card reader to not even show up almost all of the time, though under OSX it works fine. There is/was a known issue with this cardreader where it would disappear after a suspend.
Adding various seemingly related intel usb3 quirks I had no change, as I think all of them are already applied to this chipset.
I'm guessing that somehow the usb chipset has some configuration option miss-set (which persists over reboots/power down) and the driver doesn't quite understand it.
Unfortunately it seems that this chipset does not work in pure USB2.0 (ehci) mode and needs the xhci module to work at all, so even falling to USB2 is no option. Also disconnecting all USB perhipials is nearly impossible as the touchpad, bluetooth cardreader and keyboard are internally all wired to USB.
I'm attaching 3 dmesg logs with various kernels and levels of debugging information. I tried to google for errors from these logs, but to no avail.