Contribute
Register

[Guide] How to patch DSDT for working battery status

remove SMC* kexts from clover/kexts/other as they don't work with FakeSMC

or remove FakeSMC* and ACPIBatteryManager.kext and install VirtualSMC.kext
I removed ACPIBatteryManager.kext and installed VirtualSMC.kext.
If I don't put DSDT in CLOVER/ACPI/patched I can get into the system but the battery always stuck at 100%.
If I put the original DSDT in patched folder I can't get into the system and It shows panic.
After I change Return((0x0F) to (0x1F) and put changed DSDT into the patched folder I can successfully get into the system but Energy Saver shows current battery charge 0%, and I can't choose "show battery status in menu bar"
Screen Shot 2020-04-18 at 17.52.19.png
Screen Shot 2020-04-18 at 18.10.19.png
 
Last edited:
I have put VirtualSMC.kext SMCBatteryManager.kext files in CLOVER/kexts/Other; but the battery indicator still not working. IOreg shows no battery installed. how to fix it
 

Attachments

  • Screen Shot 2020-04-24 at 3.50.09 PM.png
    Screen Shot 2020-04-24 at 3.50.09 PM.png
    1.1 MB · Views: 104
no battery installed
A battery in an Intel NUC...? Or are you hacking a laptop? in this last case add the relevant information...

However, almost impossible to help you, report files as per below guide are missing
 
I am sorry for the confusion. I have completed the NUC Hackintosh. I am working now on huawei matebook x Pro (i7+intel 620+ MX250) on which I have the battery problem. I am attaching the problem report.
 

Attachments

  • debug_23134.zip
    14.6 MB · Views: 100
Last edited:
@HMB Carefully read the report guide. IORegistryExplorer file is missing (.txt is almost useless).

Two Battery manager installed, SMCBatteryManager and RM AppleSmartBatteryManager (ACPIBatteryDriver)
If you're planning to use SMC, remove ACPIBatteryDriver

However, your ACPI _BAT0 method is returning _STA = 0, this means no battery (0x1F mandatory).
Your ACPI needs the following patch, as a minimum (not only).
Code:
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x1F)
            }
There're some ACPI errors, look at kernel.log, all of them related to EC.
You have to fix EC before patching for battery
Most probably you also need device rename HWEC to EC
Always post problem report files, many user could help you easier.
 
After following along with the example, I am trying to do this to my own DSDT, but applying the patch "into device label EC code_regex HWAC,\s+16, replace_matched begin WAC0,8,WAC1,8, end;" doesn't produce any errors when trying to compile. There were initially 3 occurrences of HWAC, 2 after that patch. Is there a reason this won't throw errors/will this cause problems down the road?

The only error I get when trying to compile after applying that first patch is "152, 6126, syntax error, unexpected PARSEOP_NAME" which refers to the line "Name (SS4, One)". Is this error related (even though I think it was there before I applied this first patch)? And how would I fix this error?

When I was following along with the example I didn't run into either of these problems (and I don't think I'm doing anything differently) so I am confused as to why this is happening.

Thanks in advance!

UPDATE: I fixed it by commenting out two lines before "Name (SS4, One)" which got rid of that error. Now the errors I was expecting to see from applying the patch show up
 

Attachments

  • DSDT.dsl
    945.1 KB · Views: 81
Last edited:
Please help me fix my laptop's battery status on Catalina. I have attached the Problem Reporting zip. I have followed this guide and applied a patch from Rehab's repo. There were no compilation errors, but my laptops battery is stuck at 1%. It behaves as if I have not patched my DSDT but just added the VirtualSMC kext. My laptop model is HP Pavilion-15 r022tx. Thanks in advance.
 

Attachments

  • debug_28330.zip
    879.6 KB · Views: 73
Please help me fix my laptop's battery status on Catalina. I have attached the Problem Reporting zip. I have followed this guide and applied a patch from Rehab's repo. There were no compilation errors, but my laptops battery is stuck at 1%. It behaves as if I have not patched my DSDT but just added the VirtualSMC kext. My laptop model is HP Pavilion-15 r022tx. Thanks in advance.
missing your clover folder
 
@Feartech Sorry for the trouble, I'm using OpenCore and booting from USB. What information I should extract from USB EFI for you ?
 
@Feartech Sorry for the trouble, I'm using OpenCore and booting from USB. What information I should extract from USB EFI for you ?
ahh, ok, then that debug script doesn't work for OC

you will have to zip and upload your OC folder
 
Back
Top