Jump to content

HP 6520s, 6720s, 6820s, 550 SL Install Package


BlackCH
 Share

1,448 posts in this topic

Recommended Posts

Thats version 1.3.5, from 10.6.7 I guess. I would like to know if is untouched or has some patch on it.

 

Im downloading 10.6.7 combo update to extract this kext and try it in Lion

 

OK. It states that the kext is from Lion DP3. Sofar working good here.

Link to comment
Share on other sites

... Coming from the previous commentary HERE... I have good news... because I fixed the dsdt code for battery meter in Lion, also works in Snow of course. Big THANKS to the legendary master bcc9 in this thread for point to the "real" fix.

 

Attached the involved code for implementation & testing, please BlackCH and ThirdSmile and maybe others friends, I need your help to make it standard for all of us into a soon new version of the DSDT. Also, maybe the ThermalZones code (fan control) can be fixed in the same way... I think it can be possible and is not so complicated.

 

@ Testers, for record, I have vanilla 10.7.2 (beta) system (just x3100FB.kext from Snow). Also I have installed all my extensions in /S/L/E, at moment using the glsy's battery .kext, the last version of the vanilla istat pro widget, and coconut battery app to monitoring the results. Good Luck to everyone.

 

Update 1: Thanks to ThirdSmile we have a better code for the battery support. Please test and enjoy the first revision of this effort, and of course remember the most important is Lion & Snow ready (ONLY for our laptop models). Worked excellent for me, now with auto-detection of the "desing capacity". Also, attached AppleACPIBatteryManager.kext into the .zip for properly cycle count readings, and other things for monitoring. Bye.

battery_fixed_code_Update_1_Lion_Snow_Ready.zip

  • Like 1
Link to comment
Share on other sites

... Coming from the previous commentary HERE... I have good news... because I fixed the dsdt code for battery meter in Lion, also works in Snow of course. Big THANKS to the legendary master bcc9 in this thread for point to the "real" fix.

 

Attached the involved code for implementation & testing, please BlackCH and ThirdSmile and maybe others friends, I need your help to make it standard for all of us into a soon new version of the DSDT. Also, maybe the ThermalZones code (fan control) can be fixed in the same way... I think it can be possible and is not so complicated.

Cool! I was looking to that very thread this morning and wondering if it would work for us...

I dont have much free time this days but I will try to test it

Thanks for sharing!

 

I do think that thermal zones could be fixed on the DSDT as well. I dont have the knowledge to do it though

 

EDIT

About the battery code:

The "design capacity" parameter always vary along with the "current capacity". It shouldnt. Design capacity should be always the same (4400mAh or whatever the factory full capacity of the battery is)...

Link to comment
Share on other sites

SmartBattery works as expected. Tested on SL 10.6.7 with AppleSmartBattary.kext from dsdt_battery_meter_fix_juanerson_08_2011.zip.

 

CoconutBattery screenshot.

 

http://zxbodya.cc.ua/notebook/Screenshot20...t11.20.33PM.png

 

Also I have added fix for propper showing design capacity:

 

Store (\_SB.PCI0.LPCB.EC.C1E1, Index (PBIF, One)) /* Line added, C1E1 - stores battary design capacity */
/* Store (Local0, Index (PBIF, One))*/ /*removed because: Local0 now stores current(not design capacity) */

 

UPD:

Battery load cycles, incorrect now(it was correct before with AppleACPIBatteryManager, or probably was like correct one).

Link to comment
Share on other sites

Load cycles are working fine here in Lion & Snow, BUT ONLY by using AppleACPIBatteryManager.kext.

Captura_de_pantalla_2011_08_21_a_la_s__17.56.19.png

Lion capture 0x1f4 = 500 hexadecimal (Num of battery cycles, I think is real because is almost death). Same report in Snow, by System Profiler (status "Replace Now") and information in coconut battery 2.6.6 app. Also "replace now" in Lion prefpane.

Captura_de_pantalla_2011_08_21_a_la_s__18.08.41.png

Also, I made a little update to my previous comment... I think now is better code... just details to be perfect for all of us.

 

@ThirdSmile, Thanks for the find about C1E1 for design capacity. I will test it, and try to add to the Lion - Snow fix battery code, for properly functionality in both Systems.

 

EDITED: DONE! worked beautiful for me, added the fix (Lion ready) to the Update 1 involved dsdt code in the previous post.

