Contribute
Register

x220 Lenovo AppleSmartBatteryManager DSDT

Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
I've made a correction to the patches. Please try it.
Unfortunately, no luck so far, still at 0 %.

AppleSmartBattery::pollingTimeOut called
AppleSmartBattery::pollBatteryState: path = 0x2
AppleSmartBattery::pollBatteryState: path = 0x1
AppleSmartBatteryManager::getBatterySTA called
AppleSmartBattery::setBatterySTA: battery_status = 0x1f
AppleSmartBatteryManager::getBatteryBIF called
AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
AppleSmartBatteryManager::getBatteryBIF: evaluateObject error 0xe00002bc
AppleSmartBatteryManager::getBatteryBST called
AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
AppleSmartBattery::setBatteryBST: currentStatus = 0x1
AppleSmartBattery::setBatteryBST: fCurrentRate = 0x31a7
AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x6a04
AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2d59
AppleSmartBattery::setBatteryBST: fAverageRate = 0x3e4d
AppleSmartBattery: Battery is discharging.
AppleSmartBattery::constructAppleSerialNumber called
AppleSmartBattery::rebuildLegacyIOBatteryInfo called
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,205
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Unfortunately, no luck so far, still at 0 %.

AppleSmartBattery::pollingTimeOut called
AppleSmartBattery::pollBatteryState: path = 0x2
AppleSmartBattery::pollBatteryState: path = 0x1
AppleSmartBatteryManager::getBatterySTA called
AppleSmartBattery::setBatterySTA: battery_status = 0x1f
AppleSmartBatteryManager::getBatteryBIF called
AppleSmartBatteryManager::getBatteryBIF: validateObject return 0x0
AppleSmartBatteryManager::getBatteryBIF: evaluateObject error 0xe00002bc
AppleSmartBatteryManager::getBatteryBST called
AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
AppleSmartBattery::setBatteryBST: currentStatus = 0x1
AppleSmartBattery::setBatteryBST: fCurrentRate = 0x31a7
AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0x6a04
AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0x2d59
AppleSmartBattery::setBatteryBST: fAverageRate = 0x3e4d
AppleSmartBattery: Battery is discharging.
AppleSmartBattery::constructAppleSerialNumber called
AppleSmartBattery::rebuildLegacyIOBatteryInfo called
Try using DSDT patch "Fix Mutex with non-zero SyncLevel" from my patch repo.

If that doesn't improve things, I've got a version here with debug traces to get some more information...
 
Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
Try using DSDT patch "Fix Mutex with non-zero SyncLevel" from my patch repo.

If that doesn't improve things, I've got a version here with debug traces to get some more information...
Tried it, no improvement. Thanks for the support!
 

RehabMan

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

Attachments

Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
Please send output in system.log. This should tell us how far it is making it in _BIF/GBIF.
Awesome stuff!

Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering _BIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: { "Calling GBIF, Local7=", 0x1, }
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering GBIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage1"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage2"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage3"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage4"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage5"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering RBDN"
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "Entering RECB", 0xa0, 0x80, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0x10, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: TEMP is now", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0xb0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Storing BYTE at TEMP index=", 0x0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa1, }
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,205
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Awesome stuff!

Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering _BIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: { "Calling GBIF, Local7=", 0x1, }
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering GBIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage1"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage2"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage3"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage4"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage5"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering RBDN"
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "Entering RECB", 0xa0, 0x80, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0x10, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: TEMP is now", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0xb0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Storing BYTE at TEMP index=", 0x0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa1, }
Try a quick experiment if you can. Edit your DSDT and inside Method RECB, where you see:
Code:
                            \RMDT.P2 ("RECB: Creating OperationRegion, Arg0 is", Arg0)
                            OperationRegion (ERAM, EmbeddedControl, Arg0, One)
[B]                            Field (ERAM, ByteAcc, Lock, Preserve)[/B]
                            {
                                BYTE,   8
                            }
Change 'Lock' to 'NoLock'...
Code:
                            \RMDT.P2 ("RECB: Creating OperationRegion, Arg0 is", Arg0)
                            OperationRegion (ERAM, EmbeddedControl, Arg0, One)
                            Field (ERAM, ByteAcc, [B]NoLock[/B], Preserve)
                            {
                                BYTE,   8
                            }
I just want to see if that makes a difference. Otherwise I have another version to try.
 
Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
I don't think it did, output looks the same to me

Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering _BIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: { "Calling GBIF, Local7=", 0x1, }
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering GBIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage1"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage2"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage3"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage4"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage5"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering RBDN"
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "Entering RECB", 0xa0, 0x80, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0x10, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: TEMP is now", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0xb0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Storing BYTE at TEMP index=", 0x0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa1, }
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,205
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I don't think it did, output looks the same to me

Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering _BIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: { "Calling GBIF, Local7=", 0x1, }
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering GBIF"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage1"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage2"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage3"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage4"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Status stage5"
Nov 13 22:34:35 nikax220 kernel[0]: ACPIDebug: "Entering RBDN"
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "Entering RECB", 0xa0, 0x80, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0x10, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: TEMP is now", { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Arg1 is now", 0xb0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Storing BYTE at TEMP index=", 0x0, }
Nov 13 22:34:36 nikax220 kernel[0]: ACPIDebug: { "RECB: Creating OperationRegion, Arg0 is", 0xa1, }
This is becoming a bit of a mystery, because I have the same code (the RECB helper) working on my laptop, but it is running Mavericks. So maybe there is a difference in AppleACPIPlatform between ML and Mavericks...

What version of AppleACPIPlatform are you running:
Code:
# in Terminal
kextstat|grep -y acpiplatform
Attached is a slight twist on this helper function:
 

Attachments

Joined
Jul 16, 2012
Messages
26
Motherboard
Lenovo Yoga 460
CPU
i7-6500U
Graphics
HD 520 1920x1080
Mac
Classic Mac
Mobile Phone
What version of AppleACPIPlatform are you running:
Code:
# in Terminal
kextstat|grep -y acpiplatform
AppleACPIPlatform 1.6 / Running ML 10.8.4. I hope it is not due to a strange kext config from my side...

Checking the aml now.
 
Top