Contribute
Register

[Guide] How to patch DSDT for working battery status

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,621
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS

fnc777

Banned
Joined
Oct 23, 2013
Messages
78
Motherboard
I still didn't
CPU
read the
Graphics
Rules!
How to patch DSDT for working battery status

Use the debug version of ACPIBatteryManager.kext to see what is being returned from _BST.

Code:
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::pollingTimeOut calledJul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x2
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: acpibat_bif size = 13
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fPowerUnit       = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignCapacity  = 0x1130
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fMaxCapacity     = 0x1ac
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fBatteryTech     = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fDesignVoltage   = 0x2b5c
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fCapacityWarning = 0x2a
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fLowWarning      = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fDeviceName      = 'Dell'
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fSerialNumber    = '1219'
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fType            = 'LION'
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBIF: fManufacturer    = 'SIMPLO'
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit       = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus    = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate     = 0x1
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x1ac
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage  = 0x30d2
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 38
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x0
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery: Battery is charged.
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Jul 24 09:57:31 d-172-28-114-71 kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
 
Joined
Feb 18, 2011
Messages
78
Motherboard
ProBook 4340s B6L98EA
CPU
i5 2450m
Graphics
Intel HD 3000
Mobile Phone
  1. Android
How to patch DSDT for working battery status

Hello Experts,
Can you please help me to catch the problem with battery status update (percentage and picture)? If i click on Battery icon, "Calculation Time remaining..." didn't show anything a while. I can wait for 5-10 mins and still no information about time battery to drain. Another thing is when i select Show percentage the percents is showed, but stay the same from the moment when i check this option on Battery menu. Nothing changes, percents are still the same for a while. When i then unselect "Show percentage" and then select this point again, the percentage have changed. This is for the picture too.


I use ACPIBatteryManager (debug version) to see the BST. Can you please help me to clarify what is the reason of abnormal battery status?

I use patched DSDT with clover probook installer. My probook is 4340s 7 series with Sandy.

Thanks a lot in advance!

Code:
24/07/14 23:16:00,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0xabf
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcda
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2bd8
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xabf
24/07/14 23:17:42,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x65a
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xccb
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c08
24/07/14 23:17:42,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x88c
24/07/14 23:18:04,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x3d0
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcc2
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c84
24/07/14 23:18:04,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x62e
24/07/14 23:18:26,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x35f
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcbc
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca2
24/07/14 23:18:26,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x4c6
24/07/14 23:18:45,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x30f
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcb6
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cac
24/07/14 23:18:45,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3ea
24/07/14 23:19:15,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x30f
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcb6
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cac
24/07/14 23:19:15,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x37c
24/07/14 23:19:33,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x4a6
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcac
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c8d
24/07/14 23:19:33,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x411
24/07/14 23:19:55,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x386
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xca6
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cac
24/07/14 23:19:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3cb
24/07/14 23:20:25,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x386
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xca6
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cac
24/07/14 23:20:25,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3a8
24/07/14 23:20:55,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x386
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xca6
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cac
24/07/14 23:20:55,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x397
24/07/14 23:21:01,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x850
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc96
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c82
24/07/14 23:21:01,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x5f3
24/07/14 23:21:21,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x2ec
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc8f
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cbe
24/07/14 23:21:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x46f
24/07/14 23:21:51,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x2ec
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc8f
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cbe
24/07/14 23:21:51,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3ad
24/07/14 23:22:08,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x45d
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc82
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c70
24/07/14 23:22:08,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x405
24/07/14 23:22:30,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x39a
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc79
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c82
24/07/14 23:22:30,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3cf
24/07/14 23:22:52,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x312
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc73
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca3
24/07/14 23:22:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x370
24/07/14 23:23:22,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x312
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc73
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca3
24/07/14 23:23:22,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x341
24/07/14 23:23:52,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x312
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc73
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca3
24/07/14 23:23:52,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x329
24/07/14 23:23:56,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x316
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc64
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cad
24/07/14 23:23:56,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x31f
24/07/14 23:24:21,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x60a
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc5f
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c33
24/07/14 23:24:21,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x494
24/07/14 23:24:43,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x52e
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc59
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c57
24/07/14 23:24:43,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x4e1
24/07/14 23:25:05,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x36e
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc53
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c93
24/07/14 23:25:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x427
24/07/14 23:25:35,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x36e
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc53
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c93
24/07/14 23:25:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x3ca
24/07/14 23:26:05,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x36e
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc53
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c93
24/07/14 23:26:05,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x39c
24/07/14 23:26:35,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x36e
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc53
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2c93
24/07/14 23:26:35,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x385
24/07/14 23:26:53,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x314
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc3a
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca2
24/07/14 23:26:53,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x34c
24/07/14 23:27:23,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x314
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc3a
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca2
24/07/14 23:27:23,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x330
24/07/14 23:27:40,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x294
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc31
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cb2
24/07/14 23:27:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x2e2
24/07/14 23:28:10,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x294
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc31
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cb2
24/07/14 23:28:10,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x2bb
24/07/14 23:28:40,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x294
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc31
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2cb2
24/07/14 23:28:40,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x2a7
24/07/14 23:28:46,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x304
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc25
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca5
24/07/14 23:28:46,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x2d5
24/07/14 23:29:16,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x304
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xc25
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2ca5
24/07/14 23:29:16,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x2ec