Link to comment
Share on other sites

Hi guys, what a good news about Battery information. And i follow what you introduce to do, get this result: 1, Battery menu bar shows normally with the native AppleACPIPlatform.kext. But some bugs exists like the picture shows, the message "Condition : replace now " do not appears under SL, with CoconutBattery monitoring, the battery capacity is not correct. Also, system profiler doesn't shows battery information in the Power item. Here is my dsdt file:

dsdt.aml.zip

post-459659-1313974526_thumb.png

post-459659-1313974534_thumb.png

post-459659-1313974542_thumb.png

Link to comment
Share on other sites

I leave you guys an interesting link about debugging ACPI:

http://www.projectosx.com/forum/index.php?...amp;#entry15691

 

About battery, my machine goes off without any "Battery Low Charge" notice, before the reported remaining capacity comes to 0. I would do more tests in the next days. Maybe I need to calibrate the battery...

 

BTW: I applied the C1E1 fix to the DSDT. It works good.

Link to comment
Share on other sites

Today I have noticed buggy behavior of new battery fix - sometimes it shows charging state when working from battery(aproximately with 5 minute period).

I will test more and try to fix this later.

The "current capacity" reading method is buggy too.

I get different values for this parameter; For example:

-If I pull the AC plug and then back in again the value sometimes goes up, sometimes goes down...

-If I let the battery drain completely until the machine goes off, after restart the value is different

Link to comment
Share on other sites

The "current capacity" reading method is buggy too.

I get different values for this parameter; For example:

-If I pull the AC plug and then back in again the value sometimes goes up, sometimes goes down...

-If I let the battery drain completely until the machine goes off, after restart the value is different

 

current capacity - is not constant value it can variate from battery condition(the same was on previous fix too, ±70mAh for me)... it's normal.

 

About load cycles - yes, with ACPIBattary mgr. it is correct.

 

About, charger detecting problems - it persist with ACPIBattary too.

 

About tools for debug, to find out design capacity in EC device I have used ectool with DirectIO library(both in attachments). Also about DirectIO library - it can be used other monitoring purposed too.

 

@juanerson Where I can find sources of AppleSmartBatteryManager from your recent post?

DirectHW.dmg

ectool.zip

Link to comment
Share on other sites

BATTERY METER IS WORKING ON LION (10.7).

@ThirdSmile, I have none problem as you mentioned about "charger or charging" detection from battery status in N period, is working fine here with the UPDATE-1 CODE FIX, and of course I am speaking about any problem "out of the normal" things because our buggy (ever) dsdt, and also due to battery conditions, calibration, etc as we all must to know. So, is not my idea to fix this bugs of the factory code... therefore at moment I am happy because it's Lion ready Done (not perfect for sure) just like in Snow, that was my only intention.. no more. I will post a new dsdt as soon possible. Next step for me: thermalzones.

Link to comment
Share on other sites

@ThirdSmile, I have none problem as you mentioned about "charger or charging" detection from battery status in N period, is working fine here with the UPDATE-1 CODE FIX, and of course I am speaking about any problem "out of the normal" things because our buggy (ever) dsdt, and also due to battery conditions, calibration, etc as we all must to know. So, is not my idea to fix this bugs of the factory code... therefore at moment I am happy because it's Lion ready Done (not perfect for sure) just like in Snow, that was my only intention.. no more. I will post a new dsdt as soon possible. Next step for me: thermalzones.

I have updated DSDT but problem with charger status remains...

 

More about problem:

When charger connected and battery is fully charged every thing is ok.

When battery is charging - driver randomly changes "charging" and "charged - work from AC" states (period is not fixed - from few seconds to few minutes) .

When battery is discharging - driver randomly changes "discharging" and "charged - work from AC" states period also is not fixed.

 

When all this driver state transitions occurs i have monitored state of ec device - there was no changes in battery state...

 

For monitoring EC device I have modified ectool(in attachments, run with "-p" param) is my post above. It outputs values from ec device as them are commented in DSDT code.

 

Currently I am running 10.6.7 and using AppleACPIBatteryManager from last update...

 

It is possible that I have missed something when patching dsdt or I have some other error in it so - could you post you current working dsdt?

ectool.zip

Link to comment
Share on other sites

