Contribute
Register

Battery Manager with Fix for Boot without Batteries

Status
Not open for further replies.
I check DSDT and make sure that EmbeddedControl field's Items are 8-bit.

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
 
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


Hi, RehabMan
Here is the infortmation you need. BTW, The kexts about IntelCPU can't be load on my Laptop. Because there no output when type `kextstat|grep -y appleintelcpu` on Terminal.
Code:
98    0 0xffffff7f82242000 0x3000     0x3000     com.apple.driver.AppleLPC (1.7.3) <79 12 5 4 3>
13    2 0xffffff7f825c9000 0x65000    0x65000    com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>
 

Attachments

  • DSDT.zip
    45.3 KB · Views: 93
  • KAM’s MacBook Air.ioreg
    4.3 MB · Views: 135
Hi, RehabMan
Here is the infortmation you need. BTW, The kexts about IntelCPU can't be load on my Laptop. Because there no output when type `kextstat|grep -y appleintelcpu` on Terminal.
Code:
98    0 0xffffff7f82242000 0x3000     0x3000     com.apple.driver.AppleLPC (1.7.3) <79 12 5 4 3>
13    2 0xffffff7f825c9000 0x65000    0x65000    com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>

The problem is you have multiple battery objects active, but only one working.

Disable the second battery object (BAT1) by returning 0 from its _STA method.
 
The problem is you have multiple battery objects active, but only one working.

Disable the second battery object (BAT1) by returning 0 from its _STA method.

I check the code, and found that the original code BAT1 _STA return Zero.

Code:
Device (BAT1)
            {
                Name (_HID, EisaId ("PNP0C0A"))  // _HID: Hardware ID
                Name (_UID, 0x02)  // _UID: Unique ID
                Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
                {
                    _SB
                })
                Method (_STA, 0, NotSerialized)  // _STA: Status
                {
                    Store (EEAC (0x05, Zero), Local0)
                    If (LLess (Local0, 0x02))
                    {
                        Return (Zero)
                    }

                    Store (ECG5 (), Local0)
                    And (Local0, 0x08, Local0)
                    If (Local0)
                    {
                        Return (0x1F)
                    }

                    Return (Zero)
                }

                Method (_BIF, 0, NotSerialized)  // _BIF: Battery Information
                {
                    Name (BIF1, Package (0x0D) {})
                    ECG9 (0x02, BIF1)
                    Return (BIF1)
                }

                Method (_BST, 0, NotSerialized)  // _BST: Battery Status
                {
                    Name (BST1, Package (0x04) {})
                    ECG6 (0x02, BST1)
                    Return (BST1)
                }
            }
 
The problem is you have multiple battery objects active, but only one working.

Disable the second battery object (BAT1) by returning 0 from its _STA method.



The problem like that when I disconnect AC Adapter. I modified BAT1 boject and make its _STA do noting but return Zero. Now I can see only 1 Battery device in IOReg, but the problem is unsolved.
Maybe it related the IGPU Power Manage?

IMG_20150803_235234.jpg
 
The problem like that when I disconnect AC Adapter. I modified BAT1 boject and make its _STA do noting but return Zero. Now I can see only 1 Battery device in IOReg, but the problem is unsolved.
Maybe it related the IGPU Power Manage?

View attachment 145883

Post updated files.

--

Please provide complete details in your profile/signature
(Profile/Settings link in upper right corner of this site)

System: manufacturer/model + bootloader(Clover/Chameleon/Chimera)
CPU: detailed CPU model + motherboard chipset
Graphics: all graphics devices + laptop internal screen resolution

For example, typical Ivy laptop:
System: HP ProBook 4540s (Clover)
CPU: i5-3320m/HM76
Graphics: HD4000, 1366x768

Use CPU-Z on Windows to find CPU (Core iX-xxx) and motherboard chipset (HMxx), and graphics capabilities. For a laptop, these details are important and affect critical installation procedures.
 
Sometimes the charging/discharging current is wrong. For example the charging current sometimes shows 1 mA under system information, which is wrong. I have to unplug and plug one or more times to get correct values. How to solve this problem?

Thanks.
 

Attachments

  • Screen Shot 2015-12-02 at 3.55.15 PM.png
    Screen Shot 2015-12-02 at 3.55.15 PM.png
    411.5 KB · Views: 200
Sometimes the charging/discharging current is wrong. For example the charging current sometimes shows 1 mA under system information, which is wrong. I have to unplug and plug one or more times to get correct values. How to solve this problem?

Thanks.

You need to debug your DSDT battery methods. Use ACPIDebug. Refer to the ACPI spec for information on _BST.
 
Status
Not open for further replies.
Back
Top