[SOLVED]
Instant Wake with USBInject (High Sierra)
First, a warm thanks for your help, RehabMan. Your advice is to the point as always.
A
mini guide from the experience I gathered fine tuning USBInject.kext
* EH01/EH02/XHC mandatory naming (see ReHabMan’s USBInject
Guide)
Previously, I had XHC and XHC1 in DSDT and USBInject did not attach itself to the right XHC.
-I tried renaming XHC-> to XXHC and then XHC1-> XHC. USBInject worked but I got Instant wake after sleep.
Then, a better solution, given by ReHabMan after looking at my ‘problem reporting files,’ was simply to
comment out: Device (XHC1) in DSDT and [
edit: change the line referring to XHC1 -> XHC].
Without any other modification to the DSDT, USBInject got the right XHC Device.
Note: EHC0/EHC1 are renamed EH01/EH02 with Clover
An additional point:
How to debug which USB Port was responsible for the instant wake?
I used SSDT-UIAC-ALL, configured to get:
- EH01 (PRT1 HP15 Camera HP16 Bluetooth),
- EH02 (PRT1 HP22 Card Reader)
- 8086_1e31 (HSP1 HPS2 SSP1 SSP2 for the 2 USB ports)
Since I had ‘sleep’ working before using USBInject, I wanted to understand which device(s) was causing it.
-In SSDT-UIA-ALL, I changed the port-count to zero for EH01, EH02 and 8086_1e31.
-After reboot, all USB devices were off and sleep was working.
-I then changed the port-count of 8086_1e31 back to 0x08 and external USB2/3 ports were working with sleep.
-The origin of instant wake was with EH01 (probably Bluetooth).
I applied the first part of ReHabMan’s usb_prw_0x0d_xhc.txt patch: if _PRW is present, returns 0 (original was 3) for sleep state.
-As a result sleep is working. The lid is working and it sleeps and wakes the computer. Keyboard or track pack can also be used.
-The external USB mouse can no longer wake (due to the patch I chose to apply). Which is better for this laptop.
-External USB Wifi (and mouse) turn back on once computer is awake (just as they are supposed to).
My next step is to revisit DSDT editing since RehabMan recommended not to fix MacIASL warnings.
A big thanks to the community with its hard work, particularly around CLOVER. It makes running High Sierra the best experience I ever had with this computer. Thank you ReHabMan. Could not have gone this far without your detailed guides and help.