Contribute
Register

<< Solved >> Immediatelly waking up from sleep with Wake reason: GLAN EHC2

Status
Not open for further replies.
Joined
Dec 1, 2016
Messages
113
Motherboard
Gigabyte Z77-DS3H
CPU
i5-3570K
Graphics
RX 570
Mobile Phone
  1. iOS
In the last few day I have been experiencing problems with putting my hackintosh to sleep. It goes to sleep and just immediately wakes up.

I ran log show --style syslog | fgrep "Wake reason" to gat the reason for this and got

localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: GLAN EHC2

Some googling suggested this is Wake on Lan. There is no way to disable Wake on Lan in my BIOS and in macOS, it is disabled, see the screenshot.

I even tried manually unplugging the Ethernet cable from the Hackibntosh, but it did not help, still wakes app right after it is put to sleep with the same reason.

I do not use any DSDT, it was never needed for my GA-Z77-DS3H.
 

Attachments

  • Screenshot 2019-06-14 at 09.11.22.png
    Screenshot 2019-06-14 at 09.11.22.png
    357.3 KB · Views: 179
In the last few day I have been experiencing problems with putting my hackintosh to sleep. It goes to sleep and just immediately wakes up.

I ran log show --style syslog | fgrep "Wake reason" to gat the reason for this and got

localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: GLAN EHC2

Some googling suggested this is Wake on Lan. There is no way to disable Wake on Lan in my BIOS and in macOS, it is disabled, see the screenshot.

I even tried manually unplugging the Ethernet cable from the Hackibntosh, but it did not help, still wakes app right after it is put to sleep with the same reason.

I do not use any DSDT, it was never needed for my GA-Z77-DS3H.

Hi there.

Do you have a Bluetooth adapter plugged in to a USB port, internally or externally?
 
Yes I have a in a PCIe card with BCM943602CS that I got a week ago (https://www.tonymacx86.com/threads/...-e-bcm943602cs-and-mojave-working-oob.278483/) with BT connected to internal USB .. so the timeframe for my problems approximately matches.

Also can the GLNA maybe mean the Wifi in the card instead of the Ethernet?

Okay :thumbup:

I was thinking perhaps the "EHC2" mentioned after GLAN for the wake reason referred to the USB controller. Could be wrong but the problem is indicative.

Check the output from IORegistryExplorer to see what controllers are handling USB. You should have an XHCI with your Z77 Express chipset, but also an EHCI too.

With a motherboard header USB port - the type we usually connect an add-on wireless/bluetooth card to - it needs configuring to prevent instant wake-from-sleep. This involves installing USBInjectAll.kext and creating a bespoke SSDT_USB.aml file. Have you created one yet, or are you using the port-limit removal patch?

An easy way to test this - if you can manage without bluetooth/mouse for a while, say by using a non-bt mouse - is to disconnect that USB motherboard cable and see if the sleep problem goes away.

:)
 
Okay :thumbup:

I was thinking perhaps the "EHC2" mentioned after GLAN for the wake reason referred to the USB controller. Could be wrong but the problem is indicative.

Check the output from IORegistryExplorer to see what controllers are handling USB. You should have an XHCI with your Z77 Express chipset, but also an EHCI too.

With a motherboard header USB port - the type we usually connect an add-on wireless/bluetooth card to - it needs configuring to prevent instant wake-from-sleep. This involves installing USBInjectAll.kext and creating a bespoke SSDT_USB.aml file. Have you created one yet, or are you using the port-limit removal patch?

An easy way to test this - if you can manage without bluetooth/mouse for a while, say by using a non-bt mouse - is to disconnect that USB motherboard cable and see if the sleep problem goes away.

:)

One new observation, after a reboot the sleep works again after a while and then another reboot is needed to make it work again.

IORegistryExplorer shows EHC2, is there any way to "map" it to a real device to know if it is really the internal USB header? I never used the tool before.