Just 1 update, after the sleep battery status goes well, i can see the percentage change and Time remaining.... But when i shutdown and power on - battery status was broken as previously mentioned.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,621
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

Hello Experts,
Can you please help me to catch the problem with battery status update (percentage and picture)? If i click on Battery icon, "Calculation Time remaining..." didn't show anything a while. I can wait for 5-10 mins and still no information about time battery to drain. Another thing is when i select Show percentage the percents is showed, but stay the same from the moment when i check this option on Battery menu. Nothing changes, percents are still the same for a while. When i then unselect "Show percentage" and then select this point again, the percentage have changed. This is for the picture too.


I use ACPIBatteryManager (debug version) to see the BST. Can you please help me to clarify what is the reason of abnormal battery status?

I use patched DSDT with clover probook installer. My probook is 4340s 7 series with Sandy.

Thanks a lot in advance!

Code:
24/07/14 23:16:00,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x1
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0xabf
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xcda
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2bd8
24/07/14 23:16:00,000 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0xabf
24/07/14 23:17:42,000 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
...

Just 1 update, after the sleep battery status goes well, i can see the percentage change and Time remaining.... But when i shutdown and power on - battery status was broken as previously mentioned.

Looks normal... Make sure you're capturing debug output when it is behaving incorrectly.

What version of OS X? There was a known issue/bug in 10.9.3 (or was it 10.9.2)...
 
Joined
Jul 6, 2014
Messages
6
Motherboard
Asus G2S
CPU
Core2Duo T7700/PM965
Graphics
GeForce 8600M GT, 1920x1200
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

I started to patch my DSDT, does the names I'm choosing for the variables are ok?

Then, as I understand, I need to replace each instance of each variable with B1B2(VAR1,VAR2) for 16-bits variables.

Also, do I need to do anything to Device BAT0? I've seen a patch that added Return (Zero) for that device.

Code:
OperationRegion (ECOR, EmbeddedControl, Zero, 0xFF)            
Field (ECOR, ByteAcc, Lock, Preserve)
            {
                Offset (0x04), 
                CMD1,   8, 
                CDT1,   8, 
                CDT2,   8, 
                CDT3,   8, 
                Offset (0x80), 
                EPWS,   8, 
                EB0S,   8, 
                EB1S,   8, 
                EB0R,   8, 
                EB1R,   8, 
                EPWF,   8, 
                Offset (0x87), 
                EB0T,   8, 
                EB1T,   8, 
                Offset (0x8A), 
                HKEN,   1, 
                Offset (0x93), 
                // was TAH0, 16
                AH00,   8,
                AH01,   8,
                // end TAH0
                // was TAH1, 16 
                TA00,   8,
                TA01,   8,
                // end TAH1 
                TSTP,   8, 
                Offset (0x9C), 
                CDT4,   8, 
                CDT5,   8, 
                Offset (0xA0), 
                ECPU,   8, 
                ECRT,   8, 
                EPSV,   8, 
                EACT,   8, 
                TH1R,   8, 
                TH1L,   8, 
                TH0R,   8, 
                TH0L,   8, 
                Offset (0xB0),
                // was B0PN, 16
                BP00,   8,
                BP01,   8,
                // end B0PN
                // was B0VL, 16 
                BV00,   8,
                BV01,   8,
                // end B0VL
                // was B0RC, 16 
                BR00,   8,
                BR01,   8,
                // end B0RC
                // was B0FC, 16 
                BF00,   8,
                BF01,   8,
                // end B0FC
                // was B0MD 
                BM00,   8,
                BM01,   8,
                // end B0MD
                // was B0ST, 16 
                BS00,   8,
                BS01,   8,
                // end B0ST
                // was B0CC, 16 
                BC00,   8,
                BC01,   8,
                // end B0CC
                // was B0TM, 16 
                BT00,   8,
                BT01,   8,
                // end B0TM
                // was B0C1, 16
                BC00,   8,
                BC01,   8,
                // end B0C1
                // was B0C2, 16 
                BC10,   8,
                BC11,   8,
                // end B0C2   
                B0C3,   16, 
                B0C4,   16, 
                Offset (0xD0), 
                B1PN,   16, 
                B1VL,   16, 
                B1RC,   16, 
                B1FC,   16, 
                B1MD,   16, 
                B1ST,   16, 
                B1CC,   16, 
                B1TM,   16, 
                B1C1,   16, 
                B1C2,   16, 
                B1C3,   16, 
                B1C4,   16, 
                Offset (0xF0), 
                B0DC,   16, 
                B0DV,   16, 
                B0SN,   16, 
                Offset (0xF8), 
                B1DC,   16, 
                B1DV,   16, 
                B1SN,   16
            }
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,621
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

