Posted 20 November 2011 - 04:46 PM

First Of All, Thanks these people for the battery driver:Chun-Nan, zenglg1977, gsly, bcc9, VIVXIX, weizh126. Cause without what they do can't get it work.Now start the topic.

Since apple changes some things on lion, the Appleacpibatterymanager does't work any more under the Lion, so people use roll backed next to get is work, but this has shortage. At the first, bcc9 found that lion reads battery info from EC by 8bit, and most laptop's EC region use 16bit to store battery information, so the legacy driver doesn't work include voodoo battery. This information is important for next.

The guy zenglg1977 takes some time to rewrite the sources code of Appleacpibatterymanager to make it work for lion. It is needed to edit the code of battery in the dsdt, so divide 16bit register into two 8bit can make sense. Like:

This way created by zenglg1977, after done with this can make it work.But when compare VIVXIX with others method, i found his method is simple and easy to reach, it named "B1B2".Here is his method: 1, create the "Method (B1B2, 2, NotSerialized)" as global:

More about the sources code, zenglg1977 combines gsly's AppleSmartBatteryManger code into whole project, then people get two choice. And weizh126 plays a trick about battery cycle count in the _BIF method part, the _BIF just contains 13 items in the package and he adds "Zero" to it become 14, and store the cycle count register info in it, it sounds illegal, but it works.

Posted 20 November 2011 - 08:17 PM

fc bayern

InsanelyMac Geek

Members

216 posts

Gender:Male

Location:Macedonia

Works perfect, also shows the cycle info and the power tab in system profiler .But is it supposed to work with latest Appleacpiplatform.kext(10.7.2) or with the from SL(10.6.8). On my case work only with the one from 10.6.8, everything OK, but with the latest acpiplattform I can no infos at all.

Posted 21 November 2011 - 12:31 AM

juanerson

InsanelyMac Deity

Local Moderators

1,532 posts

Gender:Male

Location:Tru, Venezuela

YES. Thank You my friend! In my case (previous 8bit fixed code, thanks to bcc9 found) it was ONLY needed install the driver and voilá!... Very complete information in System profiler. I will do more tests. Best Regards.

Posted 21 November 2011 - 01:26 AM

Zprood

InsanelyMac Sage

Members

252 posts

Gender:Male

Location:CHN

@fc Bayern:It works both 10.6.8 10.7.2 too, do you correct your dsdt ? i have test it under 10.6.8 turn out works with 8bit register.@DarwinX mindlessmissyMaybe some things you do wrong, i mean the code edit in the battery device, some registers are placed in other place not EC.

For those battery indicator percentage shows problem, maybe can take a look this:In my case, also some other users get this phenomenon, it is like below:

Store (^^EC0.BDC0, BFC1)

under _BIF method, note the BDC0 is in the EC region, but BFC1 also exists both Field (ERAM, ByteAcc, Lock, Preserve) and the Field (GNVS, AnyAcc, Lock, Preserve), but the right place should be the latter. So, the right way is like this:

Posted 21 November 2011 - 07:22 AM

fc bayern

InsanelyMac Geek

Members

216 posts

Gender:Male

Location:Macedonia

@fc Bayern:It works both 10.6.8 10.7.2 too, do you correct your dsdt ? i have test it under 10.6.8 turn out works with 8bit register.@DarwinX mindlessmissyMaybe some things you do wrong, i mean the code edit in the battery device, some registers are placed in other place not EC.

For those battery indicator percentage shows problem, maybe can take a look this:In my case, also some other users get this phenomenon, it is like below:

Store (^^EC0.BDC0, BFC1)

under _BIF method, note the BDC0 is in the EC region, but BFC1 also exists both Field (ERAM, ByteAcc, Lock, Preserve) and the Field (GNVS, AnyAcc, Lock, Preserve), but the right place should be the latter. So, the right way is like this:

Posted 22 November 2011 - 01:47 PM

archintosh

InsanelyMac Protégé

Members

37 posts

Gender:Male

More about the sources code, zenglg1977 combines gsly's AppleSmartBatteryManger code into whole project, then people get two choice. And weizh126 plays a trick about battery cycle count in the _BIF method part, the _BIF just contains 13 items in the package and he adds "Zero" to it become 14, and store the cycle count register info in it, it sounds illegal, but it works.

Thanx mate, I have tried this on my Lenovo G470 n' I have patched my DSDT. Batt is showing alright, info n' percentage are all okay. But I got 'Condition: Replace Now', what do I have to check?

Posted 22 November 2011 - 08:20 PM

Attached Files

Posted 23 November 2011 - 12:22 AM

archintosh

InsanelyMac Protégé

Members

37 posts

Gender:Male

check your dsdt carefully, it might be something wrong with your editing. I also have lenovo laptop, you should take a look of 1# and 6#.

Ok, I've checked my dsdt n' now 'Condition: Replace Now' is gone. But now my laptop won't sleep (sleep was working fine before). Can you please take a look at my dsdt? Here I attached 2 version of my dsdt, without 8-bit batt patches and with 8-bit batt patches.