Contribute
Register

[Guide] How to patch DSDT for working battery status

Consider:
Code:
Field(...)
{
   Offset(2), // just to set a fixed offset for this example
   FOO, 16,
   BAR, 8, // is at offset 4 (2+16/8=4)
}

And if we split FOO:
Code:
Field(...)
{
   Offset(2), // just to set a fixed offset for this example
   FOO1, 8, FOO2, 8,
   BAR, 8, // is *still* at offset 4 (2+8/8+8/8=4)
}

Thank you very much for the explanation.
 
Because the battery hardware in PCs is not compatible with Apple SMbus hardware, we use ACPI to access battery state when running OS X on laptops. Generally I recommend you use ACPIBatteryManager.kext, available here: https://github.com/RehabMan/OS-X-ACPI-Battery-Driver

After I installed the kext and restarted the system, I tried to enable the working battery status and it still doesn't show. I also check my kextstat but the kext is not on the list. Am I missing any instructions that I haven't yet follow?
 
Hi,
I have patched DSDT but the battery doesn't appear on startup, the only way to make it appear is to unplug and plug back in my charger but unfortunately that doesn't really solve the problem since the battery status doesn't update in the menubar.

These are the commands output:

kextstat|grep -y acpiplat
Code:
   14    2 0xffffff7f829ad000 0x9c000    0x9c000    com.apple.driver.AppleACPIPlatform (6.1) B0282791-F78C-3A3D-A829-629AD847C7EA <13 12 11 7 6 5 4 3 1>

kextstat|grep -y appleintelcpu
Code:
none

kextstat|grep -y applelpc
Code:
  116    0 0xffffff7f821df000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) 7C24E741-BD4A-3917-83AC-E956A03ADC20 <96 12 5 4 3>

sudo touch /System/Library/Extensions && sudo kextcache -u /
Code:
Kext with invalid signatured (-67062) allowed: <OSKext 0x7f95d241a5b0 [0x7fff9a9a9af0]> { URL = "ACPIBatteryManager.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.driver.AppleSmartBatteryManager" }

KernelCache ID: 3F058D9B7C4132D8EF6A04DF34131921
 

Attachments

  • CLOVER.zip
    2.4 MB · Views: 77
  • ioreg.ioreg
    4.6 MB · Views: 75
  • RehabMan.zip
    51.6 KB · Views: 78
hello
RehabMan


Encountered problems, the newly purchased Dell installed Mac, found that the battery does not show. Search DSDT without EmbeddedControl, so I don't know how to do it.

DELL 3543 I7 55OOU

INTEL HD 5500
 

Attachments

  • DSDT.aml
    91.8 KB · Views: 107
After I installed the kext and restarted the system, I tried to enable the working battery status and it still doesn't show. I also check my kextstat but the kext is not on the list. Am I missing any instructions that I haven't yet follow?

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Hi,
I have patched DSDT but the battery doesn't appear on startup, the only way to make it appear is to unplug and plug back in my charger but unfortunately that doesn't really solve the problem since the battery status doesn't update in the menubar.

These are the commands output:

kextstat|grep -y acpiplat
Code:
   14    2 0xffffff7f829ad000 0x9c000    0x9c000    com.apple.driver.AppleACPIPlatform (6.1) B0282791-F78C-3A3D-A829-629AD847C7EA <13 12 11 7 6 5 4 3 1>

kextstat|grep -y appleintelcpu
Code:
none

kextstat|grep -y applelpc
Code:
  116    0 0xffffff7f821df000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) 7C24E741-BD4A-3917-83AC-E956A03ADC20 <96 12 5 4 3>

sudo touch /System/Library/Extensions && sudo kextcache -u /
Code:
Kext with invalid signatured (-67062) allowed: <OSKext 0x7f95d241a5b0 [0x7fff9a9a9af0]> { URL = "ACPIBatteryManager.kext/ -- file:///System/Library/Extensions/", ID = "org.rehabman.driver.AppleSmartBatteryManager" }

KernelCache ID: 3F058D9B7C4132D8EF6A04DF34131921

Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/
 
hello
RehabMan


Encountered problems, the newly purchased Dell installed Mac, found that the battery does not show. Search DSDT without EmbeddedControl, so I don't know how to do it.

DELL 3543 I7 55OOU

INTEL HD 5500

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Good evening!!
I have a notebook running almost everything on Mac OS X 10.11.6, my problem is only on the battery, it does not show the status, I already did the B1B2 method, however it appears that you need to change the battery now. Could you help me if possible? Follow my files for analysis. In Windows 10 the battery is normal and it is new.

Boa noite!!
Tenho um notebook funcionando quase tudo no Mac OS X 10.11.6, o meu problema é somente na bateria, ela não aparece o status, já fiz o metodo B1B2, porém aparece que precisa trocar a bateria agora. Poderia ajudar-me se possivel for? Segue os meus arquivos para analise. No windows 10 a bateria esta normal e ela é nova.
 

Attachments

  • matmagico.zip
    3.9 MB · Views: 69
Last edited:
Good evening!!
I have a notebook running almost everything on Mac OS X 10.11.6, my problem is only on the battery, it does not show the status, I already did the B1B2 method, however it appears that you need to change the battery now. Could you help me if possible? Follow my files for analysis. In Windows 10 the battery is normal and it is new.

Your BAT0._STA method is broken (not 100% ACPI compliant).
It is returning 0xF, which means "battery not present".
Must return 0x1F to indicate "battery present".
See ACPI spec for details.
You can change:
Code:
                        Method (_STA, 0, NotSerialized)  // _STA: Status
                        {
                            Store ("BAT_STA Start", Debug)
                            If (LEqual (FGEC, Zero))
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Store (XTIN, Local0)
                            }

                            If (Local0)
                            {
                                Return (0x1F)
                            }
                            Else
                            {
                                Return (0x0F)
                            }

                            Store ("BAT_STA END", Debug)
                        }

To:
Code:
                        Name(_STA, 0x1F)

Boa noite!!
Tenho um notebook funcionando quase tudo no Mac OS X 10.11.6, o meu problema é somente na bateria, ela não aparece o status, já fiz o metodo B1B2, porém aparece que precisa trocar a bateria agora. Poderia ajudar-me se possivel for? Segue os meus arquivos para analise. No windows 10 a bateria esta normal e ela é nova.

As per site rules (you already agreed), English only.
https://www.tonymacx86.com/rules/
 
Back
Top