Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
Aug 20, 2019
Messages
1
Motherboard
x441uv
CPU
Core i3-6006
Graphics
Intel HD 520 + Nvidia gt920mx
Mobile Phone
Android
Anonyone can help me?
I'm patch battery status using patch Asus vivobook sir rehabman
but when compiling the file parseop_zero and parseop_scope errors occur
sorry for my bad english
thanks
 

Attachments

Joined
Dec 20, 2018
Messages
325
Motherboard
Gigabyte Z370 AORUS Gaming 7
CPU
i7-8700K OC 5GHz
Graphics
GTX 1080 Ti & UHD 630
Mac
iMac, MacBook Pro
Mobile Phone
iOS
I am using a DELL Inspiron 5370 which has a 38 Wh battery. Even though the laptop is only 9 months old, the Battery indicator shows Service Battery. I went through my DSDT, but I could not find any register that is over 8 bits. Hence, I am not sure if that requires patching.

I am attaching my PR files, @RehabMan , would you care to have a look?
did you get this figured out? I'm having this same issue
 
Joined
Jun 27, 2019
Messages
4
CPU
i7-4810mq
Graphics
HD4600; HD8670M
Mac
MacBook Air
Mobile Phone
Android
I successfully enabled battery indicator on the up right cornor. But I noticed it gradually destorying my battery, since every time I charged battery from 0% to 100%, the full battery capacity decreased by 32mAh(checked from system report). Now it has dropped from 4400mAh to 3872mAh. What can I do now?
 

Attachments

Joined
Jun 5, 2018
Messages
25
Motherboard
ROG STRIX Z370-H Gaming
CPU
i5-8600K
Graphics
GTX 1080
Mobile Phone
iOS
Next we need to determine the offsets within the EC that these fields are placed. Keep in mind the sizes are in bits, but the offsets are in bytes. The offsets I have in the comments below are in hex. See if you can come up with the same numbers.
Code:
Field (ECOR, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0xA0),
                        SBMX,128,//SBMN,128
                    }

                    Field (ECOR, ByteAcc, NoLock, Preserve)
                    {
                        Offset (0xA0),
                        SBDX,128,//SBDN,128
                    }
I have 0xA0 as Offset. Is something wrong here?

And also, the compiler shows this error
Screen Shot 2019-09-27 at 21.25.13.png

in this line:
Name (_IRC, 0x00) // _IRC: Inrush Current

help please
 

Attachments

Joined
Jun 2, 2011
Messages
24
Motherboard
NUC6 Skull Canyon
CPU
I7-6770HQ
Graphics
Iris Pro 580
Mac
MacBook Air
I try to start the edit for a new battery (chuwi aerobook), I save the DSDT and decompile, but when I open with MaciASL.
I start to edit and found only the first line with "EmbeddedControl" but after when the guide tell to search BDN0 I didn't find... I'm little confused.

I attach here the DSDT (both decompiled and to decompile)
Hi Yota79, were you able to get anywhere with this?
 
Joined
Nov 29, 2015
Messages
10
Mac
Classic Mac
Mobile Phone
Android, iOS
I have been using hackintoshes since snow leopard and have always been a fan. When I used El Capitan I faced this issue where there was no battery status. I fixed it by patching DSDT at that time. After long time I installed a fresh installation of macOS Mojave on a new drive and to my SURPRISE, it showed battery percentage in the status bar by default. I was so happy that I now don't have to patch DSDT/SSDTs. But to my disappointment, the next day when I booted the same macOS, there was no battery percentage. I tried a few things and then without wasting any time I started with DSDT patching.
1) I patched the HP Spectre XT patch as it solved all the 8-bit issues from DSDT (no errors).
2) I saved the patched file as ASL file and then renamed it to DSDT-Battery.aml.
3) I put this file in EFI/CLOVER/ACPI/PATCHED dir.
4) Install ACPIBatteryManager kext from rehbman downloads.

Now all I can see is 0% battery in the statusbar. I have tried everything and nothing works.
Can someone help me with this?

I have attached the details with this thread.

Hardware specifications:
Intel Core i5-4210U with Intel HD Graphics 4400 (1.7 GHz, 3 MB cache, 2 cores)
12 GB 1600 MHz DDR3L SDRAM (8 + 4 GB)
NVIDIA GeForce 820M (2 GB DDR3 dedicated)
500 GB 5400 rpm SATA

Thanks in advance.
 

Attachments

