RehabMan
Moderator
- Joined
- May 2, 2012
- Messages
- 181,112
- Motherboard
- Intel DH67BL
- CPU
- i7-2600K
- Graphics
- HD 3000
- Mac
- Mobile Phone
I'd like to have some help with testing these. If you have been following along, you know that I've come up with a fix for AppleSmartBatteryManager.kext where it shows incorrectly 'Power Source: Battery' if you remove the batteries and boot exclusively on AC power adapter. The fix is a simple two line fix to the code as provided by zprood over on that 'other insane hackintosh forum'... As you may know, my first attempt at creating this fix was hampered by the fact that my build seemed to cause other problems with certain machines, in particular tegezee's and a few others, where the status would not correctly show 'Charging' when the AC adapter was plugged in and the battery was present. Even without my two line code change that was the case. It is a mystery.
The cause of that remains unknown, so I'm attempting to start over. I've downloaded the sources provided by zprood, and very carefully did a build under current xcode with current ML tools and I'd like to see what happens. Especially for those folks that had issues with the last one.
I'm attaching two separate kexts. The one labeled 'nofix' is just zprood source re-compiled on my machine. The other marked 'withfix' has my two line change. So, I'd like to know how both of these perform, and in particular whether you get the 'Not Charging' with battery present and AC adapter plugged in (with a depleted battery). After I figure out this mystery, I can go on to other things...
Use your favorite kext installer (I like Kext Wizard) and be sure to fix permissions & rebuild cache just to make sure... Please provide feedback by replying here. Thanks,
Edit 2012-08-27: Also please test out the "release" build I did at this post: http://www.tonymacx86.com/hp-proboo...er-fix-boot-without-batteries.html#post431221. Only difference is debug vs. release build (without compiler optimizations/with optimizations).
Edit 2012-08-31: Please note I've released another version. For details, see this post: http://www.tonymacx86.com/hp-proboo...-fix-boot-without-batteries-6.html#post436372
Edit 2012-09-10: New release available from github. From now on I will be releasing binaries only on the github project, located at: https://github.com/RehabMan/OS-X-ACPI-Battery-Driver. Of course, you can also build from source if you like.
Edit 2012-09-19: New release available from github. This version has code to handle ACPI battery methods that return data in watts instead of amps. ProBook always returns in amps, but some other laptops return watts.
Edit 2012-09-21: New release available from github. I have merged the probook branch into the master branch. It was becoming a pain to maintain the two separate branches for only a two line difference in Info.plist. This version adds some additional code to check for methods _BIX/_BBIX before using them even if the Info.plist is configured to use them.
Edit 2012-09-22: New release available from github. There was an issue where 10.7.5 (maybe all Lion versions) could not include the kext in the kernel cache. It is caused by something new Xcode 4.5 is doing. I rebuilt it with Xcode 4.4.1 and now it can be included in kernel cache. Bumped version numbers -- no other code changes.
Edit 2013-08-05: New release available (1.33). Changed the code to use DesignVoltage when converting from watts to amps when interpreting data from _BST. Not a concern for ProBook users, as the ProBook reports in amps. But for other laptops (Sony is one) where the report is in watts, it can make a difference when the reported voltage is different in _BST vs. _BIF.
Edit 2013-09-13: New release available (1.40). This version changes the name from AppleSmartBatteryManager.kext to ACPIBatteryManager.kext. This allows the stock kext to remain and the ACPIBatteryManager.kext to live in /S/L/E simultaneous. That way it is not overwritten by system updates.
Edit 2013-12-05: New release available (1.50). This version includes a device for the AC adapter ("ACPI0003") that allows the battery status to be updated quicker when plugging or unplugging the AC adapter. It overrides the use of AppleACPIACAdapter. This also means that if before you needed DSDT patches to make AppleACPIACAdapter load, you no longer need them. However, you may need other DSDT patches to make the _PSR method in your AC adapter device work.
Note: To be sure you are using AppleSmartBatteryManager.kext, be sure to remove AppleACPIBatteryManager.kext from /System/Library/Extensions. It is not needed and you don't want it loading instead of the now updated AppleSmartBatteryManager.kext. And every time an OS X update changes AppleSmartBatteryManager.kext, you will need to re-install this one.
The cause of that remains unknown, so I'm attempting to start over. I've downloaded the sources provided by zprood, and very carefully did a build under current xcode with current ML tools and I'd like to see what happens. Especially for those folks that had issues with the last one.
I'm attaching two separate kexts. The one labeled 'nofix' is just zprood source re-compiled on my machine. The other marked 'withfix' has my two line change. So, I'd like to know how both of these perform, and in particular whether you get the 'Not Charging' with battery present and AC adapter plugged in (with a depleted battery). After I figure out this mystery, I can go on to other things...
Use your favorite kext installer (I like Kext Wizard) and be sure to fix permissions & rebuild cache just to make sure... Please provide feedback by replying here. Thanks,
Edit 2012-08-27: Also please test out the "release" build I did at this post: http://www.tonymacx86.com/hp-proboo...er-fix-boot-without-batteries.html#post431221. Only difference is debug vs. release build (without compiler optimizations/with optimizations).
Edit 2012-08-31: Please note I've released another version. For details, see this post: http://www.tonymacx86.com/hp-proboo...-fix-boot-without-batteries-6.html#post436372
Edit 2012-09-10: New release available from github. From now on I will be releasing binaries only on the github project, located at: https://github.com/RehabMan/OS-X-ACPI-Battery-Driver. Of course, you can also build from source if you like.
Edit 2012-09-19: New release available from github. This version has code to handle ACPI battery methods that return data in watts instead of amps. ProBook always returns in amps, but some other laptops return watts.
Edit 2012-09-21: New release available from github. I have merged the probook branch into the master branch. It was becoming a pain to maintain the two separate branches for only a two line difference in Info.plist. This version adds some additional code to check for methods _BIX/_BBIX before using them even if the Info.plist is configured to use them.
Edit 2012-09-22: New release available from github. There was an issue where 10.7.5 (maybe all Lion versions) could not include the kext in the kernel cache. It is caused by something new Xcode 4.5 is doing. I rebuilt it with Xcode 4.4.1 and now it can be included in kernel cache. Bumped version numbers -- no other code changes.
Edit 2013-08-05: New release available (1.33). Changed the code to use DesignVoltage when converting from watts to amps when interpreting data from _BST. Not a concern for ProBook users, as the ProBook reports in amps. But for other laptops (Sony is one) where the report is in watts, it can make a difference when the reported voltage is different in _BST vs. _BIF.
Edit 2013-09-13: New release available (1.40). This version changes the name from AppleSmartBatteryManager.kext to ACPIBatteryManager.kext. This allows the stock kext to remain and the ACPIBatteryManager.kext to live in /S/L/E simultaneous. That way it is not overwritten by system updates.
Edit 2013-12-05: New release available (1.50). This version includes a device for the AC adapter ("ACPI0003") that allows the battery status to be updated quicker when plugging or unplugging the AC adapter. It overrides the use of AppleACPIACAdapter. This also means that if before you needed DSDT patches to make AppleACPIACAdapter load, you no longer need them. However, you may need other DSDT patches to make the _PSR method in your AC adapter device work.
Note: To be sure you are using AppleSmartBatteryManager.kext, be sure to remove AppleACPIBatteryManager.kext from /System/Library/Extensions. It is not needed and you don't want it loading instead of the now updated AppleSmartBatteryManager.kext. And every time an OS X update changes AppleSmartBatteryManager.kext, you will need to re-install this one.