Contribute
Register

Battery Manager with Fix for Boot without Batteries

Status
Not open for further replies.
Hello RehabMan,
Thank you for your work.
But I have problems with my Dell Latitude E6530 Battery.
Can you help me with DSDT patch?
Thank you.
 

Attachments

  • DSDT.aml.zip
    18.5 KB · Views: 66
@RehabMan:
I thought about doing that but it means I'd have to introduce more of the original ASUS SSDT code back in and I'm kinda loathe to doing that, as I'm definitely reaching more P-States with ssdtPRGen's SSDT than I was with the original Asus SSDT tables that were patched for me (to prevent AICPUPM from KPing), which is giving the same battery life in OS X that I get out of Windows (a lovely two hours...!).

Anyway, I don't wish to derail your thread any longer, so thanks a lot for the battery patch which is much, much cleaner than the mix I was using in the past!
 
Hello RehabMan,
Thank you for your work.
But I have problems with my Dell Latitude E6530 Battery.
Can you help me with DSDT patch?
Thank you.

What kind of problems? All your EC registers are 8-bit (lucky you!).

Install the debug version of battery manager to diagnose the actual problem.
 
@RehabMan:
I thought about doing that but it means I'd have to introduce more of the original ASUS SSDT code back in and I'm kinda loathe to doing that, as I'm definitely reaching more P-States with ssdtPRGen's SSDT than I was with the original Asus SSDT tables that were patched for me (to prevent AICPUPM from KPing), which is giving the same battery life in OS X that I get out of Windows (a lovely two hours...!).

If you don't need it, then yes, leave it alone. But major misconception about SSDT is that they are specific to speed step/power management. Really, they are just 'extensions' to DSDT. Once loaded into ACPI namespace, DSDT and all SSDT content are really peers. This means you can 'cherry pick' all you want without affecting your Apple specific SSDT for CPU speedstep.

Anyway, I don't wish to derail your thread any longer, so thanks a lot for the battery patch which is much, much cleaner than the mix I was using in the past!

Glad it was useful...
 
This is my problem.

AppleSmartBatteryManager: Version 1.33 starting
AppleSmartBatteryManager: Version 1.33 starting
RTC: Only single RAM bank (128 bytes)
AppleSmartBatteryManager: Version 1.33 starting
IntelCPUMonitor: CPU family 0x6, model 0x3a, stepping 0x9, cores 4, threads 8
IntelCPUMonitor: Using efi
IntelCPUMonitor: BusClock=100MHz FSB=398MHz
IntelCPUMonitor: Platform string k62
AppleSmartBattery: Using ACPI regular battery information method _BIF
 

Attachments

  • Screen Shot 2013-08-13 at 21.27.00.png
    Screen Shot 2013-08-13 at 21.27.00.png
    23 KB · Views: 125
  • Screen Shot 2013-08-13 at 21.32.45.png
    Screen Shot 2013-08-13 at 21.32.45.png
    78.4 KB · Views: 168
This is my problem.

AppleSmartBatteryManager: Version 1.33 starting
AppleSmartBatteryManager: Version 1.33 starting
RTC: Only single RAM bank (128 bytes)
AppleSmartBatteryManager: Version 1.33 starting
IntelCPUMonitor: CPU family 0x6, model 0x3a, stepping 0x9, cores 4, threads 8
IntelCPUMonitor: Using efi
IntelCPUMonitor: BusClock=100MHz FSB=398MHz
IntelCPUMonitor: Platform string k62
AppleSmartBattery: Using ACPI regular battery information method _BIF

Did you install the debug version of AppleSmartBatteryManager? Do that, then filter system.log for 'battery'... You should end up with more output than shown above.
 
sorry, here is debug version
 

Attachments

  • Boot-Messages.txt.zip
    4.1 KB · Views: 77
  • system.log.zip
    563.6 KB · Views: 59
sorry, here is debug version

Part of the issue is your DSDT is reporting three batteries active. I assume your laptop only has one, probably the first one (BAT0) in DSDT, and the battery kext has only been tested with one battery anyway... So I would disable the others:

Code:
into method _STA parent label BAT1 replace_content begin Return (Zero) end;
into method _STA parent label BAT2 replace_content begin Return (Zero) end;

See how that works out...

