Contribute
Register

ACPIBatteryManager on XPS 12 (9Q33) in Yosemite

Status
Not open for further replies.
Joined
Jan 25, 2014
Messages
81
Motherboard
XPS12
CPU
Haswell i7
Graphics
HD4400
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
I had good luck with ACPIBatteryManager reporting the battery status back in Mavericks luckily without any DSDT patches. Unfortunately, when I did a fresh install of Yosemite using Clover this time, it doesn't appear to be working. This is with "RehabMan-Battery-2014-1016".

Here is what I'm seeing after loading the debug kext:

Code:
Oct 23 19:42:23 nuudells kernel[0]: BatteryTracker::start: entering initOct 23 19:42:23 nuudells kernel[0]: BatteryTracker::start: entering start
Oct 23 19:42:23 nuudells kernel[0]: ACPIBatteryManager: Version 1.53 starting BatteryTracker.
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::init: Initializing
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::probe: Probing
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::start: called
Oct 23 19:42:23 nuudells kernel[0]: ACPIBatteryManager: Version 1.53 starting.
Oct 23 19:42:23 nuudells kernel[0]: ACPIBatteryManager: Using ACPI regular battery information method _BIF
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::setPowerState: which = 0x1
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::clearBatteryState: do_update = false
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x2
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x4d01
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x9f6a
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20e5
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 2628
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5441
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xa44
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery: Battery is charging.
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 23 19:42:23 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 23 19:42:23 nuudells kernel[0]: BatteryTracker::addBatteryManager: entering addBatteryManager(0xffffff8018a13200)
Oct 23 19:42:23 nuudells SystemUIServer[199]: Menu Extra: <BatteryExtra: 0x7fc730f09b60> is over retained.

And later:

Code:
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut calledOct 23 19:43:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 23 19:43:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x2
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x4c67
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xa078
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20f6
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 2607
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5477
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xa3e
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery: Battery is charging.
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 23 19:43:24 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 23 19:43:24 nuudells com.apple.xpc.launchd[1] (com.apple.SystemUIServer.agent[759]): Service exited due to signal: Segmentation fault: 11

I've attached my IOReg. View attachment nuudles.ioreg

Any thoughts?
 
I had good luck with ACPIBatteryManager reporting the battery status back in Mavericks luckily without any DSDT patches. Unfortunately, when I did a fresh install of Yosemite using Clover this time, it doesn't appear to be working. This is with "RehabMan-Battery-2014-1016".

Here is what I'm seeing after loading the debug kext:

...

I've attached my IOReg. View attachment 109401

Any thoughts?

No issues here...
 
No issues here...

Hey RehabMan. If there are no issues, then why does my battery still show 0% and when I try to add it to the menu bar, it seems to kill the SystemUI server according to the system.log.

Screen Shot 2014-10-23 at 8.51.30 PM.png
 
Hey RehabMan. If there are no issues, then why does my battery still show 0% and when I try to add it to the menu bar, it seems to kill the SystemUI server according to the system.log.

View attachment 109407

I mean, of course, no issues with my three laptops.

It is probably some sort of DSDT issue.
 
Ahh... ok... I understand you now. I had a stab at following the Battery DSDT patching guide and was able to patch my DSDT. I only had 2 variables that I could tell I had to break up: ERIB (16 bits), which I split up into RIB0 and RIB1, and SMD0 (256 bits), which I turned into SMDX.

This is what my patch ended up looking like:

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;


