Jump to content

Debugging Sleep/Wake Issues


Aryamaulana Wibisono
 Share

33 posts in this topic

Recommended Posts

On 12/24/2021 at 7:46 PM, MaLd0n said:

is impossible do it

compare both files(original and patched) with DiffMerge app and check. ssdt is generic solution for one easy boot, just it. this dsdt above have all u need for one perfect hack but boot into windows for example with opencore don't work good, this bootloader inject things in other system too😄. in this case the best is used this way

https://www.olarila.com/topic/13019-hackintosh-dual-boot-with-opencore-with-full-acpi-and-real-vanilla-solution/

I actually don't mind if OpenCore inject things in another system as long if my hack is look like the real mac 😅

also, i've already tried putting back the whole _PRW back into the DSDT that you patched it causing KP while booting. so I decided to use the SSDT instead of the DSDT because i'm not to familiar doing a full patch using DSDT roflmao besides that i'm addicted on a clean acpi code, make it looks close to the real mac as possible and the DSDT is not really the right place to do it because of how really mess the DSDT Code itself🤣
1813731995_ScreenShot2021-12-26at20_24_11.thumb.png.3ca3ecc90968583c7b675713b9863742.png


btw once again thank you very much for the work @MaLd0n, you're rock🤘

Link to comment
Share on other sites

11 hours ago, Fortitude said:

Hi @MaLd0n

test

EFI 02.zip

7 minutes ago, Aryamaulana Wibisono said:

I actually don't mind if OpenCore inject things in another system as long if my hack is look like the real mac 😅

ssdt is not way for that ;) 50%+ from our acpi is device for windows, etc. macos don't use it. One file, all solution, inject devices, removed unused devices, etc, etc. dsdt is a principal table present in our mobos, ssdts just inject into that but with limits.

with _prw DSDT.aml.zip

Just Enjoy!

Link to comment
Share on other sites

14 minutes ago, MaLd0n said:

ssdt is not way for that ;) 50%+ from our acpi is device for windows, etc. macos don't use it. One file, all solution, inject devices, removed unused devices, etc, etc. dsdt is a principal table present in our mobos, ssdts just inject into that but with limits.

with _prw DSDT.aml.zip

Just Enjoy!

Well, I actually succeeded to remove unused device, and applying patch without have to worry about it applies to another system such as Windows, or other OS by using this

If (_OSI("Darwin"))

for an unused device that doesn't have the _STA method i usually wrap it inside the If Condition so it won't affect on another OS :D  

If (_OSI("Darwin"))
{
	Name (DeviceName._STA, Zero)
}

or if the device itself already has an _STA method i simply create an _INI Method to override the _STA value itself for example:

Method (_INI, 0, NotSerialized)
{
	^DeviceName._STA = Zero
}


Well Of course there's a limit like the current _PTS  and _WAK patch that I recently implemented require a rename through the config.plist

But heck yeah, thanks anyway! i'll definitely gonna learn more to patch using the DSDT :D 👍

Have a nice weekend!

Link to comment
Share on other sites

Well @MaLd0n, you didn’t fully fix sleep/wake… But you’re very darn close to making it work:

 

My computer now goes to sleep properly, but it doesn’t wake up correctly.

(I get a pulsating power button as a confirmation for successfully entering sleep mode.) When I wake up the computer, it does what it did before which is restart, WITH A CATCH. I don’t get a crash report when relogging into the computer afterwards. Placing your DSDT patch in the original EFI has the same effect. Sleep mode works, but waking up doesn't work.

 

I have a feeling that the problem might have to do with the system ejecting ALL of the drives upon entering sleep mode.

This is because I originally had my storage mounted externally on a SATA SSD through USB. I tried physically unplugging the drive after entering sleep mode and it seemed to produce the same result…

 

Then I finally tried seeing if mounting the drive internally would fix things, however, it didn’t seem to make a difference either. I think that if you implement a solution for drive ejection upon entering sleep mode, wake will work properly for me.

 

