Contribute
Register

[Guide] How to patch DSDT for working battery status

How to patch DSDT for working battery status

I have tried it on a few dsdt's no errors

Code:
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n
end;# 16-bit registers
into device label EC0 code_regex CAP0,\s+16 replace_matched begin AP00,8,AP01,8 end;
into device label EC0 code_regex VOT0,\s+16 replace_matched begin OT00,8,OT01,8 end;
into device label EC0 code_regex CRT0,\s+16 replace_matched begin RT00,8,RT01,8 end;
into device label EC0 code_regex FCP0,\s+16 replace_matched begin CP00,8,CP01,8 end;
into device label EC0 code_regex DCP0,\s+16 replace_matched begin DP00,8,DP01,8 end;
into device label EC0 code_regex DVT0,\s+16 replace_matched begin VT00,8,VT01,8 end;
into device label EC0 code_regex BSN0,\s+16 replace_matched begin SN00,8,SN01,8 end;
# fix 16-bit methods
into method label _BST code_regex \(\^\^PCI0\.LPCB\.EC0\.CAP0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.AP00,^^PCI0.LPCB.EC0.AP01), end;
into method label _BST code_regex \(\^\^PCI0\.LPCB\.EC0\.VOT0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.OT00,^^PCI0.LPCB.EC0.OT01), end;
into method label _BST code_regex \(\^\^PCI0\.LPCB\.EC0\.CRT0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.RT00,^^PCI0.LPCB.EC0.RT01), end;
into method label _BIF code_regex \(\^\^PCI0\.LPCB\.EC0\.DCP0, replace_matched begin (B1B2(^^PCI0.LPCB.EC0.DP00,^^PCI0.LPCB.EC0.DP01), end;
into method label _BIF code_regex \(\^\^PCI0\.LPCB\.EC0\.FCP0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.CP00,^^PCI0.LPCB.EC0.CP01), end;
into method label _BIF code_regex \(\^\^PCI0\.LPCB\.EC0\.DVT0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.VT00,^^PCI0.LPCB.EC0.VT01), end;
into method label _BIF code_regex \(\^\^PCI0\.LPCB\.EC0\.BSN0, replaceall_matched begin (B1B2(^^PCI0.LPCB.EC0.SN00,^^PCI0.LPCB.EC0.SN01), end;

You are indeed the man...

I will add it to the repo, with this additional patch:
Code:
# fix an error in this DSDT
into method label _DSM parent_label PEGP code_regex Arg0\n.*Arg1\n.*Arg2\n.*Arg3\n remove_matched;

This is a Dell XPS 1502x?
 
How to patch DSDT for working battery status

A Dell XPS L502x

I hope others can use it. I could not have done it without your help.
 
How to patch DSDT for working battery status

Thanks a million RehabMan,

patch for HP-DV7-1120 here:


Edit: Just remembered a while ago I changed my LPC Device name to LPCB and EC0 to EC, I added patch for the laptops with original DSDT
 

Attachments

  • battery_HP-DV7-1120.txt
    2.7 KB · Views: 200
  • battery_HP-DV7-1120 (original DSDT).txt
    2.7 KB · Views: 171
How to patch DSDT for working battery status

Thanks a million RehabMan,

patch for HP-DV7-1120 here:


Edit: Just remembered a while ago I changed my LPC Device name to LPCB and EC0 to EC, I added patch for the laptops with original DSDT

Great, I'll add the one for original DSDT to the repo.
 
How to patch DSDT for working battery status ASUS K50ID

Hi I wonder if you can help. I have an ASUS K50ID all working 10.9 except battery. I don't want to use a rollback kext so I have patched my DSDT using the nearest match on your repo which is ASUS-N55SL.txt the values all matched up and the DSDT compiles but I just have an X in the battery symbol. I'm using your driver kext, I think think I've missed some fields if you could take a look and advise what fields I've missed. Thank you

DSDT attached
 

Attachments

  • dsdt.aml.zip
    26.3 KB · Views: 190
How to patch DSDT for working battery status

Hi I wonder if you can help. I have an ASUS K50ID all working 10.9 except battery. I don't want to use a rollback kext so I have patched my DSDT using the nearest match on your repo which is ASUS-N55SL.txt the values all matched up and the DSDT compiles but I just have an X in the battery symbol. I'm using your driver kext, I think think I've missed some fields if you could take a look and advise what fields I've missed. Thank you

DSDT attached

The ASUS 55SL patch is not a good match. Dell XPS 18 is closer, but you will still need to modify it. Follow the instructions in post #1 and use the Dell patch as a start.
 
How to patch DSDT for working battery status

Hi thanks, I have 4 embedded control sections, do the SMB sections need fixing or just ECOR
 
How to patch DSDT for working battery status

Hi thanks, I have 4 embedded control sections, do the SMB sections need fixing or just ECOR

Read post #1. Any fields within an EmbeddedControl that are multi-byte need to be looked at.
 
How to patch DSDT for working battery status

Hi RehabMan, You ARE A GOD, THANX!!! With your help and wonderful description I wrote my first DSDT patch :)... It works, battery status appeared next to volume indicator immediately after permission repair for ACPIBatteryManager.kext and reboot! My notebook is Samsung R528 DT02EE. Here are my patch & DSDT files:
View attachment Samsung_R528-DT02EE-battery-patch.txt
View attachment dsdt_original.dsl.zip

Here is a little offtopic, I have CMOS reset after every restart and don't know how to deal with it :( Maybe you can check DSDT, because I made RTC and TIMR patch manually deleted "IRQNoFlags () {}" lines inside those methods. If you know answer please write me in private.

Thank You!
 
How to patch DSDT for working battery status

Hi RehabMan, You ARE A GOD, THANX!!! With your help and wonderful description I wrote my first DSDT patch :)... It works, battery status appeared next to volume indicator immediately after permission repair for ACPIBatteryManager.kext and reboot! My notebook is Samsung R528 DT02EE. Here are my patch & DSDT files:
View attachment 75956
View attachment 75957

Great... I will add it to the laptop repo (with credit, of course...)

Here is a little offtopic, I have CMOS reset after every restart and don't know how to deal with it :( Maybe you can check DSDT, because I made RTC and TIMR patch manually deleted "IRQNoFlags () {}" lines inside those methods. If you know answer please write me in private.

You need to patch AppleRTC. There is an option to do this in Multibeast.
 
Back
Top