# utility methods to read/write buffers from/to EC
into method label RE1B parent_label EC0 remove_entry;
into method label RECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (RE1B, 1, NotSerialized)\n
{\n
    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
    Return(BYTE)\n
}\n
Method (RECB, 2, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
{\n
    ShiftRight(Arg1, 3, Arg1)\n
    Name(TEMP, Buffer(Arg1) { })\n
    Add(Arg0, Arg1, Arg1)\n
    Store(0, Local0)\n
    While (LLess(Arg0, Arg1))\n
    {\n
        Store(RE1B(Arg0), Index(TEMP, Local0))\n
        Increment(Arg0)\n
        Increment(Local0)\n
    }\n
    Return(TEMP)\n
}\n
end;


into method label WE1B parent_label EC0 remove_entry;
into method label WECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (WE1B, 2, NotSerialized)\n
{\n
    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
    Store(Arg1, BYTE)\n
}\n
Method (WECB, 3, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
// Arg2 - value to write\n
{\n
    ShiftRight(Arg1, 3, Arg1)\n
    Name(TEMP, Buffer(Arg1) { })\n
    Store(Arg2, TEMP)\n
    Add(Arg0, Arg1, Arg1)\n
    Store(0, Local0)\n
    While (LLess(Arg0, Arg1))\n
    {\n
        WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n
        Increment(Arg0)\n
        Increment(Local0)\n
    }\n
}\n
end;


// ERIB
into device label EC0 code_regex ERIB,\s+16, replace_matched begin RIB0,8,RIB1,8, end;


into method label FANG code_regex Store\s+\(([^,]+),\s+ERIB\) replaceall_matched begin WECB(0x5D,16,%1) end;
into method label FANW code_regex Store\s+\(([^,]+),\s+ERIB\) replaceall_matched begin WECB(0x5D,16,%1) end;


// SMD0
into device label EC0 code_regex (SMD0,)\s+(256) replace_matched begin SMDX,%2,//%1%2 end;


into method label CFUN code_regex Store\s+\(([^,]+),\s+SMD0\) replaceall_matched begin WECB(0x64,256,%1) end;
into method label CFUN code_regex \(SMD0, replaceall_matched begin (RECB(0x64,256), end;

And my compiled DSDT is attached. Is there something I missed? View attachment DSDT.aml
 
Ahh... ok... I understand you now. I had a stab at following the Battery DSDT patching guide and was able to patch my DSDT. I only had 2 variables that I could tell I had to break up: ERIB (16 bits), which I split up into RIB0 and RIB1, and SMD0 (256 bits), which I turned into SMDX.

This is what my patch ended up looking like:

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;


# utility methods to read/write buffers from/to EC
into method label RE1B parent_label EC0 remove_entry;
into method label RECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (RE1B, 1, NotSerialized)\n
{\n
    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
    Return(BYTE)\n
}\n
Method (RECB, 2, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
{\n
    ShiftRight(Arg1, 3, Arg1)\n
    Name(TEMP, Buffer(Arg1) { })\n
    Add(Arg0, Arg1, Arg1)\n
    Store(0, Local0)\n
    While (LLess(Arg0, Arg1))\n
    {\n
        Store(RE1B(Arg0), Index(TEMP, Local0))\n
        Increment(Arg0)\n
        Increment(Local0)\n
    }\n
    Return(TEMP)\n
}\n
end;


into method label WE1B parent_label EC0 remove_entry;
into method label WECB parent_label EC0 remove_entry;
into device label EC0 insert
begin
Method (WE1B, 2, NotSerialized)\n
{\n
    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
    Store(Arg1, BYTE)\n
}\n
Method (WECB, 3, Serialized)\n
// Arg0 - offset in bytes from zero-based EC\n
// Arg1 - size of buffer in bits\n
// Arg2 - value to write\n
{\n
    ShiftRight(Arg1, 3, Arg1)\n
    Name(TEMP, Buffer(Arg1) { })\n
    Store(Arg2, TEMP)\n
    Add(Arg0, Arg1, Arg1)\n
    Store(0, Local0)\n
    While (LLess(Arg0, Arg1))\n
    {\n
        WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n
        Increment(Arg0)\n
        Increment(Local0)\n
    }\n
}\n
end;


// ERIB
into device label EC0 code_regex ERIB,\s+16, replace_matched begin RIB0,8,RIB1,8, end;


into method label FANG code_regex Store\s+\(([^,]+),\s+ERIB\) replaceall_matched begin WECB(0x5D,16,%1) end;
into method label FANW code_regex Store\s+\(([^,]+),\s+ERIB\) replaceall_matched begin WECB(0x5D,16,%1) end;


// SMD0
into device label EC0 code_regex (SMD0,)\s+(256) replace_matched begin SMDX,%2,//%1%2 end;


into method label CFUN code_regex Store\s+\(([^,]+),\s+SMD0\) replaceall_matched begin WECB(0x64,256,%1) end;
into method label CFUN code_regex \(SMD0, replaceall_matched begin (RECB(0x64,256), end;

And my compiled DSDT is attached. Is there something I missed? View attachment 109427

Your DSDT also uses some Mutex objects with non-zero SyncLevel. Apply: "Fix Mutex with non-zero SyncLevel" from my laptop patch repo.

FYI: The message "Menu Extra: <BatteryExtra: ...> is over retained." appears on my Apple MacBookAir6,2 as well.

FYI2: The patch already in the repo "Dell Vostro 15xx" is marked as match for your laptop... look in the comments (it is probably a superset of the patch you just posted).
 
Your DSDT also uses some Mutex objects with non-zero SyncLevel. Apply: "Fix Mutex with non-zero SyncLevel" from my laptop patch repo.

FYI: The message "Menu Extra: <BatteryExtra: ...> is over retained." appears on my Apple MacBookAir6,2 as well.

FYI2: The patch already in the repo "Dell Vostro 15xx" is marked as match for your laptop... look in the comments (it is probably a superset of the patch you just posted).

Thank you RehabMan. I've applied both of the DSDT patches you referred to and still don't have the battery status working. Here's the debug log from the system.log from this attempt:

Code:
Oct 23 23:19:32 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 23 23:19:32 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 23 23:19:32 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0xffffffff
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc706
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x21de
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 572662
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 6793
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: adjusted fCurrentRate to -507127
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xfff84309
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 23 23:19:35 nuudells com.apple.xpc.launchd[1] (com.apple.SystemUIServer.agent[199]): Service exited due to signal: Segmentation fault: 11
Oct 23 23:19:35 nuudells discoveryd[48]: AwdlD2d AwdlD2dStopBrowsingForKey: '_airplay' Browsing service stopped
Oct 23 23:19:35 nuudells discoveryd[48]: AwdlD2d AwdlD2dStopBrowsingForKey: '_raop' Browsing service stopped
Oct 23 23:19:35 nuudells ReportCrash[411]: Saved crash report for SystemUIServer[199] version 1.7 (410) to /Users/chrisluu/Library/Logs/DiagnosticReports/SystemUIServer_2014-10-23-231935_nuudells.crash
Oct 23 23:19:35 nuudells Spotlight[206]: spot: agent checkin
Oct 23 23:19:35 nuudells ReportCrash[411]: Removing excessive log: file:///Users/chrisluu/Library/Logs/DiagnosticReports/SystemUIServer_2014-10-22-213248_nuudells.crash
Oct 23 23:19:35 nuudells SystemUIServer[412]: Cannot find executable for CFBundle 0x7fc333c043a0 </System/Library/CoreServices/Menu Extras/Clock.menu> (not loaded)
Oct 23 23:19:35 nuudells SystemUIServer[412]: Cannot find executable for CFBundle 0x7fc333e14a90 </System/Library/CoreServices/Menu Extras/Volume.menu> (not loaded)
Oct 23 23:19:35 nuudells SystemUIServer[412]: Menu Extra: <BatteryExtra: 0x7fc333c17c40> is over retained.

And the patched DSDT.aml if it's helpful: View attachment DSDT.aml
 
Thank you RehabMan. I've applied both of the DSDT patches you referred to and still don't have the battery status working. Here's the debug log from the system.log from this attempt:

Code:
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0xffffffff
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc706
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x21de
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 572662
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 6793
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: adjusted fCurrentRate to -507127
Oct 23 23:19:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xfff84309

And the patched DSDT.aml if it's helpful: View attachment 109434

You can easily see that the _BST is returning invalid data for CurrentRate.

But there is a bug here in the battery manager as it then converts that invalid value from watts to amps (I'll write a fix for that). But the root cause is the DSDT code for _BST not returning a value.

You can code review it... or debug it with ACPIDebug.kext.
 
You can easily see that the _BST is returning invalid data for CurrentRate.

But there is a bug here in the battery manager as it then converts that invalid value from watts to amps (I'll write a fix for that). But the root cause is the DSDT code for _BST not returning a value.

You can code review it... or debug it with ACPIDebug.kext.

Interesting... I don't usually see the fCurrentRate being so high like that causing the adjusted rate to be negative. Here's some more samples that show a more normal CurrentRate.

Code:
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1888
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xade8
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20a0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 837
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5936
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x5da
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:13:03 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:13:03 --- last message repeated 1 time ---
Oct 24 00:13:03 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1601
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xadb6
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20a6
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 751
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5929
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x464
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:13:33 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:13:33 --- last message repeated 1 time ---
Oct 24 00:13:33 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1275
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xad8e
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20ab
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 630
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5924
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x36d
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:14:04 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:14:04 --- last message repeated 1 time ---
Oct 24 00:14:04 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)

I don't mind going through some debugging to figure out what's going on, but what's my best bet for where to start? I can see the _BST method here in the DSDT:

Code:
            Method (_BST, 0, NotSerialized)
            {
                If (ECOK ())
                {
                    Store (^^EC0.BST0, Index (BFB0, Zero))
                    Sleep (0x14)
                    If (LEqual (B1B2 (^^EC0.AC00, ^^EC0.AC01), Zero))
                    {
                        Store (0xFFFFFFFF, Index (BFB0, One))
                    }
                    Else
                    {
                        Store (B1B2 (^^EC0.AC00, ^^EC0.AC01), Local4)
                        And (Local4, 0x8000, Local5)
                        If (LEqual (Local5, 0x8000))
                        {
                            Subtract (0xFFFF, Local4, Local4)
                        }


                        If (LEqual (^^EC0.BAM0, Zero))
                        {
                            Divide (Multiply (Local4, B1B2 (^^EC0.PV00, ^^EC0.PV01), Local4), 0x03E8, , Local4)
                        }


                        Store (Local4, Index (BFB0, One))
                    }


                    Sleep (0x14)
                    If (^^EC0.BAM0)
                    {
                        Store (B1B2 (^^EC0.RC00, ^^EC0.RC01), Local5)
                    }
                    Else
                    {
                        Store (Multiply (B1B2 (^^EC0.RC00, ^^EC0.RC01), 0x0A), Local5)
                    }


                    Store (Local5, Index (BFB0, 0x02))
                    Sleep (0x14)
                    Store (B1B2 (^^EC0.PV00, ^^EC0.PV01), Index (BFB0, 0x03))
                    Sleep (0x14)
                    If (LNotEqual (^^EC0.BDN0, BMDL))
                    {
                        Notify (BAT1, 0x81)
                    }
                }


                Return (BFB0)
            }

And I see that the Vostro patches made some modifications in splitting up the 16 bit variables into two 8 bits. Maybe something could be askew there?
 
Interesting... I don't usually see the fCurrentRate being so high like that causing the adjusted rate to be negative. Here's some more samples that show a more normal CurrentRate.

Code:
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1888
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xade8
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20a0
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 837
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5936
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x5da
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:13:03 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:13:03 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:13:03 --- last message repeated 1 time ---
Oct 24 00:13:03 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1601
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xadb6
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20a6
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 751
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5929
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x464
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:13:33 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:13:33 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:13:33 --- last message repeated 1 time ---
Oct 24 00:13:33 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 24 00:14:03 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1275
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xad8e
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x20ab
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 630
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 5924
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x36d
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 24 00:14:04 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 24 00:14:04 nuudells SystemUIServer[478]: -[NSURL unload]: unrecognized selector sent to instance 0x6000002a1620
Oct 24 00:14:04 --- last message repeated 1 time ---
Oct 24 00:14:04 nuudells SystemUIServer[478]: (
		0   CoreFoundation                      0x00007fff99b2064c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff8e20e6de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff99b236bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff99a6aa84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff99a6a5f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff8df03fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff8df03ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x0000000105190901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff99a3ea0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff99a3e8d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff99a3e84b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff99a303c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff99a2f838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff9040643f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff904061ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff90405ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff8e906821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff8e905fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff8e8f9f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010077939a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff8ada25c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)

I don't mind going through some debugging to figure out what's going on, but what's my best bet for where to start? I can see the _BST method here in the DSDT:

Code:
            Method (_BST, 0, NotSerialized)
            {
                If (ECOK ())
                {
                    Store (^^EC0.BST0, Index (BFB0, Zero))
                    Sleep (0x14)
                    If (LEqual (B1B2 (^^EC0.AC00, ^^EC0.AC01), Zero))
                    {
                        Store (0xFFFFFFFF, Index (BFB0, One))
                    }
                    Else
                    {
                        Store (B1B2 (^^EC0.AC00, ^^EC0.AC01), Local4)
                        And (Local4, 0x8000, Local5)
                        If (LEqual (Local5, 0x8000))
                        {
                            Subtract (0xFFFF, Local4, Local4)
                        }


                        If (LEqual (^^EC0.BAM0, Zero))
                        {
                            Divide (Multiply (Local4, B1B2 (^^EC0.PV00, ^^EC0.PV01), Local4), 0x03E8, , Local4)
                        }


                        Store (Local4, Index (BFB0, One))
                    }


                    Sleep (0x14)
                    If (^^EC0.BAM0)
                    {
                        Store (B1B2 (^^EC0.RC00, ^^EC0.RC01), Local5)
                    }
                    Else
                    {
                        Store (Multiply (B1B2 (^^EC0.RC00, ^^EC0.RC01), 0x0A), Local5)
                    }


                    Store (Local5, Index (BFB0, 0x02))
                    Sleep (0x14)
                    Store (B1B2 (^^EC0.PV00, ^^EC0.PV01), Index (BFB0, 0x03))
                    Sleep (0x14)
                    If (LNotEqual (^^EC0.BDN0, BMDL))
                    {
                        Notify (BAT1, 0x81)
                    }
                }


                Return (BFB0)
            }

And I see that the Vostro patches made some modifications in splitting up the 16 bit variables into two 8 bits. Maybe something could be askew there?

You can see the case where it returns -1 for CurrentStatus:

Code:
              If (LEqual (B1B2 (^^EC0.AC00, ^^EC0.AC01), Zero))
                    {
                        Store (0xFFFFFFFF, Index (BFB0, One))
                    }

The splitting really should not matter, but no need to split them if they are not in EC.
 
Status
Not open for further replies.
Back
Top