Contribute
Register

x220 Lenovo AppleSmartBatteryManager DSDT

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
how your battery has no wear ? :)
Either the DSDT code in my ProBook is lying, or I don't make heavy use of the battery. Probably some of both... I do run on AC most of the time.

anyway ok if we want the % to display like windows there must be other calculation in smartbattery manager.
maybe an option for the future?
I don't think so, as I don't know what kind of math that might be... Maybe some of that "new math" they used to teach back in the 1990s.

I guess if you really want to display the (bogus) results, you could do some adjustments in DSDT code...
 
Joined
Jul 16, 2011
Messages
71
Motherboard
Gigabyte Z270X ULTRA GAMING
CPU
i5-7600K
Graphics
Who Knows
Hi all,

i need help because i can't male battery status working on my X220,

here's my DSDT.aml enclosed

as far as i've seen, i've got like psy_22 or fraisdos125, an issue with 16 bit field SBBM in my GBIF section.

but when i applied the given patch, i've got an error (B1B2 not known)

could you plz help me :)

Thanks !!
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi all,

i need help because i can't male battery status working on my X220,

here's my DSDT.aml enclosed

as far as i've seen, i've got like psy_22 or fraisdos125, an issue with 16 bit field SBBM in my GBIF section.

but when i applied the given patch, i've got an error (B1B2 not known)

could you plz help me :)

Thanks !!
There is an X220 patch in my laptop DSDT patch repo: https://github.com/RehabMan/Laptop-DSDT-Patch

I have made the necessary additions to it for your DSDT.

Note: Your DSDT also has Mutex objects declared with a non-zero SyncLevel, so you might want to apply "Fix Mutex with non-zero SyncLevel" as well (use it only if you have an issue).
 
Joined
Jul 16, 2011
Messages
71
Motherboard
Gigabyte Z270X ULTRA GAMING
CPU
i5-7600K
Graphics
Who Knows
Thanks you very much !!!

Sadly there's still an issue.
The patch make the battery detection works. (when i plug or not the AC cable).

But the % of battery is stuck to 0%. I tried also with stock AppleACPIPlatform.kext.

I rolled back to VoodooBattery and AppleACPIplatform 1.3.5 till i find a solution

Thanks a lot Rehabman !
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thanks you very much !!!

Sadly there's still an issue.
The patch make the battery detection works. (when i plug or not the AC cable).

But the % of battery is stuck to 0%. I tried also with stock AppleACPIPlatform.kext.

I rolled back to VoodooBattery and AppleACPIplatform 1.3.5 till i find a solution

Thanks a lot Rehabman !
Install the debug version of ACPIBatteryManager.kext. Provide output in system.log from the battery manager. Also be sure you removed VoodooBattery. Also, provide ioreg dump (with patched DSDT and ACPIBatteryManager installed): http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html
 
Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
I have the same problem, also own a x220 (i7 version with 2640m CPU)

here is the debug output

Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x5fa2
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xb22
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x29c3
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x6a92
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery: Battery is discharging.
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::pollingTimeOut called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF: evaluateObject error 0xe00002bc
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x6f1f
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xb22
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2963
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x6cd8
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery: Battery is discharging.
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I have the same problem, also own a x220 (i7 version with 2640m CPU)

here is the debug output

Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x5fa2
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xb22
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x29c3
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x6a92
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery: Battery is discharging.
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Nov 13 00:08:31 nikax220 kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::pollingTimeOut called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatterySTA called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBIF: evaluateObject error 0xe00002bc
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBatteryManager::getBatteryBST called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x1
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0x6f1f
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xb22
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2963
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x6cd8
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery: Battery is discharging.
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::constructAppleSerialNumber called
Nov 13 00:09:01 nikax220 kernel[0]: AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Did you patch your DSDT for battery?
 
Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
Wow, you're fast... I was still editing my post. Yes I did, I used your lenovo x220 patch. I've appended my dsdt + ioreg dump from darwindumper to my first post. Need anything else?
 
Top