Jump to content

[solved] Need help with SSDT-PNLF and wake from sleep issue.


25 posts in this topic

Recommended Posts

When using Standard SSDT-PNLF.aml ACPI patch from Dortania  I can adjust brithness, but after wake up from sleep with key press or mouse click the intenal screen pannel remains black ( audio continues to play)

The problem for wake from sleep  issue come from SSDT-PNLF, removing it solve the wakup issue, but no more brightness setting.

I've try to build a new one from SSDTTime , it activates the brithness cursor without setting result. Adding to this same wakup issue from sleep.

 

How to get boths working, I'm turning arround.

System is the Haswell Acer from my signature, MacOS Sonoma, SMBIOS MacBook Pro 16,1 . Latests kexts and Opencore.

Edited by Thebes Knossos

I've downgade SMBIOS to MacBookPro11,1 because HDMI port is not working for Macbookpro16,1 .

The wake problem is only for internal LVDS pannel, the external monitor got signal at wake from sleep.

Strange situation, WhateverGreen bug ?

Partially resolved with boot-arg igfxagdc=0 .

With this boot-arg internal screen comes back, but now  Brithness control bar in control center is grayed.

In system setting in can still adjust with Monitor panel

 

Edit

Changed with adding disable-agdc at 1 for  iGPU (DeviceProperty , add)

This setting restores Brithness control bar in control center

Solved

AbotSonoma.png

Edited by Thebes Knossos

igfxagdc=0 (boot-arg) and disable-agdc (DeviceProperty) are WhateverGreen properties that are the same.

Screenshot2025-10-16at9_44_33AM.png.93a5ab87e0325f48dede5be770e3762d.png

 

An inspection of ./WhateverGreen/kern_igfx.cpp source shows that WhateverGreen accepts them as the same property

void IGFX::AGDCDisabler::processKernel(KernelPatcher &patcher, DeviceInfo *info) {
        int agdc = info->videoBuiltin->getProperty("disable-agdc") != nullptr ? 0 : 1;
        PE_parse_boot_argn("igfxagdc", &agdc, sizeof(agdc));
        enabled = agdc == 0;
}

 

If both the boot-arg and the DeviceProperty are specified, the boot-arg overrides the DeviceProperty.

Thanks for your response. Yes I've seen. I had a little problem with the one trik from boot-args, some times it didn't restore  the slider in general setting after wake up (grayed out) so i prefer put the other in device DeviceProperty it works now for 100% of time.

 

I'm now on an other problem not solved on laptop

I have correct mapping for USB, all is working fine.

After first sleep + wake, Usb2 devices mapped correcly to HS0x pins  before system sleep moves to EHC1 !

They continue to work correctly.

But after a second sleep computer wakes up directly by itself. (auto-wakeup)

I haven't see any error in logs at now.

Only solution : reset NVRAM at picker, this keeps the USB3 mapping after sleep and no more auto wakup.

It's not a well solution because i need to do this each time i come from Windows ou Linux. Windows/Linux  maps usb2 devices to ehc1 controler like after wake up under MacOs, and seems a variable in NVRAM is written by them. 

I don't know i this can be corrected by settings in NVRAM delete section in config.list. 

Edited by Thebes Knossos

I've solved the EHCI remapping auto wake off issue.

From log

 

pmset -g log | grep -e "Sleep.*due to" -e "Wake.*due to"

....

2025-10-21 12:55:03 +0200 Sleep                   Entering Sleep state due to 'Software Sleep pid=163': Using AC (Charge:100%) 7 secs    
2025-10-21 12:55:10 +0200 Wake                    Wake from Deep Idle [CDNVA] : due to EHC1 XHC HDEF/HID Activity Using AC (Charge:100%)           

 

Solved with https://github.com/dortania/OpenCore-Post-Install/blob/master/usb/misc/instant-wake.md

Adding   GPRW to XPRW rename Patch  solve this issue. Don't install  SSDT-GPRW.aml, you will lose all USB ports after wakeup on this Acer.

 

Now searching to map a sleep buttton. (at present it works via menu or command line)

   
Edited by Thebes Knossos
2 hours ago, Thebes Knossos said:

I've solved the EHCI remapping auto wake off issue.

From log

 

pmset -g log | grep -e "Sleep.*due to" -e "Wake.*due to"

....

2025-10-21 12:55:03 +0200 Sleep                   Entering Sleep state due to 'Software Sleep pid=163': Using AC (Charge:100%) 7 secs    
2025-10-21 12:55:10 +0200 Wake                    Wake from Deep Idle [CDNVA] : due to EHC1 XHC HDEF/HID Activity Using AC (Charge:100%)           

 