BTW: I assume the DSDT you posted is unedited (at least with respect to battery/EC)?
 
I am currently trying to create a general battery patch for my line of Asus laptops (Zenbooks).

I've created a test DSDT and I have applied the patch for the Asus N55SL (most Asus laptop DSDTs are very similar; also the patch is from page 22). The reason why I want to use this patch is because I've that heard it properly reports the serial number and more battery information.

This is a sample debug data:
Code:
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::pollingTimeOut called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatterySTA called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBIX called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBIX: evaluateObject error 0xe00002bc
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBST called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x2
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x9f9
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xa799
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1ce8
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xa8e
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery: Battery is charging.
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called

Here is the ioreg output:
Code:
+-o AppleSmartBattery  <class AppleSmartBattery, id 0x1000001f8, registered, ma$
    {
      "Amperage" = 0
      "CurrentCapacity" = 42905
      "InstantTimeToFull" = 65535
      "InstantTimeToEmpty" = 65535
      "AvgTimeToEmpty" = 65535
      "BatteryInvalidWakeSeconds" = 30
      "AtCriticalLevel" = No
      "AtWarnLevel" = No
      "CellVoltage" = (1850,1850,1850,1850)
      "ExternalChargeCapable" = Yes
      "PostChargeWaitSeconds" = 120
      "IsCharging" = No
      "InstantAmperage" = 0
      "PostDischargeWaitSeconds" = 120
      "BatteryInstalled" = Yes
      "Voltage" = 7400
      "BatterySerialNumber" = "Unknown-Unknown"
      "AvgTimeToFull" = 65535
      "FullyCharged" = Yes
      "LegacyBatteryInfo" = {"Amperage"=0,"Flags"=5,"Current"=42905,"Voltage"=7$
      "IOGeneralInterest" = "IOCommand is not serializable"
      "ExternalConnected" = Yes
      "TimeRemaining" = 65535
    }

I've also attached my DSDT.
 

Attachments

  • DSDT.aml.zip
    35.1 KB · Views: 79
I am currently trying to create a general battery patch for my line of Asus laptops (Zenbooks).

I've created a test DSDT and I have applied the patch for the Asus N55SL (most Asus laptop DSDTs are very similar; also the patch is from page 22). The reason why I want to use this patch is because I've that heard it properly reports the serial number and more battery information.

This is a sample debug data:
Code:
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::pollingTimeOut called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatterySTA called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBIX called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBIX: evaluateObject error 0xe00002bc
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBST called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x2
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x9f9
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xa799
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x1ce8
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xa8e
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery: Battery is charging.
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
2013-08-13 8:41:43.000 PM kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called

Here is the ioreg output:
Code:
+-o AppleSmartBattery  <class AppleSmartBattery, id 0x1000001f8, registered, ma$
    {
      "Amperage" = 0
      "CurrentCapacity" = 42905
      "InstantTimeToFull" = 65535
      "InstantTimeToEmpty" = 65535
      "AvgTimeToEmpty" = 65535
      "BatteryInvalidWakeSeconds" = 30
      "AtCriticalLevel" = No
      "AtWarnLevel" = No
      "CellVoltage" = (1850,1850,1850,1850)
      "ExternalChargeCapable" = Yes
      "PostChargeWaitSeconds" = 120
      "IsCharging" = No
      "InstantAmperage" = 0
      "PostDischargeWaitSeconds" = 120
      "BatteryInstalled" = Yes
      "Voltage" = 7400
      "BatterySerialNumber" = "Unknown-Unknown"
      "AvgTimeToFull" = 65535
      "FullyCharged" = Yes
      "LegacyBatteryInfo" = {"Amperage"=0,"Flags"=5,"Current"=42905,"Voltage"=7$
      "IOGeneralInterest" = "IOCommand is not serializable"
      "ExternalConnected" = Yes
      "TimeRemaining" = 65535
    }

I've also attached my DSDT.

This DSDT has already been patched. Can you upload the unpatched DSDT.

Also, this is definitely different than the other ASUS I recently built patches for as it provides a _BIX method. This is actually the first DSDT I've seen with _BIX implemented. It might be best to just remove it, such that _BIF is used instead, but I'll know more when I see the original DSDT.
 
Status
Not open for further replies.
Back
Top