1

Running a Mac OS X / Ubuntu 16.04 Dual Boot with Refind

Some time in December (roughly around the time Canonical went from the 4.10 to 4.13 kernel on 16.04) from taking 5 seconds to load the kernel to 50. It appears to be related to a failure to assign Apple's internal SD card to a USB address. A perusal of dmesg logs shows plenty of lengthy:

xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command

lines, followed by

usb 2-3 device not accepting address 2, error -62

This error repeats itself for addresses 3,4,5. All told, it seems the kernel spends forty seconds trying really hard to assign usb2-3 an address before booting as normal.

Strangely, this doesn't always happen. It always happens on a cold reboot, but not happen on the first reboot. In those cases usb 2-3, which is Apple's internal SD card reader on my machine, is assigned immediately and the kernel loads in 5 seconds. The SD card works on that first reboot. (Interestingly, additional reboots do not necessarily get the boot process to go smoothly. It seems every other reboot works correctly.

I suspect this is a kernel bug, and I've been preparing to report it to Canonical. I've compiled that latest kernel (4.18-rc6) and even Mac OS X update to 10.12.6 to update machine firmware.

Before I do so, I thought it might be wise to ask if there's an acceptable work-around. I do not currently use the SD card for anything. Is there any way to tell the kernel to stop trying to load it? I've done everything I can to keep the machine up to date, but this system still hangs. This problem has been tested on the 4.10, 4.13, 4.15, 4.17, and 4.18rc6 kernels and they all give the same dmesg error, and the same "every other boot" behavior.

Relevant entries: Dmesg (Bad boot, shortened)

   [    6.880125] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   12.256127] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   12.464099] usb 2-3: device not accepting address 2, error -62
   [   18.144129] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   23.520128] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   23.728098] usb 2-3: device not accepting address 3, error -62
   [   29.664130] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   35.040118] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   35.248100] usb 2-3: device not accepting address 4, error -62
   [   41.184129] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   46.560125] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
   [   46.768096] usb 2-3: device not accepting address 5, error -62
   [   46.796134] usb usb2-port3: unable to enumerate USB device

dmesg (summarize) good boot

    [    1.588163] usb 2-3: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
    [    1.610053] usb 2-3: New USB device found, idVendor=05ac, idProduct=8406, bcdDevice= 8.20
    [    1.610055] usb 2-3: New USB device strings: Mfr=3, Product=4, SerialNumber=5
    [    1.610056] usb 2-3: Product: Card Reader
    [    1.610057] usb 2-3: Manufacturer: Apple
    [    1.610058] usb 2-3: SerialNumber: 000000000820

lspci

    00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
    00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
    00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
    00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
    00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root   Port 1 (rev e4)
    00:1c.1 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 2 (rev e4)
    00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
    00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
    00:1c.5 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)
    00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
    00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
    02:00.0 Multimedia controller: Broadcom Corporation 720p FaceTime HD Camera
    03:00.0 Network controller: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev 03)
    04:00.0 SATA controller: Samsung Electronics Co Ltd Apple PCIe SSD (rev 01)
    05:00.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]
    06:00.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]
    06:03.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]
    06:04.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]
    06:05.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]    
    06:06.0 PCI bridge: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]
    07:00.0 System peripheral: Intel Corporation DSL5520 Thunderbolt [Falcon Ridge]

lshw (card reader, good boot)

    *-usbhost:1
        product: xHCI Host Controller
        vendor: Linux 4.18.0-rc6 xhci-hcd
        physical id: 1
        bus info: usb@2
        logical name: usb2
        version: 4.18
        capabilities: usb-3.00
        configuration: driver=hub slots=4 speed=5000Mbit/s
        *-usb
            description: Mass storage device
            product: Card Reader
            vendor: Apple
            physical id: 3
            bus info: usb@2:3
            logical name: scsi0
            version: 8.20
            serial: 000000000820
            capabilities: usb-3.00 scsi emulated scsi-host
            configuration: driver=usb-storage maxpower=896mA speed=5000Mbit/s
            *-disk
                description: SCSI Disk
                product: SD Card Reader
                vendor: APPLE
                physical id: 0.0.0
                bus info: scsi@0:0.0.0
                logical name: /dev/sdb
                version: 3.00
                serial: 000000000820
                capabilities: removable
                configuration: ansiversion=6 logicalsectorsize=512 sectorsize=512
                    *-medium
                     physical id: 0
                     logical name: /dev/sdb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.