acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

Freeze on login screen after wake from hibernation. #386

Open vandroiy2013 opened 5 years ago

vandroiy2013 commented 5 years ago

This problem occurs on Gigabyte GA-Z370M-DS3H. Stuck on login screen after wake from hibernation. Hibernatemode=25, ResetHwSig=true, HibernateMode=Auto. Tried different combinations of ResetHwSig and HibernateMode in config.plist. Also tried with HibernationFixup.kext. No luck.

PMheart commented 5 years ago

Same error here, under macOS 10.14.5 (I cannot even trigger hibernation under 10.15 b1...)

@vandroiy2013 Could you please try this patch? (Which is actually how older version of HibernationFixup works, so please REMOVE HibernationFixup as well)

Base: __ZN11IOPCIBridge19restoreMachineStateEjP11IOPCIDevice
Comment: Disable call to IOPCIDevice::extendedConfigWrite16() under IOPCIBridge::restoreMachineState()
Count: 1
Enabled: YES
Find: BE040000 00E8DE92 00004983 
Identifier: com.apple.iokit.IOPCIFamily
Limit: 0
Mask: FFFFFFFF FFFF0000 0000FFFF 
MatchKernel: <empty>
Replace: BE040000 00909090 90904983 
ReplaceMask: <empty>
Skip: 0

If you would try with Clover too, please use these plain patches instead. Target kext: com.apple.iokit.IOPCIFamily 10.14.5: e8 7a 92 00 00 -> 90 90 90 90 90 10.15 b1: e8 de 92 00 00 -> 90 90 90 90 90

Actually we could try some combinations: (Slice FakeSMC will be written as Fsmc in context, VirtualSMC will be written as Vsmc in context)

Andrey1970AppleLife commented 5 years ago

@vandroiy2013 Could you please try this patch? (Which is actually how older version of HibernationFixup works, so please REMOVE HibernationFixup as well)

  1. HibernationFixup perfectly works with OC.
  2. For @vandroiy2013 not necessary HibernationFixup, because works without this kext with Clover.
PMheart commented 5 years ago

Yeah, I had talked with @lvs1974 days ago too, and he said that the problem might have nothing to do with HBFX itself. I may have to check it from 10.11 to 10.15 this weekend...

Vandroiy's scenario kind of resembled what I got, yet this time I had no luck with Clover either. (It used to work under 10.12 or 10.13 two years ago, and I totally dropped hibernation and switched back to normal sleep)

All in all, time is always something that is hard to find... :(

vit9696 commented 5 years ago

It seems that on modern macOS systems hibernation got broken on select hardware, and that seems to be bootloader-independent just as @PMheart mentioned. HibernationFixup solves a separate problem, and that is most likely why it does not help. Probably trying with Clover and potentially older macOS versions and AptioMemoryFix versions is most reasonable.

Honestly said, hibernation is a high security risk and Apple no longer supports it for T2 models. Current hibernation support in AptioMemoryFix is based on literal hacks that just happen to work, and we have no idea how to improve them due to completely different memory management compared to Macs. I believe we should rather make it deprecated than attempt to invest into researching for new half-borked heuristics.

CobanRamo commented 5 months ago

Hi guys,

Seems to be an ancient fossil problem, I was able to solve this Hibernation 25 (Apple Standby) on every computer I've set up using the following instructions.

Perhaps the whole thing can be transferred to the current OpenCore documentation and Sample.plist, of course after a thorough test on your part.

In the Sample.plist under UEFI/ReservedMemory there is also a Lenovo patch with the same data but the name is somehow not appropriate, this patch in conjunction with a few other things really works on all hackintoshes that I've tested.

Take a closer look at it, maybe we can combine it into a common solution and mark this thread as solved.

Greetings Coban

HibernationMode25 2 MacOS HibernationMode EN.pdf Fix wake from hibernation 25.plist.zip