Contribute
Register

[Guide] How to patch DSDT for working battery status

The problem is the second battery object in DSDT, but is not present. Disable it:
Code:
into method label _STA parent_label BAT1 replace_content begin Return(0) end;
Thank you, you are so fast :headbang:. I just patch as you recommend. The battery is correct now but let me see if it really works. In addition, can I put your kext in kext folder of Clover or I have to put it in S/L/E/. Again, thanks so much :D
 
Thank you, you are so fast :headbang:. I just patch as you recommend. The battery is correct now but let me see if it really works. In addition, can I put your kext in kext folder of Clover or I have to put it in S/L/E/. Again, thanks so much :D

All kexts you need should be installed to /S/L/E. Clover kext injection should be used only for essential kexts needed to boot the installer and recovery partition.
 
All kexts you need should be installed to /S/L/E. Clover kext injection should be used only for essential kexts needed to boot the installer and recovery partition.
Got it! Thanks.
 
Im trying to patch the dsdt for battery status but my dsdt differs from the example one.

In the 1st embeddedcontrol field, a lot of the 16 bit values are only in the one location. Can the be ignored? or do they still have to be changed to 2 8bit values?

Also some the 16 bit values that are in a different format than the example dsdt. For example in reference to 16 bit values B0SN and B1SN the second location looks like this
Method (BIFA, 0, NotSerialized)
{
If (ECAV ())
{
If (BSLF)
{
Store (B1SN, Local0)
}
Else
{
Store (B0SN, Local0)
}
}
Else
{
Store (Ones, Local0)
}


Return (Local0)

What type of code would I use for the 2nd part of the patch instead of
into method label GBTI code_regex \(BDC0, replaceall_matched begin (B1B2(DC00,DC01), end;

Also I have 4 different areas of embedded control in my dsdt. Do they all need to be changed to 8bit or is it just the 1st area?

I have attached my dsdt and the patch I am working on. The values with a question mark next to them are the ones that are only in 1 location
 

Attachments

  • patch.zip
    1 KB · Views: 75
  • DSDT.zip
    62.4 KB · Views: 83
Im trying to patch the dsdt for battery status but my dsdt differs from the example one.

In the 1st embeddedcontrol field, a lot of the 16 bit values are only in the one location. Can the be ignored? or do they still have to be changed to 2 8bit values?

Only fields which are referenced by the code need to be patched.

Also some the 16 bit values that are in a different format than the example dsdt. For example in reference to 16 bit values B0SN and B1SN the second location looks like this


What type of code would I use for the 2nd part of the patch instead of

Patch would be similar...

Code:
into method label BIFA code_regex \(B1SN, replaceall_matched begin (B1B2(B1S0,B1S1), end;

Note: Symbols cannot start with a digit (as you have in your patch).

Also I have 4 different areas of embedded control in my dsdt. Do they all need to be changed to 8bit or is it just the 1st area?

All.
 
I am on my last two fields but they are 256 bit, on one of them BDAT it is present in 13 locations and seems to be defined several times as 256 bit, 16 bit and 8 bit which seems strange. Should I just proceed with the patching as it is in the guide or is 13 locations and several definitions not normal?
 

Attachments

  • DSDT.zip
    62.4 KB · Views: 70
I am on my last two fields but they are 256 bit, on one of them BDAT it is present in 13 locations and seems to be defined several times as 256 bit, 16 bit and 8 bit which seems strange. Should I just proceed with the patching as it is in the guide or is 13 locations and several definitions not normal?

Keep in mind most ASUS laptops can use one of the two ASUS patches already in the repo.

You might be reinventing the wheel.
 
The ASUS G75vw patch worked if you want to add ASUS Transformer book TP300LA to the confirmed laptops (T300LA that is already there is a different laptop) thanks for the help
 
The ASUS G75vw patch worked if you want to add ASUS Transformer book TP300LA to the confirmed laptops (T300LA that is already there is a different laptop) thanks for the help

I think the N55SL/VivoBook patch may be a closer match (less patching, just as effective).

Test and post result.
 
It appears to work as well, although when I restarted, the trackpad and buttons stopped working (probably unrelated) but when i restarted a second time, everything appears to be working. As to which works better I can't really tell but the battery seems to be draining faster withN55SL/VivoBook patch (or maybe its giving a more accurate reading) I have yet to patch for native power management but its next on the list.
 
Back
Top