Contribute
Register

Instant wake with AppleUSBXHCI but not with GenericUSBXHCI

Status
Not open for further replies.

e64

Joined
Jun 14, 2015
Messages
23
CPU
i7-4790k
Graphics
GTX 970
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
I started my Hackintosh build with Chimera / Yosemite 10.10.3 and was able to get sleep working (thanks to RehabMan) since I had used MB to add the USB 3.0 - Universal driver. Now I am recreating my build with Clover, and trying to keep the Yosemite install as vanilla as possible. As expected, trying to sleep results in an instant wake with:

Wake Reason: XHC

First I grabbed a copy of GenericUSBXHCI.ktext, pushed it to /EFI/Clover/kexts/10.10/, added -gux_defer_usb2, and rebooted. As expected, sleep works perfectly! But, now USB devices are acting buggy (slow, unresponsive), so I removed GenericUSBXHCI with hopes that I could get sleep working with AppleUSBXHCI (again, another RehabMan suggestion, since I've read about many problems with it and Yosemite).

However, nothing that I do seems to fix sleep. I tried all of the different flags for USB (gux_defer_usb2, gux_no_idle),. I'm not sure if I need to create my own DSDT and patch it for USB3 (as suggested here), if there's a Clover patch to apply for AppleUSBXHCI, or where to go from here. Any help would be greatly appreciated!
 
I started my Hackintosh build with Chimera / Yosemite 10.10.3 and was able to get sleep working (thanks to RehabMan) since I had used MB to add the USB 3.0 - Universal driver. Now I am recreating my build with Clover, and trying to keep the Yosemite install as vanilla as possible. As expected, trying to sleep results in an instant wake with:

Wake Reason: XHC

First I grabbed a copy of GenericUSBXHCI.ktext, pushed it to /EFI/Clover/kexts/10.10/, added -gux_defer_usb2, and rebooted. As expected, sleep works perfectly! But, now USB devices are acting buggy (slow, unresponsive), so I removed GenericUSBXHCI with hopes that I could get sleep working with AppleUSBXHCI (again, another RehabMan suggestion, since I've read about many problems with it and Yosemite).

However, nothing that I do seems to fix sleep. I tried all of the different flags for USB (gux_defer_usb2, gux_no_idle),. I'm not sure if I need to create my own DSDT and patch it for USB3 (as suggested here), if there's a Clover patch to apply for AppleUSBXHCI, or where to go from here. Any help would be greatly appreciated!

What's your USB3 (XHCI) controller? You should be able to make steps towards patching AppleUSBXHCI from there...
 
What's your USB3 (XHCI) controller? You should be able to make steps towards patching AppleUSBXHCI from there...

I'm not 100% this is the info you're looking for, but I got this from System Report. Obviously the first two are USB 3.0 busses and the last is the USB 2.0 bus.

USB 3.0 Hi-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBXHCI
PCI Device ID: 0x8cb1
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x0a
USB 3.0 SuperSpeed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBXHCI
PCI Device ID: 0x8cb1
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x0a
USB Hi-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBEHCI
PCI Device ID: 0x8ca6
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x1d


Looking up the PCI device IDs / Vendor IDs shows that they're Intel devices. I'm using an ASUS Maximus VII Hero motherboard, if that helps.
 
I'm not 100% this is the info you're looking for, but I got this from System Report. Obviously the first two are USB 3.0 busses and the last is the USB 2.0 bus.

USB 3.0 Hi-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBXHCI
PCI Device ID: 0x8cb1
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x0a
USB 3.0 SuperSpeed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBXHCI
PCI Device ID: 0x8cb1
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x0a
USB Hi-Speed Bus:
Host Controller Location: Built-in USB
Host Controller Driver: AppleUSBEHCI
PCI Device ID: 0x8ca6
PCI Revision ID: 0x0000
PCI Vendor ID: 0x8086
Bus Number: 0x1d


Looking up the PCI device IDs / Vendor IDs shows that they're Intel devices. I'm using an ASUS Maximus VII Hero motherboard, if that helps.

It should say on their documentation of the Maximus VII Hero...

Although if they are Intel you should start researching that...

I thought Intel 9 Series (Z97) had fully native support though... :think:
 
It should say on their documentation of the Maximus VII Hero...

Although if they are Intel you should start researching that...

I thought Intel 9 Series (Z97) had fully native support though... :think:

That was my understanding as well. I'm also not sure that it is a USB 3.0 issue, since the kernel flag -gux_defer_usb2 caused the GenericUSBXHCI kext to work, and that flag causes USB 2.0 devices to defer to AppleUSBEHCI instead of GenericUSBXHCI.

Since I'm no longer using GenericUSBXCHI, I would assume that flag is either:
  1. Meaningless now (as USB2.0 devices already connect to AppleUSBECHI), or
  2. This flag is handling when USB2.0 devices plugged into a USB3.0 port.

I'm not really sure how to debug it any further, apart from unplugging USB devices and seeing which ones are causing the system to wake.
 
That was my understanding as well. I'm also not sure that it is a USB 3.0 issue, since the kernel flag -gux_defer_usb2 caused the GenericUSBXHCI kext to work, and that flag causes USB 2.0 devices to defer to AppleUSBEHCI instead of GenericUSBXHCI.

Since I'm no longer using GenericUSBXCHI, I would assume that flag is either:
  1. Meaningless now (as USB2.0 devices already connect to AppleUSBECHI), or
  2. This flag is handling when USB2.0 devices plugged into a USB3.0 port.

I'm not really sure how to debug it any further, apart from unplugging USB devices and seeing which ones are causing the system to wake.

-gux_defer_usb2 is a kernel flag specific to GenericUSBXHCI (gux = GenericUSBXHCI)
 
-gux_defer_usb2 is a kernel flag specific to GenericUSBXHCI (gux = GenericUSBXHCI)

Thanks RehabMan! That makes a lot of sense now, I just assumed it was universal since it appears in Clover Configurator's Boot options.

Do you have any advice on how to investigate what is causing the system to wake and why? I'm not sure if I should find the device(s) that are causing the system to wake (XHC implies a USB 3.0 port, right?), or if I should be looking into power management, or something else.

Edit: I found the device(s) that are causing the wake. Both my CPU cooler (Corsair H80i) and my power supply (Corsair HX850i) are connected to onboard USB headers for Corsair Link. Apparently Corsair Link doesn't play nice with sleep, but I do find it very strange that it worked with GenericUSBXHCI. Even more strange, my motherboard only has one USB 3.0 header, the rest are 2.0. Both Corsair Link cables are connected to two USB 2.0 headers, yet in System Report they are listed under USB 3.0 Hi Speed Device as "Composite Device" and "Integrated USB Bridge".

Could this be the root cause? Just a guess, the Corsair Link devices should be connecting to EHCI instead of XHCI, the -gux_defer_usb2 flag enabled this, but now they're connecting to AppleUSBXHCI because Yosemite thinks they are USB 3.0 ports when in actuality they are USB 2.0?
 
Thanks RehabMan! That makes a lot of sense now, I just assumed it was universal since it appears in Clover Configurator's Boot options.

Do you have any advice on how to investigate what is causing the system to wake and why? I'm not sure if I should find the device(s) that are causing the system to wake (XHC implies a USB 3.0 port, right?), or if I should be looking into power management, or something else.

Edit: I found the device(s) that are causing the wake. Both my CPU cooler (Corsair H80i) and my power supply (Corsair HX850i) are connected to onboard USB headers for Corsair Link. Apparently Corsair Link doesn't play nice with sleep, but I do find it very strange that it worked with GenericUSBXHCI. Even more strange, my motherboard only has one USB 3.0 header, the rest are 2.0. Both Corsair Link cables are connected to two USB 2.0 headers, yet in System Report they are listed under USB 3.0 Hi Speed Device as "Composite Device" and "Integrated USB Bridge".

Could this be the root cause? Just a guess, the Corsair Link devices should be connecting to EHCI instead of XHCI, the -gux_defer_usb2 flag enabled this, but now they're connecting to AppleUSBXHCI because Yosemite thinks they are USB 3.0 ports when in actuality they are USB 2.0?

On laptops we fix "instant wake" with DSDT patches. You probably have some BIOS option you can tweak.
 
Status
Not open for further replies.
Back
Top