Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

Dear RehabMan, I tried to create a SSDT file for my battery but failed. Here's situation, in Clover/ACPI/Patched folder, I used a hotpatch SSDT file for my laptop and a SSDT file created by ssdtPRGen.sh. When booted, it reported lots of errors related to ACPI, the image and clover folder are attached.
171509380995_.pic.jpg
 

Attachments

  • CLOVER.zip
    2.6 MB · Views: 71
Dear RehabMan, I tried to create a SSDT file for my battery but failed. Here's situation, in Clover/ACPI/Patched folder, I used a hotpatch SSDT file for my laptop and a SSDT file created by ssdtPRGen.sh. When booted, it reported lots of errors related to ACPI, the image and clover folder are attached. View attachment 288988

Well, it seems I already knew the solution, I'll have another try.
 
Dear RehabMan, I tried to create a SSDT file for my battery but failed. Here's situation, in Clover/ACPI/Patched folder, I used a hotpatch SSDT file for my laptop and a SSDT file created by ssdtPRGen.sh. When booted, it reported lots of errors related to ACPI, the image and clover folder are attached. View attachment 288988

The content you have in Field(ERM0...) is wrong. It is defining symbols that are already defined in DSDT.aml.

See example in the guide (post #2).
 
The content you have in Field(ERM0...) is wrong. It is defining symbols that are already defined in DSDT.aml.

See example in the guide (post #2).

Emm... Failed again. But this time, it booted successfully, however, still no battery status. I recorded the login verbose screen, found some error, first one is a kind of error like "ACPI ERROR: _PSS AE_ALREADY_EXIST", however, I didn't add anything related "_PSS" in my DIY SSDT files or in config.plist.

Second, there's a bunch of errors like "......XBST AE_BAD_PARAMETER" and other AE_BAD_PARAMETERs, the original method of "XBST" is named "GBST", since I have one method with the same name in my custom SSDT file, I renamed it to "XBST" in config.plist. "XBIF" is similar to this.

201509420893_.pic_hd.jpg.png
 

Attachments

  • CLOVER.zip
    2.6 MB · Views: 86
Emm... Failed again. But this time, it booted successfully, however, still no battery status. I recorded the login verbose screen, found some error, first one is a kind of error like "ACPI ERROR: _PSS AE_ALREADY_EXIST", however, I didn't add anything related "_PSS" in my DIY SSDT files or in config.plist.

Second, there's a bunch of errors like "......XBST AE_BAD_PARAMETER" and other AE_BAD_PARAMETERs, the original method of "XBST" is named "GBST", since I have one method with the same name in my custom SSDT file, I renamed it to "XBST" in config.plist. "XBIF" is similar to this.

View attachment 289084

"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
hello RehabMan,
i was trying to hotpatch ACPI for battery status i create a SSDT-BATT.aml and it is not working. battery status shows 0% while charging but shows not charging and if i plug out it shows 97 %
As static patching battery is working fine .
can you guide me for the hotpatch ACPI for battery status
problem reporting files are attached
 

Attachments

  • problem reporting files.zip
    3.2 MB · Views: 84
hello RehabMan,
i was trying to hotpatch ACPI for battery status i create a SSDT-BATT.aml and it is not working. battery status shows 0% while charging but shows not charging and if i plug out it shows 97 %
As static patching battery is working fine .
can you guide me for the hotpatch ACPI for battery status
problem reporting files are attached

It is plain to see your offsets for the patched EC fields are wrong. I only had to get to the second one to see a mistake.
From your DSDT, with offset comments:
Code:
                Offset (0xA0), 
                CAP0,   16, //a0
                RCP0,   16, //a2
                VOT0,   16, //a4

Assuming DAP0/DAP1 is CAP0 and WOT0/WOT1 is VOT0, notice you have incorrect offsets:
Code:
            Offset (0xA0), 
            DAP0,   8, //a0 (correct)
            DAP1,   8, //a1 (correct)
            WOT0,   8, //a2 (wrong)
            WOT1,   8, //a3 (wrong)

Hotpatch requires you pay attention to what you're doing.
 
It is plain to see your offsets for the patched EC fields are wrong. I only had to get to the second one to see a mistake.
From your DSDT, with offset comments:
Code:
                Offset (0xA0),
                CAP0,   16, //a0
                RCP0,   16, //a2
                VOT0,   16, //a4

Assuming DAP0/DAP1 is CAP0 and WOT0/WOT1 is VOT0, notice you have incorrect offsets:
Code:
            Offset (0xA0),
            DAP0,   8, //a0 (correct)
            DAP1,   8, //a1 (correct)
            WOT0,   8, //a2 (wrong)
            WOT1,   8, //a3 (wrong)

Hotpatch requires you pay attention to what you're doing.

Thanks;
is this the correct one ?
i got the offsets from crackself in post #224
origin ACPI and SSDT-BATT.dsl are attached
 

Attachments

  • origin.zip
    63 KB · Views: 67
  • SSDT-BATT.dsl.zip
    2.1 KB · Views: 77
Hi, RehabMan.
The AppleBacklightInjector.kext cannot load but with miniDP works fine.
I checked DSDT, found some of "VID" didn't change to "IGPU", then I tried to solve it but failed:
- when I enable the second patch in config/ACPI/DSDT/patch
- or just simply rename all the "VID" to "IGPU"
AppleBacklightInjector.kext still cannot load, what's worse is when I plugin miniDP device, the screen flashed to black, then both of the two monitors stuck there.
Any ideas about it? Thanks a lot.

BTW:
It seems something wrong with USBInjectAll.kext, info.plist/IOKitPersonalities/ConfigurationData/Configuration/8086_9cb1, the ports with prefix "HS" except "HS06 HS07 HS08", the UsbConnector should be 0, otherwise, it will result in "USB device needs power" problems, hope you check it. (My laptop is Thinkpad W550s, has the same USB ports with T450s)
 

Attachments

  • Problem Reporting Files.zip
    2.8 MB · Views: 74
Thanks;
is this the correct one ?
i got the offsets from crackself in post #224
origin ACPI and SSDT-BATT.dsl are attached

It looks like you're making a better effort. Suggest you double check everything and test.
 
Back
Top