I started to patch my DSDT, does the names I'm choosing for the variables are ok?

Then, as I understand, I need to replace each instance of each variable with B1B2(VAR1,VAR2) for 16-bits variables.

Also, do I need to do anything to Device BAT0? I've seen a patch that added Return (Zero) for that device.

Code:
OperationRegion (ECOR, EmbeddedControl, Zero, 0xFF)            
Field (ECOR, ByteAcc, Lock, Preserve)
            {
                Offset (0x04), 
                CMD1,   8, 
                CDT1,   8, 
                CDT2,   8, 
                CDT3,   8, 
                Offset (0x80), 
                EPWS,   8, 
                EB0S,   8, 
                EB1S,   8, 
                EB0R,   8, 
                EB1R,   8, 
                EPWF,   8, 
                Offset (0x87), 
                EB0T,   8, 
                EB1T,   8, 
                Offset (0x8A), 
                HKEN,   1, 
                Offset (0x93), 
                // was TAH0, 16
                AH00,   8,
                AH01,   8,
                // end TAH0
                // was TAH1, 16 
                TA00,   8,
                TA01,   8,
                // end TAH1 
                TSTP,   8, 
                Offset (0x9C), 
                CDT4,   8, 
                CDT5,   8, 
                Offset (0xA0), 
                ECPU,   8, 
                ECRT,   8, 
                EPSV,   8, 
                EACT,   8, 
                TH1R,   8, 
                TH1L,   8, 
                TH0R,   8, 
                TH0L,   8, 
                Offset (0xB0),
                // was B0PN, 16
                BP00,   8,
                BP01,   8,
                // end B0PN
                // was B0VL, 16 
                BV00,   8,
                BV01,   8,
                // end B0VL
                // was B0RC, 16 
                BR00,   8,
                BR01,   8,
                // end B0RC
                // was B0FC, 16 
                BF00,   8,
                BF01,   8,
                // end B0FC
                // was B0MD 
                BM00,   8,
                BM01,   8,
                // end B0MD
                // was B0ST, 16 
                BS00,   8,
                BS01,   8,
                // end B0ST
                // was B0CC, 16 
                BC00,   8,
                BC01,   8,
                // end B0CC
                // was B0TM, 16 
                BT00,   8,
                BT01,   8,
                // end B0TM
                // was B0C1, 16
                BC00,   8,
                BC01,   8,
                // end B0C1
                // was B0C2, 16 
                BC10,   8,
                BC11,   8,
                // end B0C2   
                B0C3,   16, 
                B0C4,   16, 
                Offset (0xD0), 
                B1PN,   16, 
                B1VL,   16, 
                B1RC,   16, 
                B1FC,   16, 
                B1MD,   16, 
                B1ST,   16, 
                B1CC,   16, 
                B1TM,   16, 
                B1C1,   16, 
                B1C2,   16, 
                B1C3,   16, 
                B1C4,   16, 
                Offset (0xF0), 
                B0DC,   16, 
                B0DV,   16, 
                B0SN,   16, 
                Offset (0xF8), 
                B1DC,   16, 
                B1DV,   16, 
                B1SN,   16
            }

The names are your choice. As long as they are unique and conform to ACPI rules...

As far as returning 0 from _STA for a given battery, it is only used in the case where there are multiple battery objects in DSDT and the existing code does not return the correct value for a battery not installed.
 
Joined
Jul 6, 2014
Messages
6
Motherboard
Asus G2S
CPU
Core2Duo T7700/PM965
Graphics
GeForce 8600M GT, 1920x1200
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

Thanks RehabMan!

Any ACPI rule I should be aware of? In case of names specifically
 
Joined
Feb 18, 2011
Messages
78
Motherboard
ProBook 4340s B6L98EA
CPU
i5 2450m
Graphics
Intel HD 3000
Mobile Phone
  1. Android
How to patch DSDT for working battery status

Looks normal... Make sure you're capturing debug output when it is behaving incorrectly.

What version of OS X? There was a known issue/bug in 10.9.3 (or was it 10.9.2)...

I use 10.9.4. And for the last update - the goes to sleep randomly solve the problem. Sometimes when i put laptop to sleep - the battery status behavior is normal, but another time - is still no info. Do i need to repatch my dsdt manually or Battery patch is included into Probook Installer (clover version)? for probook 4340s 7 series Sandy ? Where i can research to find this bug?

Thanks a lot RehabMan!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,621
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

I use 10.9.4. And for the last update - the goes to sleep randomly solve the problem. Sometimes when i put laptop to sleep - the battery status behavior is normal, but another time - is still no info. Do i need to repatch my dsdt manually or Battery patch is included into Probook Installer (clover version)? for probook 4340s 7 series Sandy ? Where i can research to find this bug?

Thanks a lot RehabMan!

Make sure you followed one of the ProBook guides...

Battery patch is the same if done manually or using the ProBook Installer. Make sure you keep up with the updates if you're using Clover as Clover (and PBI-Clover Edition) is subject to a bit more churn.
 
Top