I do not use a BT mouse, I got the card to make AirDrop work that I now use quite often so disconnecting the BT module would be the same as just removing the card (I use Ethernet anyway).

I have never used USBInjectAll.kext or any port-limit removal patch in my 3 years of running this hackintosh. All the USB2/3 ports on the motherboard have always worked for me. From the internal headers, only 1 of 3 usb2 and 1 of 2 usb3 headers work, which I do not mind, I only loose the front USB ports on the case.

So I guess it is time to start reading on creating a SSDT and USBInjectAll.kext ...
 

Attachments

  • Screenshot 2019-06-15 at 11.52.17.png
    Screenshot 2019-06-15 at 11.52.17.png
    655.6 KB · Views: 171
  • Screenshot 2019-06-15 at 11.52.20.png
    Screenshot 2019-06-15 at 11.52.20.png
    654.5 KB · Views: 108
  • Screenshot 2019-06-15 at 11.52.38.png
    Screenshot 2019-06-15 at 11.52.38.png
    722.5 KB · Views: 124
One new observation, after a reboot the sleep works again after a while and then another reboot is needed to make it work again.

IORegistryExplorer shows EHC2, is there any way to "map" it to a real device to know if it is really the internal USB header? I never used the tool before.

I do not use a BT mouse, I got the card to make AirDrop work that I now use quite often so disconnecting the BT module would be the same as just removing the card (I use Ethernet anyway).

I have never used USBInjectAll.kext or any port-limit removal patch in my 3 years of running this hackintosh. All the USB2/3 ports on the motherboard have always worked for me. From the internal headers, only 1 of 3 usb2 and 1 of 2 usb3 headers work, which I do not mind, I only loose the front USB ports on the case.

So I guess it is time to start reading on creating a SSDT and USBInjectAll.kext ...

Hi there.

Okay ... Nothing is compulsory, so if you are happy with your configuration there is no need to 'meddle' if you don't want to risk upsetting anything :thumbup:

I'll number my points here - that's just how I work...

1) Basically your motherboard will have an XHCI controller. See if it is enabled in your BIOS.

2) Bear in mind "EHC" is USB2.0 only. You need "XHC" to have USB3.0/3.1 enabled.

3) If you are using the EHCI controller then when properly configured you should see both EHC1 and EHC2 in IORegistryExplorer. XHCI might need renaming but I have a feeling not in this case. Hopefully as you progress it will show as "XHC".

4) The reason why some of your ports work and some don't is because of the inbuilt 15-port limit in macOS. If you place USBInjectAll.kext in L/E - or - EFI/CLOVER/kexts/Other, and the port-limit removal patch appropriate to your macOS version, you should see many more than 15-ports. Possibly 24 or 26. This is because usually a PC motherboard has more physical ports than a real Mac. In IORegistryExplorer "HS**" ports are USB2.0 and "SS**" ports are USB3.0/3.1 versions of the same physical sockets.

5) There are two main guides to creating an SSDT here and one is in the Forum/Post Installation/General section, the other in Forum/Laptops/Mojave Laptop Support. If you decide to try this then you will need the correct Device ID for your XHC controller. Looking at your final screen grab you have highlighted the USB2.0. Move the cursor up to the USB3.0 line and you can see the IDs you need in there.

6) How to 'map' your real ports is in either guide.

:)
 
Last edited:
I had a similar one, sleep never worked with that one. I changed to the one from ali express, Fenvi T919 sleep works with this one with usb.kext. A few reported that to change the USB type to internal in the USB SSDT or usb.kext worked for them, for me not...But fenvi works flawless

Hello,

Sleep can be affected by other factors too. Bluetooth USB port-polling is just one of the most common.

Bear in mind USB.kext is probably from using Hackintool rather than the other two main guides. It is a perfectly sound way to configure things if that is your preference :thumbup:
 
Status
Not open for further replies.
Back
Top