It is possible that I have missed something when patching dsdt or I have some other error in it so - could you post you current working dsdt?

YES, maybe you are missing something. Post yours and I will apply the exactly Update 1 fix, I mean the whole: EC and Battery involved code, just like the .dsl file I upload... that's it. My dsdt is very modified, and not standard YET. Coming soon.

Link to comment
Share on other sites

YES, maybe you are missing something. Post yours and I will apply the exactly Update 1 fix, I mean the whole: EC and Battery involved code, just like the .dsl file I upload... that's it. My dsdt is very modified, and not standard YET. Coming soon.

Yes, you are right... after review my code, I have found place with wrong code... Now all works excellent...

Sorry for for disinformation about bug...

Link to comment
Share on other sites

I have almost fixed the thermal zones problem in DSDT at the same way (same procedure) of battery code fix. Thanks again to bcc9. It is a little bit more complicated but not impossible. For references about those issues (battery and thermal zones for us) and others, please see this commentary by THe KiNG about the new ACPI specification in Lion.

Link to comment
Share on other sites

I have almost fixed the thermal zones problem in DSDT at the same way (same procedure) of battery code fix. Thanks again to bcc9. It is a little bit more complicated but not impossible. For references about those issues (battery and thermal zones for us) and others, please see this commentary by THe KiNG about the new ACPI specification in Lion.

Great news!

You can download the full ACPI 4.0 specification PDF from the link on my post #1113, but I guess you already have that

 

 

EDIT:

Im using the old ACPIPlatform from 10.6.7 now to have active cooling enabled in Lion and something I noticed is that ACPIThermal.kext doesnt need to be unload with sleepwatcher for the machine to sleep and it loads again on wake.

Link to comment
Share on other sites

More about battery.

 

After comparison of EC device memory with and without battery I have found that some, currently not used, fields in memory can be related to battery :

C1EF - value is near 280,

C1AF - value is near 480,

C1F2 - for me it is constant 16608,

C1F8 - also constant 8.

 

May be this fields contains such info as cycle count, temperature, etc, but I don't know how to determine(only one suggestion is to try with some monitoring software on windows and compare it results with values in EC device, but i have no windows on my laptop at this time)....

 

About battery monitoring info with AppleACPIBattery:

cycle count = ( DesignCapacity - MaxCapacity) / 7

probably this is near correct value but this is FAKE.

temperature = CurrentVoltage / 4

also FAKE, but I am sure it have no chance to be correct.

 

To have this monitoring features we must find-out where to get this values and implement correct _BIX methods as gsly described in his topic.

 

UPD:

 

I have added _BIX method to dsdt to emulate the same cycle count as in ACPIBatteryManager for gsly driver, also I have replaced default PBIF by gsly one(it looks like more correct).

New methods:


Name (PBIX, Package (0x14)
{
   0x00000001,     // 0x00, Revision //Integer
   0x00000001,     // 0x01, Power Unit //Integer (DWORD)
   0xFFFFFFFF,     // 0x02, Design Capacity //Integer (DWORD)
   0xFFFFFFFF,     // 0x03, Last Full Charge Capacity //Integer (DWORD)
   0x00000001,     // 0x04, Battery Technology //Integer (DWORD)
   0xFFFFFFFF,     // 0x05, Design Voltage //Integer (DWORD)
   0x000000FA,     // 0x06, Design Capacity of Warning //Integer (DWORD)
   0x00000096,     // 0x07, Design Capacity of Low //Integer (DWORD)
   0x00000000,     // 0x08, Cycle Count //Integer (DWORD)
   0x00100000,     // 0x09, Measurement Accuracy //Integer (DWORD)
   0xFFFFFFFF,     // 0x0a, Max Sampling Time //Integer (DWORD)
   0xFFFFFFFF,     // 0x0b, Min Sampling Time //Integer (DWORD)
   0xFFFFFFFF,     // 0x0c, Max Averaging Interval //Integer (DWORD)
   0xFFFFFFFF,     // 0x0d, Min Averaging Interval //Integer (DWORD)
   0x0000000A,     // 0x0e, Battery Capacity Granularity 1 //Integer (DWORD)
   0x00000019,     // 0x0f, Battery Capacity Granularity 2 //Integer (DWORD)
   " ",            // 0x10, Model Number //String (ASCIIZ)
   " ",            // 0x11, Serial Number //String (ASCIIZ)
   " ",            // 0x12, Battery Type //String (ASCIIZ)
   " "             // 0x13, OEM Information //String (ASCIIZ)
})