Also, I don’t know what the heck you did, but you somehow figured out how to perfectly merge half of my kexts and SSDTs so that my system would work as it did originally with less clutter! This is more than I thought I would’ve hoped to get, and should strongly help the compatibility of my computer with system updates/newer versions of macOS. The only things that I had to add back were specifically customized versions of AppleALC (for the Realtek ALC215 codec that I'm currently working on) and WhateverGreen (which contains a brightness patch For AMD Radeon GPUs directly connected to the internal display).

 

Can I ask you though for a favor, if possible? Once we solve sleep/wake (I believe in you), how difficult would it be to convert the sleep/wake fix, and the other patches that you applied into SSDTs? I currently dual boot with Windows 10 through OpenCore, and because DSDTs are injected into other operating systems, your patches affect certain features within Windows which include sound, shutdown, trackpad, and yes, sleep/wake. Worst case scenario, I can switch over to Clover, but I would like to try to stick with OpenCore if possible. If not, I would appreciate it if you could at least create a second version of the DSDT patch that only contains the changes that fix sleep/wake, once we get it working, in order to see how Windows behaves, and so that I can understand what you did.

 

Finally, I don’t know if you noticed, but I’ve been removing OpenCanopy.efi from the Drivers folder. That’s because my bootloader looks like THIS with graphics enabled:

 

1169131401_OpenCoreGraphicsGlitch.thumb.jpg.617cd995cb8dfbd437d296667fed501a.jpg

 

I’d love to have a nice fancy GUI bootloader, but I don’t know how to make it happen. It’s not a priority currently, but if you do know how to fix this, that would be amazing too.

 

Overall man, you’re an absolute godsend and your work is incredible! I’m super thankful to have someone like you helping me out with this! Sleep/wake for this system are beyond my expertise, and I didn’t know if I would be able to even get this far on my own!

Link to comment
Share on other sites

10 hours ago, Fortitude said:

Well @MaLd0n

run this app and send me two files generated in ur desktop

https://olarila.com/files/Utils/ACPIExtractAll.app.zip

10 hours ago, Fortitude said:

Can I ask you though for a favor, if possible? Once we solve sleep/wake (I believe in you), how difficult would it be to convert the sleep/wake fix, and the other patches that you applied into SSDTs? I currently dual boot with Windows 10 through OpenCore, and because DSDTs are injected into other operating systems, your patches affect certain features within Windows which include sound, shutdown, trackpad, and yes, sleep/wake. Worst case scenario, I can switch over to Clover, but I would like to try to stick with OpenCore if possible. If not, I would appreciate it if you could at least create a second version of the DSDT patch that only contains the changes that fix sleep/wake, once we get it working, in order to see how Windows behaves, and so that I can understand what you did

we can. not full but work good.

for one good dual/triple boot with Opencore and full solution we need this way

https://www.olarila.com/topic/13019-hackintosh-dual-boot-with-opencore-with-full-acpi-and-real-vanilla-solution/

Link to comment
Share on other sites

2 hours ago, MaLd0n said:

run this app and send me two files generated in ur desktop

https://olarila.com/files/Utils/ACPIExtractAll.app.zip

 

I generated these files using your latest EFI folder with my versions of AppleALC/WhateverGreen installed.

I'm sending you a third file, just in case, because I figured that there could be a difference between boot logs for starting up after a shutdown versus failed wake. So I generated boot logs for both scenarios.

ACPI .zip bootlog after shutdown.txt bootlog failed wake.txt

Link to comment
Share on other sites

  • 2 weeks later...

Hi @MaLd0n,
I don't know if you've thought of anything lately or if you'd have any suggestions for me to attempt on my end, but I've got some supplementary information to give you that might be extremely important. It only crossed my mind yesterday, and I'm sorry for not thinking of this sooner.

 

To preface, most of the credit for my current configuration goes to this GitHub user:
However, this person hasn't been active in a long time, and I don't know if/when she'll be back.
Unfortunately, I have no other way of getting in touch.

 

She discovered and I can confirm that this particular laptop only works with the SMBIOS for the 2020 27 inch iMac (iMac20,2). This is likely due to the fact that this laptop houses desktop components, and the internal display is directly wired to the AMD graphics card (the iGPU is directly wired to the Thunderbolt output of this computer). By obtaining a Darwin Dump of the iMac, she used it to figure out how to come up with a WhateverGreen backlight patch for this laptop. I'm curious if the ACPI dump and power management information for that particular machine would be beneficial for us to look at in order to brainstorm a compatible wake method?
It's the only other thing that I can think of that might be useful, and you can download it here.

Thanks for your help so far, and happy new year!

Edited by Fortitude
Link to comment
Share on other sites

  • 6 months later...

Hey guys, it’s been a while since I last posted.

Just wanted to let you all know that I recently sorted out the issues for my system.

It turns out that @MaLd0n patched my DSDT perfectly, I just had to disable "Firmware TPM" within the BIOS to fix wake.

I also fixed the glitch issue on the bootloader screen by enabling "DirectGopRendering" within my config.plist.

Thanks again for the help, and sorry for taking so long to figure this out!

 

image.thumb.jpeg.b70faf9db783042da0673bc49e542540.jpeg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...