Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
Apr 1, 2017
Messages
7
Motherboard
HP Pavilion G6-1002TX
CPU
i5-2520M
Graphics
HD3000/AMD Radeon HD 6470M
Mobile Phone
Android, iOS
Hi @RehabMan,

I'm not familiar with the DSDT/SSDT and ACPI :(
I tried installing catalina on my ThinkPad T490 for 2 weeks :( I finally succeeded! :headbang:
But my hackintosh does not show battery status (always 0% - not show on task bar), and HDIM not working too.
(everything else works ok, e.g.: ethernet, sound, usb, touchpad, backlight...)

I know that I have to make some patches, but I can't :(

Could you please help me? if not, never mind and please ignore me :)

Thank you so muchhhh,
Huy

P/S: Sorry for my English.
 

Attachments

Last edited:
Joined
Nov 25, 2011
Messages
41
Motherboard
Dell Inspiron 7720 17R SE
CPU
i7-3840QM
Graphics
HD 4000
Classic Mac
PowerBook
Mobile Phone
Android
Hello, is it possible to patch my Dell 7720 for an 3rd-party 7800 mAh battery? I don't get any warnings, and in Mojave the battery menu item quits immediately.
 
Joined
Nov 10, 2015
Messages
114
Motherboard
Clevo 970EF Defiance VI - OpenCore
CPU
i7-8750H/HM370
Graphics
UHD630, RTX 2070, 1920x1080
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
128K, iMac, PowerBook
Mobile Phone
iOS
Could you please help me?
Necessary files missing...
Carefully follow the below guide

... and your Clover/kext/other folder is not correctly setup.
You may need to remove the below kexts to avoid conflicts:
SMCBatteryManager.kext
SMCProcessor.kext
SMCSuperIO.kext
 
Last edited:
Joined
Apr 1, 2017
Messages
7
Motherboard
HP Pavilion G6-1002TX
CPU
i5-2520M
Graphics
HD3000/AMD Radeon HD 6470M
Mobile Phone
Android, iOS
Necessary files missing...
Carefully follow the below guide
Hi @FreeJHack,
I have re-uploaded new file in attachment.
Minor note: when I run script gen_debug, it alway fail at "check internet connection" step, I must change testURL to "google.com"
Screenshot at Apr 13 11-27-43.png

Screenshot at Apr 13 11-28-50.png


... and your Clover/kext/other folder is not correctly setup.
You may need to remove the below kexts to avoid conflicts:
SMCBatteryManager.kext
SMCProcessor.kext
SMCSuperIO.kext
I removed them.

Thank you for your help.
Huy
 

Attachments

Joined
Nov 10, 2015
Messages
114
Motherboard
Clevo 970EF Defiance VI - OpenCore
CPU
i7-8750H/HM370
Graphics
UHD630, RTX 2070, 1920x1080
Mac
iMac, MacBook Pro, Mac mini
Classic Mac
128K, iMac, PowerBook
Mobile Phone
iOS
@hh3003it, you have a lot ACPI errors.
Look at Kernel.log
You added patches without the required SSDT pair files:
change _OSI to XOSI, pair with SSDT-XOSI.aml
change Method(GPRW,2,N) to XPRW, pair with SSDT-GPRW.aml
change Method(_PTS,1,N) to ZPTS, pair with SSDT-PTSWAK.aml

I'm not familiar with the DSDT/SSDT and ACPI
DSDT/SSDT patching is necessary for your laptop, you should be familiar with below guide
 
Joined
Apr 1, 2017
Messages
7
Motherboard
HP Pavilion G6-1002TX
CPU
i5-2520M
Graphics
HD3000/AMD Radeon HD 6470M
Mobile Phone
Android, iOS
@hh3003it, you have a lot ACPI errors.
Look at Kernel.log
You added patches without the required SSDT pair files:
change _OSI to XOSI, pair with SSDT-XOSI.aml
change Method(GPRW,2,N) to XPRW, pair with SSDT-GPRW.aml
change Method(_PTS,1,N) to ZPTS, pair with SSDT-PTSWAK.aml


DSDT/SSDT patching is necessary for your laptop, you should be familiar with below guide
Hi @FreeJHack,
I will try!! Thanks for your suggestion ;)
 
Joined
Oct 21, 2012
Messages
209
Motherboard
Gigabyte GA-B85M-D3H-A
CPU
i5-4460
Graphics
HD 7770
Mac
iMac
Mobile Phone
Android, iOS
Can anyone help me how to get rid of this log error.
Screenshot 2020-04-17 at 09.54.55.png

I have OpenCore 0.57 - macOs 10.15.3 (19D2064) - G50-70
I only have hotpatches - i tried repeatedly to insert
Code:
#RehabMan: fixing BAT0._STA logic bug
into method label _STA parent_label BAT0 code_regex ([\s\S]*) replace_matched
begin
If(!ECON) { Return(0xf) }\n
%1
end;

I have no idea where to put that into SSDT-BATT.aml and whether this is the right method in my case.
Thanks in advance.
 

Attachments

Last edited:
Joined
Apr 18, 2020
Messages
2
Motherboard
Microsoft Corporation Surface Pro
CPU
Intel(R) Core(TM) i5-7300U CPU @2.60GHz
Graphics
Intel(R) HD Graphics 620
Hi, I'm having problems patching my DSDT to make battery indicator work on my surface pro 5.
I changed
Code:
Method (_STA, 0, NotSerialized)  // _STA: Status
{
    Return (0x0F)
}
to
Code:
Method (_STA, 0, NotSerialized)  // _STA: Status
{
    Return (0x1F)
}
And now I can successfully enter the MacOS with ACPIBatteryManager.
But the battery always shows 100% and Replace Now with an exclamation mark.
Because there is no EC in DSDT so I don't know what to do next.
I would need some help, Thanks a million.
屏幕快照 2020-04-18 16.34.39.png
1.jpg
2.jpg
3.jpg
 

Attachments

Last edited:

Feartech

Moderator
Joined
Aug 3, 2013
Messages
17,887
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
iMac
Mobile Phone
iOS
Hi, I'm having problems patching my DSDT to make battery indicator work on my surface pro 5.
I changed
Code:
Method (_STA, 0, NotSerialized)  // _STA: Status
{
    Return (0x0F)
}
to
Code:
Method (_STA, 0, NotSerialized)  // _STA: Status
{
    Return (0x1F)
}
and now I can successfully enter the MacOX with ACPIBatteryManager.
But the battery always shows 100% and Replace Now with an exclamation mark.
Because there is no EC in DSDT so I don't know what to do next.
I would need some help, Thanks a million.
View attachment 463344View attachment 463345View attachment 463346View attachment 463348
remove SMC* kexts from clover/kexts/other as they don't work with FakeSMC

or remove FakeSMC* and ACPIBatteryManager.kext and install VirtualSMC.kext
 
Joined
Apr 18, 2020
Messages
2
Motherboard
Microsoft Corporation Surface Pro
CPU
Intel(R) Core(TM) i5-7300U CPU @2.60GHz
Graphics
Intel(R) HD Graphics 620
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:
Top