// Return battery extended information in PBIX

Method (_BIX, 0, NotSerialized)
{
   UPBX ()
   Return (PBIX)
}

// Get and store battery extended information in PBIX

Method (UPBX, 0, NotSerialized)
{
UBIF()                                               
   Store (0x00, Index (PBIX, 0x00))                     
   Store (0x01, Index (PBIX, 0x01))                       
   Store (DerefOf (Index (PBIF, One)),Local0) 			   
   Store (Local0, Index (PBIX, 0x02))                     

   Store (DerefOf (Index (PBIF, 0x02)),Local0) 		   
   Store (Local0, Index (PBIX, 0x03)) 

   Store (0x01, Index (PBIX, 0x04))                    

   Store (DerefOf (Index (PBIF, 0x04)),Local0) 		 
   Store (Local0, Index (PBIX, 0x05))   

   Store (0xFA, Index (PBIX, 0x06))                 
   Store (0x96, Index (PBIX, 0x07))   
   //some magic as in AppleACPIBatteryManager                        
   Store (DerefOf (Index (PBIF, One)),Local0)                       
   Store (DerefOf (Index (PBIF, 0x02)),Local1)  
Subtract(Local0,Local1,Local2)            
   // TODO: Cycle Count
Divide (Local2, 7, Local0, Index (PBIX, 0x08)) 

   Store(100,Local0) // TODO: Measurement Accuracy
   Multiply (Local0, 0x1000, Index (PBIX, 0x09))   

   Store (0xFFFFFFFF, Index (PBIX, 0x0a))                 
   Store (0xFFFFFFFF, Index (PBIX, 0x0b))                 
   Store (0x0000EA60, Index (PBIX, 0x0c))                 
   Store (0x0000EA60, Index (PBIX, 0x0d))                 
   Store (0x0A, Index (PBIX, 0x0e))                       
   Store (0x19, Index (PBIX, 0x0f))                       

   Store (DerefOf (Index (PBIF, 0x09)),Local0) 	
   Store (Local0, Index (PBIX, 0x10))             

   Store (DerefOf (Index (PBIF, 0x0a)),Local0) 	
   Store (Local0, Index (PBIX, 0x11))             

   Store (DerefOf (Index (PBIF, 0x0b)),Local0) 	
   Store (Local0, Index (PBIX, 0x12))             

   Store (DerefOf (Index (PBIF, 0x0c)),Local0) 	
   Store (Local0, Index (PBIX, 0x13))                   
}

 

new PBIF:

Name (PBIF, Package (0x0D)
{
0x00000001,	  // 0x00, Power Unit
0xFFFFFFFF,	  // 0x01, Design Capacity
0xFFFFFFFF,	  // 0x02, Last Full Charge Capacity
0x00000001,	  // 0x03, Battery technology
0xFFFFFFFF,	  // 0x04, Design voltage
0x000000FA,	  // 0x05, Design capacity of warning
0x00000096,	  // 0x06, Design capacity of low
0x0000000A,	  // 0x07, Battery capacity gradularity 1
0x00000019,	  // 0x08, Battery capacity gradularity 2
"Primary",	   // 0x09, Model number
"100000",		// 0x0a, Serial number
"LIon",		  // 0x0b, Battery type
"Hewlett-Packard" // 0x0c, OEM Information
})

 

 

To use this new methods in dsdt configure key "UseExtendedBatteryInformationMethod" to true in Info.plist, and install AppleSmartBattery.kext from gsly topic.

Link to comment
Share on other sites

Thank You, I want to try your work also on Lion. But please, can you upload your EC and all Battery involved code... into a .dsl file to avoid confusions about the order (and/or places) of the new additions and/or replacements in the DSDT.

EDIT:

Im using the old ACPIPlatform from 10.6.7 now to have active cooling enabled in Lion and something I noticed is that ACPIThermal.kext doesnt need to be unload with sleepwatcher for the machine to sleep and it loads again on wake.

Same behavior here in 10.6.8... Is not needed that daemon anymore. But I noticed this only after my last clean installation (new hdd) about three months ago.
Link to comment
Share on other sites

 Share

×
×
  • Create New...