Joined
Jan 15, 2010
Messages
124
Motherboard
HP Omen 17-an011na
CPU
i7-7700HQ/HM175
Graphics
GTX 1050, HD 630
Mac
Mac Pro
Classic Mac
iMac, Power Mac
Mobile Phone
Android
I have been using hackintoshes since snow leopard and have always been a fan. When I used El Capitan I faced this issue where there was no battery status. I fixed it by patching DSDT at that time. After long time I installed a fresh installation of macOS Mojave on a new drive and to my SURPRISE, it showed battery percentage in the status bar by default. I was so happy that I now don't have to patch DSDT/SSDTs. But to my disappointment, the next day when I booted the same macOS, there was no battery percentage. I tried a few things and then without wasting any time I started with DSDT patching.
1) I patched the HP Spectre XT patch as it solved all the 8-bit issues from DSDT (no errors).
2) I saved the patched file as ASL file and then renamed it to DSDT-Battery.aml.
3) I put this file in EFI/CLOVER/ACPI/PATCHED dir.
4) Install ACPIBatteryManager kext from rehbman downloads.

Now all I can see is 0% battery in the statusbar. I have tried everything and nothing works.
Can someone help me with this?

I have attached the details with this thread.

Hardware specifications:
Intel Core i5-4210U with Intel HD Graphics 4400 (1.7 GHz, 3 MB cache, 2 cores)
12 GB 1600 MHz DDR3L SDRAM (8 + 4 GB)
NVIDIA GeForce 820M (2 GB DDR3 dedicated)
500 GB 5400 rpm SATA

Thanks in advance.
Have you tried a hard reset by holding the power button for 20 or so seconds with power etc disconnected? corruption can occur and stop a working patch. Also try naming it DSDT.aml.
 
Joined
Nov 29, 2015
Messages
10
Mac
Classic Mac
Mobile Phone
Android, iOS
Have you tried a hard reset by holding the power button for 20 or so seconds with power etc disconnected? corruption can occur and stop a working patch. Also try naming it DSDT.aml.
Yes I have tried both these things.. Does my DSDT look good?
Thanks man..
 
Joined
Apr 14, 2013
Messages
82
Motherboard
Aorus Z370 Gaming 7
CPU
i7 8700K
Graphics
GTX 970
Mobile Phone
iOS
I made a patch for my HP ProBook 430 G6. Seems to be working normally, haven't tested extensively yet though. Here it is in case anyone is interested:
Code:
into device label EC0 code_regex BDC,\s+16 replace_matched begin DC0,8,DC1,8 end;
into device label EC0 code_regex BFC,\s+16 replace_matched begin FC0,8,FC1,8 end;
into device label EC0 code_regex BRTE,\s+16 replace_matched begin RTE0,8,RTE1,8 end;
into device label EC0 code_regex BME,\s+16 replace_matched begin ME0,8,ME1,8 end;
into device label EC0 code_regex BDV,\s+16 replace_matched begin DV0,8,DV1,8 end;
into device label EC0 code_regex BCV1,\s+16 replace_matched begin CV10,8,CV11,8 end;
into device label EC0 code_regex BATE,\s+16 replace_matched begin ATE0,8,ATE1,8 end;
into device label EC0 code_regex BPR,\s+16 replace_matched begin BPR0,8,BPR1,8 end;
into device label EC0 code_regex BCR,\s+16 replace_matched begin CR0,8,CR1,8 end;
into device label EC0 code_regex BRC,\s+16 replace_matched begin RC0,8,RC1,8 end;
into device label EC0 code_regex BCC,\s+16 replace_matched begin CC0,8,CC1,8 end;
into device label EC0 code_regex BPV,\s+16 replace_matched begin PV0,8,PV1,8 end;
into device label EC0 code_regex BCV2,\s+16 replace_matched begin CV20,8,CV21,8 end;
into device label EC0 code_regex BCV3,\s+16 replace_matched begin CV30,8,CV31,8 end;
into device label EC0 code_regex BCV4,\s+16 replace_matched begin CV40,8,CV41,8 end;
into device label EC0 code_regex BATF,\s+16 replace_matched begin ATF0,8,ATF1,8 end;
into device label EC0 code_regex BCL,\s+16 replace_matched begin BCL0,8,BCL1,8 end;
into device label EC0 code_regex MAXC,\s+16 replace_matched begin AXC0,8,AXC1,8 end;
into device label EC0 code_regex BSTS,\s+16 replace_matched begin BST0,8,BST1,8 end;
into device label EC0 code_regex BSN,\s+16 replace_matched begin SN0,8,SN1,8 end;
into device label EC0 code_regex BDAT,\s+16 replace_matched begin BDA0,8,BDA1,8 end;
into device label EC0 code_regex CCBQ,\s+16 replace_matched begin CBQ0,8,CBQ1,8 end;
into device label EC0 code_regex CBT,\s+16 replace_matched begin CBT0,8,CBT1,8 end;
into device label EC0 code_regex ACPR,\s+16 replace_matched begin CPR0,8,CPR1,8 end;

