Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

Hello,Rehabman.

I want to Remove a device called "LID0" and i write a patch in CLover with "LID0 > LIDX" but just like with no use...

How we can remove some devices with hotpatch?
 
Hello,Rehabman.

I want to Remove a device called "LID0" and i write a patch in CLover with "LID0 > LIDX" but just like with no use...

How we can remove some devices with hotpatch?

What problem are you trying to fix?
 
What problem are you trying to fix?

My pad have problem with backlight because it have LID0 device in DSDT but my pad dont have any LID devices.

So i must delete this device to avoid blackscreen.

In traditional method i can delete this device easily but when i use hotpatch it become hard...

I want to know if have some method to avoid or delete some device in DSDT var hotpatch.
 
My pad have problem with backlight because it have LID0 device in DSDT but my pad dont have any LID devices.

So i must delete this device to avoid blackscreen.

In traditional method i can delete this device easily but when i use hotpatch it become hard...

I want to know if have some method to avoid or delete some device in DSDT var hotpatch.

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Hi @RehabMan,
I'm trying to do hotpatch for my laptop battery. I've made the add-on SSDT as per post #1. The SSDT compiled without errors, but I'm not sure I got everything right, especially with this part:
- for the EC fields, create another EC OperationRegion (use a name that is different from the original) and Field definition as a sort of "overlay" which contains only the EC fields you need to patch
- to create the EC overlay, you can use the patched Field/OperationRegion in the patched DSDT, then eliminate unpatched fields
I used the static patch "[bat] HP Pavilion n012tx" from your repo as template. Can you check if there's anything wrong? Thank you so much.
 

Attachments

  • hotpatch battery.zip
    122.3 KB · Views: 81
Hi @RehabMan,
I'm trying to do hotpatch for my laptop battery. I've made the add-on SSDT as per post #1. The SSDT compiled without errors, but I'm not sure I got everything right, especially with this part:

I used the static patch "[bat] HP Pavilion n012tx" from your repo as template. Can you check if there's anything wrong? Thank you so much.

No need for SMDX in the ERM2 field list (it is not accessed, and the offset is wrong anyway).
CUR0 should start at offset 0x83.
Note original position in ERAM:
Code:
                        Offset (0x82), 
                        MBST,   8, //0x82
                        MCUR,   16, //0x83
 
No need for SMDX in the ERM2 field list (it is not accessed, and the offset is wrong anyway).
CUR0 should start at offset 0x83.
Note original position in ERAM:
Code:
                        Offset (0x82),
                        MBST,   8, //0x82
                        MCUR,   16, //0x83
OK, now my battery status works correctly. I've also got the audio working and NVIDIA GPU disabled after following your comprehensive guide (Thank you so much once again!!). Well, I have one more problem. I don't get graphics acceleration at all. I use SSDT-IGPU from your hotpatch repo for my Intel HD 4400. But it seems the properties is not injected somehow. Am I missing something? Problem reporting files attached.
Screen Shot 2017-12-08 at 4.31.26 PM.png
Code:
Premas-MacBook-Pro:~ putuprema$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a954e80 [0x7fffa203d980]> { URL = "AppleBacklightInjector.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.injector.AppleBacklightInjector" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a811c70 [0x7fffa203d980]> { URL = "FakeSMC.kext/ -- file:///System/Library/Extensions/", ID = "org.netkas.driver.FakeSMC" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a811830 [0x7fffa203d980]> { URL = "IntelGraphicsFixup.kext/ -- file:///System/Library/Extensions/", ID = "as.lvs1974.IntelGraphicsFixup" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff147c43e20 [0x7fffa203d980]> { URL = "Lilu.kext/ -- file:///System/Library/Extensions/", ID = "as.vit9696.Lilu" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff147d4ad50 [0x7fffa203d980]> { URL = "VoodooPS2Keyboard.kext/ -- file:///System/Library/Extensions/VoodooPS2Controller.kext/Contents/PlugIns/", ID = "org.rehabman.voodoo.driver.PS2Keyboard" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a7c7ed0 [0x7fffa203d980]> { URL = "VoodooPS2Controller.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.voodoo.driver.PS2Controller" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a7caa50 [0x7fffa203d980]> { URL = "VoodooPS2Trackpad.kext/ -- file:///System/Library/Extensions/VoodooPS2Controller.kext/Contents/PlugIns/", ID = "org.rehabman.voodoo.driver.PS2Trackpad" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a6e0c00 [0x7fffa203d980]> { URL = "FakePCIID.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.driver.FakePCIID" }
Kext with invalid signatured (-67054) allowed: <OSKext 0x7ff147e0b2b0 [0x7fffa203d980]> { URL = "AppleHDA.kext/ -- file:///System/Library/Extensions/", ID = "com.apple.driver.AppleHDA" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a3081f0 [0x7fffa203d980]> { URL = "USBInjectAll.kext/ -- file:///System/Library/Extensions/", ID = "com.rehabman.driver.USBInjectAll" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a2564f0 [0x7fffa203d980]> { URL = "FakePCIID_XHCIMux.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.driver.FakePCIID.XHCIMux" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a18fc80 [0x7fffa203d980]> { URL = "FakePCIID_Intel_HDMI_Audio.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.injector.FakePCIID-Intel-HDMI-Audio" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a17de40 [0x7fffa203d980]> { URL = "CodecCommander.kext/ -- file:///System/Library/Extensions/", ID = "org.tw.CodecCommander" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a1058e0 [0x7fffa203d980]> { URL = "PinConfigs.kext/ -- file:///System/Library/Extensions/AppleALC.kext/Contents/PlugIns/", ID = "as.vit9696.PinConfigs" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff14a104ce0 [0x7fffa203d980]> { URL = "AppleALC.kext/ -- file:///System/Library/Extensions/", ID = "as.vit9696.AppleALC" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff147c217c0 [0x7fffa203d980]> { URL = "ACPIBatteryManager.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.driver.AppleSmartBatteryManager" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff147c1abe0 [0x7fffa203d980]> { URL = "FakePCIID_Intel_HD_Graphics.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.injector.FakePCIID-Intel-HD-Graphics" }
Kext with invalid signatured (-67062) allowed: <OSKext 0x7ff147c14610 [0x7fffa203d980]> { URL = "RealtekRTL8100.kext/ -- file:///System/Library/Extensions/", ID = "com.insanelymac.RealtekRTL8100" }
KernelCache ID: 66BDB0E344FF80BF3B9A2A460E36C8A3
 

Attachments

  • Problem Reporting.zip
    2.2 MB · Views: 90
Hey RehabMan,
I have a few questions about disabling the discrete graphics card. In my case, there is some EC related code in my original _OFF method. The question is do I have to copy/paste the whole code in original _OFF to XOFF and move the EC code to _REG? Or I can just copy the EC code in _OFF to _REG without overriding _OFF method, will that work? Because laptops similar to Z50-70 have different code in _OFF and I'd like to keep it a bit more generic.
Also, do I have to override the relevant _INI method or I can just call the discrete card's _OFF method from any _INI method?
 

Attachments

  • Screen Shot 2017-12-08 at 1.39.25 PM.png
    Screen Shot 2017-12-08 at 1.39.25 PM.png
    38.4 KB · Views: 143
Back
Top