Contribute
Register

ACPIBatteryManager on XPS 12 (9Q33) in Yosemite

Status
Not open for further replies.
I tried coconutBattery after patching it with the patch in the ACPI-Battery-Manager repo. Didn't seem to show anything too useful though.

View attachment 109687

I tried coconutbattery from here: http://www.coconut-flavour.com/coconutbattery/

Didn't need a patch.

Maybe they fixed the problem that their app had with my driver (I might have dropped them a note about it -- I can't even remember).

Edit: New coconut battery goes through system APIs instead of looking at ioreg directly. So now it works with ACPIBatteryManager.kext without patches.
 
I tried coconutbattery from here: http://www.coconut-flavour.com/coconutbattery/

Didn't need a patch.

Maybe they fixed the problem that their app had with my driver (I might have dropped them a note about it -- I can't even remember).

Edit: New coconut battery goes through system APIs instead of looking at ioreg directly. So now it works with ACPIBatteryManager.kext without patches.

Without a patch, coconutBattery shows this error:

Screen Shot 2014-10-25 at 9.57.33 AM.png
Clicking on the exclamation mark, I get this debug log:

Code:
[FONT=Helvetica]Debug information:[/FONT]
[FONT=Helvetica]Battery1: 0[/FONT]
[FONT=Helvetica]Battery2: 0[/FONT]
[FONT=Helvetica]Health1: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array[/FONT]
[FONT=Helvetica]Health1: (null)[/FONT]
[FONT=Helvetica]Health2: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array[/FONT]
[FONT=Helvetica]Health2: (null)[/FONT]
[FONT=Helvetica]BatteryID: 1c10e7a0f2064cae550b35e434cd353f[/FONT]
[FONT=Helvetica]Full1: {[/FONT]
[FONT=Helvetica]    Amperage = 2436;[/FONT]
[FONT=Helvetica]    AtCriticalLevel = 0;[/FONT]
[FONT=Helvetica]    AtWarnLevel = 0;[/FONT]
[FONT=Helvetica]    AvgTimeToEmpty = 65535;[/FONT]
[FONT=Helvetica]    AvgTimeToFull = 110;[/FONT]
[FONT=Helvetica]    BatteryInstalled = 1;[/FONT]
[FONT=Helvetica]    BatteryInvalidWakeSeconds = 30;[/FONT]
[FONT=Helvetica]    BatterySerialNumber = "PABAS0241231-41167";[/FONT]
[FONT=Helvetica]    BatteryType = "Li-Ion";[/FONT]
[FONT=Helvetica]    CellVoltage =     ([/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1953[/FONT]
[FONT=Helvetica]    );[/FONT]
[FONT=Helvetica]    CurrentCapacity = 17280;[/FONT]
[FONT=Helvetica]    CycleCount = 90;[/FONT]
[FONT=Helvetica]    DesignCapacity = 7333;[/FONT]
[FONT=Helvetica]    DeviceName = PABAS0241231;[/FONT]
[FONT=Helvetica]    ExternalChargeCapable = 1;[/FONT]
[FONT=Helvetica]    ExternalConnected = 1;[/FONT]
[FONT=Helvetica]    FirmwareSerialNumber = 266599;[/FONT]
[FONT=Helvetica]    FullyCharged = 0;[/FONT]
[FONT=Helvetica]    IOGeneralInterest = "IOCommand is not serializable";[/FONT]
[FONT=Helvetica]    InstantAmperage = 2444;[/FONT]
[FONT=Helvetica]    InstantTimeToEmpty = 65535;[/FONT]
[FONT=Helvetica]    InstantTimeToFull = 110;[/FONT]
[FONT=Helvetica]    IsCharging = 1;[/FONT]
[FONT=Helvetica]    LegacyBatteryInfo =     {[/FONT]
[FONT=Helvetica]        Amperage = 2436;[/FONT]
[FONT=Helvetica]        Capacity = 6793;[/FONT]
[FONT=Helvetica]        Current = 17280;[/FONT]
[FONT=Helvetica]        "Cycle Count" = 90;[/FONT]
[FONT=Helvetica]        Flags = 7;[/FONT]
[FONT=Helvetica]        Voltage = 7806;[/FONT]
[FONT=Helvetica]    };[/FONT]
[FONT=Helvetica]    ManufactureDate = 0;[/FONT]
[FONT=Helvetica]    Manufacturer = SANYO;[/FONT]
[FONT=Helvetica]    MaxCapacity = 6793;[/FONT]
[FONT=Helvetica]    MaxErr = 0;[/FONT]
[FONT=Helvetica]    PermanentFailureStatus = 0;[/FONT]
[FONT=Helvetica]    PostChargeWaitSeconds = 120;[/FONT]
[FONT=Helvetica]    PostDischargeWaitSeconds = 120;[/FONT]
[FONT=Helvetica]    "Quick Poll" = 0;[/FONT]
[FONT=Helvetica]    Serial = 41167;[/FONT]
[FONT=Helvetica]    Temperature = 0;[/FONT]
[FONT=Helvetica]    TimeRemaining = 110;[/FONT]
[FONT=Helvetica]    Voltage = 7806;[/FONT]
[FONT=Helvetica]}[/FONT]
[FONT=Helvetica]Full1: 36
[/FONT]

Perhaps the problem is that the DesignCapacity and MaxCapacity shown here are not what the ACPIBatteryManager is reporting. In fact the CurrentCapacity is greater than those for some reason.

I did your patch for "Time Remaining 2" and it also still doesn't work. Stepping through the program, it looks like in the updateStatusItem IOPSCopyPowerSourcesList(psBlob) is returning an array with 0 items in it, so that's probably why it's not working.
 
Without a patch, coconutBattery shows this error:

View attachment 109756
Clicking on the exclamation mark, I get this debug log:

Code:
[FONT=Helvetica]Debug information:[/FONT]
[FONT=Helvetica]Battery1: 0[/FONT]
[FONT=Helvetica]Battery2: 0[/FONT]
[FONT=Helvetica]Health1: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array[/FONT]
[FONT=Helvetica]Health1: (null)[/FONT]
[FONT=Helvetica]Health2: *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array[/FONT]
[FONT=Helvetica]Health2: (null)[/FONT]
[FONT=Helvetica]BatteryID: 1c10e7a0f2064cae550b35e434cd353f[/FONT]
[FONT=Helvetica]Full1: {[/FONT]
[FONT=Helvetica]    Amperage = 2436;[/FONT]
[FONT=Helvetica]    AtCriticalLevel = 0;[/FONT]
[FONT=Helvetica]    AtWarnLevel = 0;[/FONT]
[FONT=Helvetica]    AvgTimeToEmpty = 65535;[/FONT]
[FONT=Helvetica]    AvgTimeToFull = 110;[/FONT]
[FONT=Helvetica]    BatteryInstalled = 1;[/FONT]
[FONT=Helvetica]    BatteryInvalidWakeSeconds = 30;[/FONT]
[FONT=Helvetica]    BatterySerialNumber = "PABAS0241231-41167";[/FONT]
[FONT=Helvetica]    BatteryType = "Li-Ion";[/FONT]
[FONT=Helvetica]    CellVoltage =     ([/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1951,[/FONT]
[FONT=Helvetica]        1953[/FONT]
[FONT=Helvetica]    );[/FONT]
[FONT=Helvetica]    CurrentCapacity = 17280;[/FONT]
[FONT=Helvetica]    CycleCount = 90;[/FONT]
[FONT=Helvetica]    DesignCapacity = 7333;[/FONT]
[FONT=Helvetica]    DeviceName = PABAS0241231;[/FONT]
[FONT=Helvetica]    ExternalChargeCapable = 1;[/FONT]
[FONT=Helvetica]    ExternalConnected = 1;[/FONT]
[FONT=Helvetica]    FirmwareSerialNumber = 266599;[/FONT]
[FONT=Helvetica]    FullyCharged = 0;[/FONT]
[FONT=Helvetica]    IOGeneralInterest = "IOCommand is not serializable";[/FONT]
[FONT=Helvetica]    InstantAmperage = 2444;[/FONT]
[FONT=Helvetica]    InstantTimeToEmpty = 65535;[/FONT]
[FONT=Helvetica]    InstantTimeToFull = 110;[/FONT]
[FONT=Helvetica]    IsCharging = 1;[/FONT]
[FONT=Helvetica]    LegacyBatteryInfo =     {[/FONT]
[FONT=Helvetica]        Amperage = 2436;[/FONT]
[FONT=Helvetica]        Capacity = 6793;[/FONT]
[FONT=Helvetica]        Current = 17280;[/FONT]
[FONT=Helvetica]        "Cycle Count" = 90;[/FONT]
[FONT=Helvetica]        Flags = 7;[/FONT]
[FONT=Helvetica]        Voltage = 7806;[/FONT]
[FONT=Helvetica]    };[/FONT]
[FONT=Helvetica]    ManufactureDate = 0;[/FONT]
[FONT=Helvetica]    Manufacturer = SANYO;[/FONT]
[FONT=Helvetica]    MaxCapacity = 6793;[/FONT]
[FONT=Helvetica]    MaxErr = 0;[/FONT]
[FONT=Helvetica]    PermanentFailureStatus = 0;[/FONT]
[FONT=Helvetica]    PostChargeWaitSeconds = 120;[/FONT]
[FONT=Helvetica]    PostDischargeWaitSeconds = 120;[/FONT]
[FONT=Helvetica]    "Quick Poll" = 0;[/FONT]
[FONT=Helvetica]    Serial = 41167;[/FONT]
[FONT=Helvetica]    Temperature = 0;[/FONT]
[FONT=Helvetica]    TimeRemaining = 110;[/FONT]
[FONT=Helvetica]    Voltage = 7806;[/FONT]
[FONT=Helvetica]}[/FONT]
[FONT=Helvetica]Full1: 36

I did your patch for "Time Remaining 2" and it also still doesn't work. Stepping through the program, it looks like in the updateStatusItem IOPSCopyPowerSourcesList(psBlob) is returning an array with 0 items in it, so that's probably why it's not working.[/FONT]

So there must be something in the ioreg that the system doesn't like... May be a second battery with incomplete information (can be disabled via DSDT edits).

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 to an ioreg from any other version of IORegistryExplorer.app.
 
So there must be something in the ioreg that the system doesn't like... May be a second battery with incomplete information (can be disabled via DSDT edits).

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 to an ioreg from any other version of IORegistryExplorer.app.

I uploaded the ioreg earlier in the thread. Here it is again:

View attachment nuudles.ioreg

It seems like the MaxCapacity and DesignCapacity are incorrect in the ioreg, but the ACPIBatteryManager is reporting the correct values:

Code:
Oct 24 22:11:30 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 22:11:30 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
 
I uploaded the ioreg earlier in the thread. Here it is again:

View attachment 109757

It is corrupt. Follow the instructions carefully.

It seems like the MaxCapacity and DesignCapacity are incorrect in the ioreg, but the ACPIBatteryManager is reporting the correct values:

Code:
Oct 24 22:11:30 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 24 22:11:30 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706

Post ioreg.
 
Sorry about that. Try this one: View attachment 109759

You can see that Amperage and InstantAmperage is invalid.

Provide the data from system.log that preceded this ioreg capture and I'll see what I'm doing wrong in the kext as far as dealing with the invalid data.

But the problem originates in DSDT, I think. You should debug it with ACPIDebug.kext.
 
You can see that Amperage and InstantAmperage is invalid.

Provide the data from system.log that preceded this ioreg capture and I'll see what I'm doing wrong in the kext as far as dealing with the invalid data.

But the problem originates in DSDT, I think. You should debug it with ACPIDebug.kext.

Here's the latest dump from system.log with regards to the ACPIBatteryManager:

Code:
Oct 25 10:38:20 nuudells locationd[54]: Location icon should now be in state 'Active'
Oct 25 10:38:21 nuudells sandboxd[276] ([280]): com.apple.metada(280) deny mach-lookup com.apple.cfnetwork.cfnetworkagent
Oct 25 10:38:22 --- last message repeated 1 time ---
Oct 25 10:38:22 nuudells com.apple.xpc.launchd[1] (com.apple.quicklook[2102]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1c84
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x6086
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1e05
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 973
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 3294
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x39b
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 25 10:38:23 nuudells SystemUIServer[1959]: -[NSURL unload]: unrecognized selector sent to instance 0x6000000bc920
Oct 25 10:38:23 --- last message repeated 1 time ---
Oct 25 10:38:23 nuudells SystemUIServer[1959]: (
		0   CoreFoundation                      0x00007fff9363b64c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff87d296de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff9363e6bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff93585a84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff935855f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff87a1efac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff87a1eab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x00000001129c4901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff93559a0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff935598d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff9355984b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff9354b3c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff9354a838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff89f2143f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff89f211ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff89f20ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff88421821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff88420fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff88414f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010e02f39a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff848bd5c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 25 10:38:23 nuudells locationd[54]: Location icon should now be in state 'Inactive'

Where is the Amperage derived from in the DSDT? It's based on the fAverageRate?
 
Here's the latest dump from system.log with regards to the ACPIBatteryManager:

Code:
Oct 25 10:38:20 nuudells locationd[54]: Location icon should now be in state 'Active'
Oct 25 10:38:21 nuudells sandboxd[276] ([280]): com.apple.metada(280) deny mach-lookup com.apple.cfnetwork.cfnetworkagent
Oct 25 10:38:22 --- last message repeated 1 time ---
Oct 25 10:38:22 nuudells com.apple.xpc.launchd[1] (com.apple.quicklook[2102]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1c84
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x6086
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1e05
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 973
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 3294
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x39b
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 25 10:38:23 nuudells SystemUIServer[1959]: -[NSURL unload]: unrecognized selector sent to instance 0x6000000bc920
Oct 25 10:38:23 --- last message repeated 1 time ---
Oct 25 10:38:23 nuudells SystemUIServer[1959]: (
		0   CoreFoundation                      0x00007fff9363b64c __exceptionPreprocess + 172
		1   libobjc.A.dylib                     0x00007fff87d296de objc_exception_throw + 43
		2   CoreFoundation                      0x00007fff9363e6bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
		3   CoreFoundation                      0x00007fff93585a84 ___forwarding___ + 1028
		4   CoreFoundation                      0x00007fff935855f8 _CF_forwarding_prep_0 + 120
		5   Foundation                          0x00007fff87a1efac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
		6   Foundation                          0x00007fff87a1eab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
		7   Battery                             0x00000001129c4901 _volumeChanged + 16478
		8   CoreFoundation                      0x00007fff93559a0d __CFMachPortPerform + 285
		9   CoreFoundation                      0x00007fff935598d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
		10  CoreFoundation                      0x00007fff9355984b __CFRunLoopDoSource1 + 475
		11  CoreFoundation                      0x00007fff9354b3c7 __CFRunLoopRun + 2375
		12  CoreFoundation                      0x00007fff9354a838 CFRunLoopRunSpecific + 296
		13  HIToolbox                           0x00007fff89f2143f RunCurrentEventLoopInMode + 235
		14  HIToolbox                           0x00007fff89f211ba ReceiveNextEventCommon + 431
		15  HIToolbox                           0x00007fff89f20ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
		16  AppKit                              0x00007fff88421821 _DPSNextEvent + 964
		17  AppKit                              0x00007fff88420fd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
		18  AppKit                              0x00007fff88414f73 -[NSApplication run] + 594
		19  SystemUIServer                      0x000000010e02f39a SystemUIServer + 21402
		20  libdyld.dylib                       0x00007fff848bd5c9 start + 1
		21  ???                                 0x0000000000000001 0x0 + 1
	)
Oct 25 10:38:23 nuudells locationd[54]: Location icon should now be in state 'Inactive'

Where is the Amperage derived from in the DSDT? It's based on the fAverageRate?

I see nothing wrong with that log.
Code:
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 973
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 3294
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x39b

If you're going to post a log, also post the ioreg that corresponds. You need to capture a log that leads to Amperage and InstantAmperage being set incorrectly.

Check in your system.log history to find the logs that were written at the time you captured the ioreg you posted last.
 
I see nothing wrong with that log.
Code:
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 973
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 3294
Oct 25 10:38:23 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x39b

If you're going to post a log, also post the ioreg that corresponds. You need to capture a log that leads to Amperage and InstantAmperage being set incorrectly.

Check in your system.log history to find the logs that were written at the time you captured the ioreg you posted last.

OK, here's the log around the time I created the IOReg:

Code:
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
		7   Battery                             0x00000001129c4901 _volumeChanged + 16478
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0xffffffff
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x6572
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1f45
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate is ACPI_UNKNOWN
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: adjusted fCurrentRate to 65536
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x10000
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Oct 25 10:27:48 nuudells kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::pollingTimeOut called
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0xd6d8
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0xc706
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x1
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x1d4c
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x1f4
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x96
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'PABAS0241231'
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '41167'
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'Li-Ion'
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SANYO'
Oct 25 10:28:18 nuudells kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x1
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x19fb
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x654a
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1e63
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 886
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 3457
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x81bb
Oct 25 10:28:19 nuudells kernel[0]: AppleSmartBattery: Battery is discharging.

I can see that the one that was called right before the IOReg was generated has a fCurrentRate of -1, but the one right after that one has what seems to be a correct fCurrentRate.
 
Status
Not open for further replies.
Back
Top