into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;

into method label GACW code_regex \(ACPR, replaceall_matched begin (B1B2(CPR0,CPR1), end;
into method label GBAW code_regex \(BDV, replaceall_matched begin (B1B2(DV0,DV1), end;
into method label GBAW code_regex \(BDC, replaceall_matched begin (B1B2(DC0,DC1), end;
into method label BTIF code_regex \(BFC, replaceall_matched begin (B1B2(FC0,FC1), end;
into method label BTIF code_regex \(BDV, replaceall_matched begin (B1B2(DV0,DV1), end;
into method label BTIF code_regex \(BSN, replaceall_matched begin (B1B2(SN0,SN1), end;
into method label BTIF code_regex \(BDAT, replaceall_matched begin (B1B2(BDA0,BDA1), end;
into method label BTST code_regex \(BPR, replaceall_matched begin (B1B2(BPR0,BPR1), end;
into method label BTST code_regex \(BRC, replaceall_matched begin (B1B2(RC0,RC1), end;
into method label BTST code_regex \(BPV, replaceall_matched begin (B1B2(PV0,PV1), end;
into method label ITLB code_regex \(BFC, replaceall_matched begin (B1B2(FC0,FC1), end;
into method label GBTI code_regex \(BDC, replaceall_matched begin (B1B2(DC0,DC1), end;
into method label GBTI code_regex \(BFC, replaceall_matched begin (B1B2(FC0,FC1), end;
into method label GBTI code_regex \(BRC, replaceall_matched begin (B1B2(RC0,RC1), end;
into method label GBTI code_regex \(BME, replaceall_matched begin (B1B2(ME0,ME1), end;
into method label GBTI code_regex \(BCC, replaceall_matched begin (B1B2(CC0,CC1), end;
into method label GBTI code_regex \(CBT, replaceall_matched begin (B1B2(CBT0,CBT1), end;
into method label GBTI code_regex \(BPV, replaceall_matched begin (B1B2(PV0,PV1), end;
into method label GBTI code_regex \(BPR, replaceall_matched begin (B1B2(BPR0,BPR1), end;
into method label GBTI code_regex \(BSTS, replaceall_matched begin (B1B2(BST0,BST1), end;
into method label GBTI code_regex \(BDV, replaceall_matched begin (B1B2(DV0,DV1), end;
into method label GBTI code_regex \(BCV1, replaceall_matched begin (B1B2(CV10,CV11), end;
into method label GBTI code_regex \(BCV2, replaceall_matched begin (B1B2(CV20,CV21), end;
into method label GBTI code_regex \(BCV3, replaceall_matched begin (B1B2(CV30,CV31), end;
into method label GBTI code_regex \(BCV4, replaceall_matched begin (B1B2(CV40,CV41), end;
into method label GBTI code_regex \(BSN, replaceall_matched begin (B1B2(SN0,SN1), end;
into method label GBTI code_regex \(BDAT, replaceall_matched begin (B1B2(BDA0,BDA1), end;
into method label GBTI code_regex BDAT replaceall_matched begin B1B2(BDA0,BDA1) end;
into method label GBTI code_regex \(BCR, replaceall_matched begin (B1B2(CR0,CR1), end;
into method label GBTI code_regex \(BRTE, replaceall_matched begin (B1B2(RTE0,RTE1), end;
into method label GBTI code_regex \(BATE, replaceall_matched begin (B1B2(ATE0,ATE1), end;
into method label GBTI code_regex \(BATF, replaceall_matched begin (B1B2(ATF0,ATF1), end;
into method label GBTC code_regex \(MAXC, replaceall_matched begin (B1B2(AXC0,AXC1), end;
into method label SBTC code_regex MAXC\) replaceall_matched begin B1B2(AXC0,AXC1)) end;
into method label GCGC code_regex \(\\\_SB\.PCI0\.LPCB\.EC0\.BPR, replaceall_matched begin (B1B2(\\_SB.PCI0.LPCB.EC0.BPR0,\\_SB.PCI0.LPCB.EC0.BPR1), end;
 
Last edited:

Top