Solved with https://github.com/dortania/OpenCore-Post-Install/blob/master/usb/misc/instant-wake.md

Adding   GPRW to XPRW rename Patch  solve this issue. Don't install  SSDT-GPRW.aml, you will lose all USB ports after wakeup on this Acer.

 

Now searching to map a sleep buttton. (at present it works via menu or command line)

   

you need SSDT-GPRW.aml or the patch doesn't work

  • Like 1

No it's opposite here, without it's working , with it not working.

Please read my post from sunday. It's an old Acer with EHCI and XHC Usb ports. I use it multi booting Windows Linux and MacOs. Each time i come from Linux or Windows I need to reset nvram without this GPRW. renaming. Under Windows and Linux USB2 ports are mapped to EH1 controller:

 

UsbTreeW10.thumb.PNG.d75603da0a8f371c52e7acd53e7d2059.PNG

Edited by Thebes Knossos
10 minutes ago, Thebes Knossos said:

No it's opposite here, without it's working , with it not working.

Please read my post from sunday. It's an old Acer with EHCI and XHC Usb ports. I use it multi booting Windows Linux and MacOs. Each time i come from Linux or Windows I need to reset nvram without this GPRW. renaming. Under Windows and Linux USB2 ports are mapped to EH1 controller:

 

UsbTreeW10.thumb.PNG.d75603da0a8f371c52e7acd53e7d2059.PNG

assuming then you are using the correct file and patch as per your DSDT? also check to make sure your USB ports are also setup correctly 

Agree with @feartech -  Renaming GPRW to XPRW without the corresponding new definition of GPRW in SSDT-GPRW just causes an ACPI error when GPRW is called.  You've simply 'deleted' the GPRW method.

 

Without the Open Core config.plist, SSDT patches and original unpatched DSDT, it's hard to tell.

 

Also, if GPRW -> XPRW rename (and any other required _PRW patches) are done correctly, a new SSDT-GPRW won't break anything.

  • Like 1

No ACPI error here. 

My UsbMapping, very simple:

Capturedecran2025-10-21a23_22_02.png.381417a585caa5224354d2acb4d0eb9d.png

 

And IOREG after 2 sleep + wake. All USB are back. With adding  the .aml i lose immediatly all USB at wake. I post my OC folder tomorrow, it's late here.

 

Capturedecran2025-10-21a23_29_57.thumb.png.ae61257722924881e91e7866b4e42515.png

3 minutes ago, Thebes Knossos said:

No ACPI error here. 

My UsbMapping, very simple:

Capturedecran2025-10-21a23_22_02.png.381417a585caa5224354d2acb4d0eb9d.png

 

And IOREG after 2 sleep + wake. All USB are back. With adding  the .aml i lose immediatly all USB at wake. I post my OC folder tomorrow, it's late here.

 

Capturedecran2025-10-21a23_29_57.thumb.png.ae61257722924881e91e7866b4e42515.png

what is HS06 supposed to be? and why is set to internal?

DSDT extracted with MacIASL is the DSDT AFTER your patches are applied.  If you're asking for others to help you and/or you want to be helpful to others, you would need to post your original, unpatched DSDT, your config.plist (which shows your Open Core ACPI patches) and your OC/ACPI folder with your SSDTs.

 

EDIT: @Thebes Knossos The "bug" that you believe you have found in WhateverGreen which requires you to use the DeviceProperty disable-agdc instead of the boot-arg igfxagdc=0 is most likely because NVRAM is not working properly on your hackintosh.  Learn more about properly implementing NVRAM on older hacks.  If the WhateverGreen boot-arg wasn't working, I'd have seen it on my hacks that use the boot-arg (and they all work perfectly).

Edited by deeveedee
  • Like 1

My OC folder. AttachedOC_SONOMA_ACER.zip

Concerning DSDT extract pre patch, my F5 key to do it with Opencore is broken. I've done it with SSDTTIME under Linux, attached DSDT.aml

Edited by Thebes Knossos

Was working, but finally I've done a less aggressive patch.

Only XHC need this, modify :

         Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x03))
            }

to 

         Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x00, 0x00))
            }

 via ACPI patch .

Edited by Thebes Knossos
  • Like 1
4 hours ago, Thebes Knossos said:

Was working, but finally I've done a less aggressive patch.

Only XHC need this, modify :

         Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x03))
            }

