Contribute
Register

[Guide] How to patch DSDT for working battery status

How to patch DSDT for working battery status

THANKS so much for your kind reply!!!


OK. I tried call BSTA from _STA by just adding BSTA () - space after "BSTA" ; now space between parentheses. Did not work.

Spaces are not significant.

* "shorting" the code by force 0x1F - this brings the battery icon to show % but it is always STUCK on 100%. I let the laptop sit without the AC adapter and after 2-3 hrs it was still at 100%. The output is

*************************
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::pollingTimeOut called
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::pollBatteryState: path = 0x1
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBatteryManager::getBatterySTA called
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatterySTA: battery_status = 0x1f
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBIX called
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBIX: acpibat_bix size = 20
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBatteryManager::getBatteryBST called
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: acpibat_bst size = 4
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fPowerUnit = 0x0
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: currentStatus = 0x0
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 0xffffffff
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 0xffffffff
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentVoltage = 0xffffffff
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: Calculating for WATTS
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentRate = 386933
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fCurrentCapacity = 386933
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: adjusted fCurrentRate to -321398
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery::setBatteryBST: fAverageRate = 0x1b198a
9/14/14 7:40:38.000 PM kernel[0]: AppleSmartBattery: Battery is charged.
**********************

Of course, "Battery is charged" is wrong.... So it sees the battery but is not actively monitoring the charge.

Must be a problem in the DSDT. You can use ACPIDebug.kext to debug it: https://github.com/RehabMan/OS-X-ACPI-Debug

2. There is a value "ECON" that is specified throughout all the power and brightness etc. What is this?

It is probably a variable set to 1 when _REG for the EC region is called to indicate availability of the EC. Read more in the ACPI spec: http://acpi.info/spec.htm
 
How to patch DSDT for working battery status

Where is the log for ACPIDebug.kext ?

Thanks !
 
How to patch DSDT for working battery status

Where is the log for ACPIDebug.kext ?

Thanks !

/var/log/system.log. View in Console.app.
 
How to patch DSDT for working battery status

it's too technical to implement. following the guide, no need for MaciASL patch source at all. All we need to do is manual.
 
How to patch DSDT for working battery status

it's too technical to implement. following the guide, no need for MaciASL patch source at all. All we need to do is manual.

What?
 
How to patch DSDT for working battery status

rehadman hello, I have a laptop samsung np300 with intel i5 processor, apply a patch to the workof the battery but when compiling I get the following errors.


1- Error Invalid character (0x5B), expecting ASL keyword or name
2- Error syntax error, unexpected PARSEOP_NAMESEG, expecting '('
3- Error Invalid character (0x5D), expecting ASL keyword or name




reapply the patch "method b1b2" manually compile and only now I get the following error:


"Error syntax error, unexpected PARSEOP_NAMESEG, expecting '('"


and also the error


"Error syntax error, unexpected $ end premature and End-Of-File".


I'm doing wrong ?. Might help, I'm using maverick 10.9, 5.0 compilation with maciasl
 

Attachments

  • dsdt.aml
    32.1 KB · Views: 150
How to patch DSDT for working battery status

rehadman hello, I have a laptop samsung np300 with intel i5 processor, apply a patch to the workof the battery but when compiling I get the following errors.


1- Error Invalid character (0x5B), expecting ASL keyword or name
2- Error syntax error, unexpected PARSEOP_NAMESEG, expecting '('
3- Error Invalid character (0x5D), expecting ASL keyword or name




reapply the patch "method b1b2" manually compile and only now I get the following error:


"Error syntax error, unexpected PARSEOP_NAMESEG, expecting '('"


and also the error


"Error syntax error, unexpected $ end premature and End-Of-File".


I'm doing wrong ?. Might help, I'm using maverick 10.9, 5.0 compilation with maciasl

I loaded the DSDT you attached, compiled without error, applied the "Samsung Series3" patch, and again compiled without error.

Make sure your system language is set to English.
 
How to patch DSDT for working battery status

:beachball:I have the system in French. Could be the
Had to install a kext then added to patch my dsdt ???. That will be the reason for my mistakes ?
You must install an additional kext after patching my dsdt ?
 
How to patch DSDT for working battery status

I have the system in French. Could be the
Had to install a kext then added to patch my dsdt ???reason that me errors at compile time ?

Change to English. Must be some bugs in MaciASL/iasl when language is not english.

Had to install a kext then added to patch my dsdt ???

See instructions in post #1.
 
How to patch DSDT for working battery status

It would be possible to apply the patch from the battery through a SSDT ?
 
Back
Top