Contribute
Register

[Guide] How to patch DSDT for working battery status

hi
my device is cube i7 stylus
i succeeded in patch dsdt but the problem is when battery goes above 68% it starts in minus till reach -39% when it is full
and max and current mAh gives very huge number in system report
i think the problem in offset value in dsdt i didn't change them and when calculate them there is wrong i think
Code:
OperationRegion (ECF2, EmbeddedControl, Zero, 0xFF)
            Field (ECF2, ByteAcc, Lock, Preserve)
            {
                XXX0,   8, 
                XXX1,   8, 
                XXX2,   8, 
                Offset (0x20), 
                RCMD,   8, 
                RCST,   8, 
                Offset (0x60), 
                TSR1,   8, 
                TSR2,   8, 
                TSR3,   8, 
                TSI,    4, 
                HYST,   4, 
                TSHT,   8, 
                TSLT,   8, 
                TSSR,   8, 
                xHG0,   8, xhg1, 8, 
                Offset (0x72), 
                CHGT,   8, 
                Offset (0x80), 
                ECWR,   8, 
                XX10,   8, 
                XX11,   8, xx12, 8, 
                XDC0, 8, XDC1, 8, 
                XFV0, 8, XFV1, 8, 
                XFC0, 8, XFC1, 8, 
                XX15,   8, xx16, 8,
                B1ST,   8, 
                B1C0,   8, b1c1, 8,
                XRC0, 8, XRC1, 8, 
                B1V0,   8, b1v1, 8
            }

i attached my dsdt if u can help
thanks for awesome guides
 

Attachments

  • DSDT.aml
    83 KB · Views: 93
hi
my device is cube i7 stylus
i succeeded in patch dsdt but the problem is when battery goes above 68% it starts in minus till reach -39% when it is full
and max and current mAh gives very huge number in system report
i think the problem in offset value in dsdt i didn't change them and when calculate them there is wrong i think
Code:
OperationRegion (ECF2, EmbeddedControl, Zero, 0xFF)
            Field (ECF2, ByteAcc, Lock, Preserve)
            {
                XXX0,   8, 
                XXX1,   8, 
                XXX2,   8, 
                Offset (0x20), 
                RCMD,   8, 
                RCST,   8, 
                Offset (0x60), 
                TSR1,   8, 
                TSR2,   8, 
                TSR3,   8, 
                TSI,    4, 
                HYST,   4, 
                TSHT,   8, 
                TSLT,   8, 
                TSSR,   8, 
                xHG0,   8, xhg1, 8, 
                Offset (0x72), 
                CHGT,   8, 
                Offset (0x80), 
                ECWR,   8, 
                XX10,   8, 
                XX11,   8, xx12, 8, 
                XDC0, 8, XDC1, 8, 
                XFV0, 8, XFV1, 8, 
                XFC0, 8, XFC1, 8, 
                XX15,   8, xx16, 8,
                B1ST,   8, 
                B1C0,   8, b1c1, 8,
                XRC0, 8, XRC1, 8, 
                B1V0,   8, b1v1, 8
            }

i attached my dsdt if u can help
thanks for awesome guides

Vague descriptions of what you're doing not helpful...

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Note: It is easier if you use copy/paste instead of typing the commands manually.

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

And output from:
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc

Also, post EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory, especially if you have an overabundance of themes installed.

Also post output of:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
 
I've extracted native DSDT file with patchmatic
 

Attachments

  • extract.zip
    33 KB · Views: 84
I've extracted native DSDT file with patchmatic

Not native.

patchmatic -extract works to extract native only with clean Clover ACPI configuration. Clearly, you're booting with patched files in ACPI/patched.

Please read (the guide) carefully for how to extract native.
 
Sorry for this inconvenience
Sometimes, I use Google Translate to understand exactly what you mean, and what It's written in your Guide.
So, I'm used hackintosh for only 1 month, and it's really new for me.


Right after the OsX installation, I was made a backup of all the Extra folder (with its DSDT file).
I thought it was the native one, but its seems not.
And today, I really don't know how to get a native DSDT file...


So, it is so complicated, than I've tried to find a DSDT patched file on the net, and I've found a good one
http://www.osx86.net/file/3721-dsdt-asus-n73sv-bios-v306/
Battery works fine now !


Thanks you very much for your all your guides
See you RehabMan ;-)
 
i collected all data that you demand
my problem is above 68% the percentage start in minus and the full charge is -39%
 

Attachments

  • cube i7 stylus.zip
    3.7 MB · Views: 74
i collected all data that you demand
my problem is above 68% the percentage start in minus and the full charge is -39%

Bad idea to break XX11 like you did. Never use the same identifier for the broken field. You broke XX11 to XX11 and XX12. It means the compiler will not warn you of un-patched use of XX11. Break instead as XX11->XY11,XY12 (as an example). Then the compiler will show errors for all the cases of XX11 use.

Same goes for XX15.

Note: Both XX11 and XX15 are not accessed. No patching necessary for these fields in the first place...

But moving on to the real problem...

I think you will find that your _BIF method is failing to store a valid voltage into position 4 (see ACPI spec). It is leaving 1 in for voltage. Without a valid voltage, ACPIBatteryManager cannot convert from watts to amps correctly.

Seems to me there should be a line that reads:
Code:
# in _BIF
Store(B1B2 (XFV0, XFV1), Index (BPKG, 4))
 
Sorry for this inconvenience
Sometimes, I use Google Translate to understand exactly what you mean, and what It's written in your Guide.
So, I'm used hackintosh for only 1 month, and it's really new for me.


Right after the OsX installation, I was made a backup of all the Extra folder (with its DSDT file).
I thought it was the native one, but its seems not.
And today, I really don't know how to get a native DSDT file...


So, it is so complicated, than I've tried to find a DSDT patched file on the net, and I've found a good one
http://www.osx86.net/file/3721-dsdt-asus-n73sv-bios-v306/
Battery works fine now !


Thanks you very much for your all your guides
See you RehabMan ;-)

Always a bad idea to use a DSDT from another computer.

Getting native DSDT is clearly detailed in the guide: http://www.tonymacx86.com/el-capitan-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html
 
Back
Top