to 

         Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x00))
            }

 via ACPI patch .

so you checked your original unpatched DSDT and have now used the correct aml file and Find and Replace config.plist entry and now it all works?

It was working with previous posted OC structure, but I had ACPI error in log without side effects in session.

 

I've modified the patch (still without .aml file) to patch power wake ressource to null for only XHC :

Search 47 50 52 57 0A 6D 0A 03 5B 82 46 

Replace: 47 50 52 57 0A 00 0A 00 5B 82 46 

Result:

 

Capturedecran2025-10-30a15_26_30.png.a59b442fa03ada8e71aa5cf0fe615085.png

@Thebes Knossos That's a good patching technique if you don't need to have an If (_OSI("Darwin")) condition for booting Windows with Open Core.  The Open Core ACPI > Patch patches ACPI for all OSes booted with Open Core.

 

The proper "instant wake" patch changes (0x6D, 0xYZ) to (0x6D, 0x00) and not to (0x00, 0x00).  If you want to implement the traditional instant wake patch with your technique, your Replace should be Replace: 47 50 52 57 0A 6D 0A 00 5B 82 46

Edited by deeveedee

I've made more tests and nor 00,00 nor 6D,00 (my first attempt) patch gives satisfation in all returns from multi booting (Windows or Linux)

But finally I have found the trick.

 

The solution is to patch a fake Ressouce as Method  

Extract from iasl -l:

Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
{

    AE2D: 14 0F 5F 50 52 57 00                             // .._PRW.

to 

Method (XPRW, 0, NotSerialized)  // Fake ressource
{

    AE2D: 14 0F 58 50 52 57 00                             // ..XPRW.  

 

Applied 3 times (Thoses with Return (GPRW (0x6D, 0x0x))  : EHC1 and XHC and HDEF

 

complete patch:

 

                        <dict>
                                <key>Base</key>  
                                <string></string>   
                                <key>BaseSkip</key>   
                                <integer>0</integer>
                                <key>Comment</key>
                                <string>_PRW to XPRW for 3 first conditions, avoids USB Swap to EHC1 after system sleep </string>
                                <key>Count</key>
                                <integer>3</integer>
                                <key>Enabled</key>
                                <true/>
                                <key>Find</key>               
                                <data>FA9fUFJXAA==</data>
                                <key>Limit</key>    
                                <integer>0</integer>
                                <key>Mask</key> 
                                <data></data>
                                <key>OemTableId</key>
                                <data></data>
                                <key>Replace</key>
                                <data>FA9YUFJXAA==</data>
                                <key>ReplaceMask</key>
                                <data></data>
                                <key>Skip</key>
                                <integer>0</integer>  
                                <key>TableLength</key>
                                <integer>0</integer>
                                <key>TableSignature</key>
                                <data>RFNEVA==</data>
                        </dict>

Ah concerning intant wake I had RTC wakes too, solved via this EXCELLENT post (I've apply the spoiler patch from first post). 100 % OK too since 1 week: 

https://www.tonymacx86.com/threads/solved-ventura-sonoma-random-scheduled-pm-wake-from-sleep.323359/

And I'll keep SMBIOS MacBOOKPro11,1 on this old ACER, started with SMBIOS above, some Bluetooth services are added in backgound for Sonoma.

  • Like 1

@Thebes Knossos I am seeing strange behavior with the customary GPRW -> XPRW instant wake patch that I have described here.  Because of the nature of the problem, I'm not sure if it is actually a problem with the patch as implemented in Open Core or a problem with the way MaciASL reads the patched DSDT.

I think MaciASL have no problem, hes only problem it diden't gives Hex values, that's wy i use tle command line under Linux for complete disassembly (opcodes + hex values). My little experience it is working better with complete hex values prefix for the search part.

Concerning the GPRW retun values , some says patch it to  09, 04 like here https://github.com/grvsh02/A-guide-to-completely-fix-sleep-wake-issues-on-hackintosh-laptops/blob/main/README.md

Here my reference for that https://github.com/laobamac/OC-little-zh/blob/main/04_Fixing_Sleep_and_Wake_Issues/060D_Instant_Wake_Fix/README.md#removing-the-_prw-method-from-the-dsdt-completely

At end of page it is written  Removing the _PRW method from the DSDT completely
Instead of modifying the the return packages of the _PRW method, removing the method from the DSDT is also an option.

Here an other one says faking the _PRW string (he use ZPRW :) ) 

 

Répondre à ce sujet...
Edited by Thebes Knossos
×
×
  • Create New...