使用 Refind 运行 Mac OS X / Ubuntu 16.04 双启动
12 月的某个时候(大约是 Canonical 在 16.04 上从 4.10 内核升级到 4.13 内核的时候),加载内核的时间从 5 秒增加到 50 秒。这似乎与未能将 Apple 的内部 SD 卡分配给 USB 地址有关。仔细查看 dmesg 日志会发现很多冗长的信息:
xhci_hcd 0000:00:14.0:等待设置设备命令时超时
行,然后
usb 2-3 设备不接受地址 2,错误 -62
此错误在地址 3、4、5 上重复出现。总而言之,内核似乎花了四十秒的时间努力为 usb2-3 分配地址,然后才正常启动。
奇怪的是,这种情况并不总是发生。它总是在冷重启时发生,但不会在第一次重启时发生。在这些情况下,usb 2-3(我的机器上的 Apple 内置 SD 卡读卡器)会立即被分配,内核会在 5 秒内加载。SD 卡在第一次重启时就可以正常工作。(有趣的是,额外的重启并不一定能让启动过程顺利进行。似乎每次其他重启都可以正常工作。
我怀疑这是一个内核错误,我已经准备将其报告给 Canonical。我已经编译了最新的内核 (4.18-rc6),甚至将 Mac OS X 更新到 10.12.6 来更新机器固件。
在这样做之前,我认为最好先问一下是否有可接受的解决方法。我目前没有使用 SD 卡做任何事情。有没有什么方法可以告诉内核停止尝试加载它?我已经尽一切努力让机器保持最新状态,但这个系统仍然挂起。这个问题已经在 4.10、4.13、4.15、4.17 和 4.18rc6 内核上进行了测试,它们都给出了相同的 dmesg 错误和相同的“每隔一次启动”行为。
相关条目:Dmesg(Bad boot,缩写)
[ 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(总结)启动成功
[ 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
串行通信
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(读卡器,良好启动)
*-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